Coreference resolution in python nltk using Stanford coreNLP

Stanford CoreNLP provides coreference resolution as mentioned here, also this thread, this, provides some insights about its implementation in Java. However, I am using python and NLTK and I am not sure how can I use Coreference resolution functionality of CoreNLP in my python code. I have been able to set up StanfordParser in NLTK, … Read more

POS tagging using spaCy

I am trying to do POS tagging using the spaCy module in Python. Here is my code for the same from spacy.en import English, LOCAL_DATA_DIR import spacy.en import os data_dir = os.environ.get(‘SPACY_DATA’, LOCAL_DATA_DIR) nlp = English(parser=False, tagger=True, entity=False) def print_fine_pos(token): return (token.tag_) def pos_tags(sentence): sentence = unicode(sentence, “utf-8”) tokens = nlp(sentence) tags = [] for … Read more

NLP and Machine learning for sentiment analysis [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 3 years ago. Improve this question I’m trying to write a program that takes text(article) as input and outputs the polarity of this text, weather … Read more

Syntaxnet / Parsey McParseface python API

I’ve installed syntaxnet and am able to run the parser with the provided demo script. Ideally, I would like to run it directly from python. The only code I found was this: import subprocess import os os.chdir(r”../models/syntaxnet”) subprocess.call([ “echo ‘Bob brought the pizza to Alice.’ | syntaxnet/demo.sh” ], shell = True) which is a complete … Read more

Synchronizing text and audio. Is there a NLP/speech-to-text library to do this?

I would like to synchronize a spoken recording against a known text. Is there a speech-to-text / natural language processing library that would facilitate this? I imagine I’d want to detect word boundaries and compute candidate matches from a dictionary. Most of the questions I’ve found on SO concern written language. Desired, but not required: … Read more

Logical fallacy detection and/or identification with natural-language-processing

Is there a package or methodology in existence for the detection of flawed logical arguments in text? I was hoping for something that would work for text that is not written in an academic setting (such as a logic class). It might be a stretch but I would like something that can identify where logic … Read more

How to save Python NLTK alignment models for later use?

In Python, I’m using NLTK’s alignment module to create word alignments between parallel texts. Aligning bitexts can be a time-consuming process, especially when done over considerable corpora. It would be nice to do alignments in batch one day and use those alignments later on. from nltk import IBMModel1 as ibm biverses = [list of AlignedSent … Read more