Questions tagged [nltk]

for questions about the NLTK library used for computational linguistic programming

Filter by
Sorted by
Tagged with
1
vote
0answers
45 views

Automatic sentence negation

I am looking for an automatic sentence negation tool. Something that will be able to perform conversions like: "this ball is large" ---> "this ball is small" "you should ...
-1
votes
1answer
185 views

Can anyone explain me the structure of the FCFG grammar

I was not able to understand the grammar rules explain in discourse.fcfg file. Can any one help me understanding SEM means in S[SEM = <app(?subj,?vp)>] -> NP[NUM=?n,SEM=?subj] VP[NUM=?n,SEM=...
0
votes
1answer
98 views

Differences in Naive Bayes Classifier NLTK, same code, different answers?

I'm not sure what the difference between these 2 is: classifier = NaiveBayesClassifier.train(train_d) d1 = (nltk.classify.accuracy(classifier,train_d[:500]))*100 d2 = (nltk.classify.accuracy(...
2
votes
1answer
237 views

Jiang & Conrath when two words are the same

I would like to normalize the result of Jiang & Conrath similarity measure by dividing it by the maximum value(normally should be when both synsets are the same). I am using the implementation of ...
2
votes
1answer
206 views

Why are three tags necessary for the IOB format? What problem would be caused if we used I and O tags exclusively?

I'm trying to understand how representing chunks works by facing this question : The IOB format categorizes tagged tokens as I , O , and B . Why are three tags necessary? What problem would be ...
1
vote
1answer
92 views

What are the most relevant ways to store expressions in NLP?

I am trying to understand the best ways to store expressions for NLP from an exercise I received Consider the following two expressions, which have the same value. Which one will typically be more ...
2
votes
1answer
623 views

How to tag_pos in nltk for a language that is not English?

Hi my country's language is not in nltk in python. I have a wordlist that contains word and part of speech (noun, verd adj etc.) in excel. But I don't know how to build a corpus. My language is not in ...
0
votes
1answer
796 views

Implementation of Jaccard Distance metric in nltk.metrics.distance not consistent with the mathematical definition?

I was trying to complete an NLP assignment using the Jaccard Distance metric function jaccard_distance() built into nltk.metrics.distance, when I noticed that the results from it did not make sense in ...
4
votes
2answers
120 views

Text classification of semantic relations within text

I am already familiar with some text (document) classification algorithms after processing into a Bag-of-words & tf-idf representation. Classification algorithms such as Multionmial Naive Bayes, ...
0
votes
1answer
106 views

How to extract rows with only meaningful text in a column

I have a large excel file like the following: Timestamp Text Work Id 5/4/16 17:52 rain a lot the packs maybe damage. Delivery XYZ 5/4/16 18:29 wh....
0
votes
1answer
191 views

How to determine who is the author of a message in the nps_chat corpora?

I try to use nps_chat corpora provided by nltk library. I follow the example given here. In particular, I can reproduce this results: >>> from nltk.corpus import nps_chat >>> ...
1
vote
1answer
521 views

GermaNLTK: not finding files [python]

Following the instructions of GermaNLTK I tried to install the german NLTK in Python. (I want to use the synsets for semantic-taging.) But I couldn't find the files germanet.py and GermanetDBBuilder....
3
votes
2answers
433 views

Why does Wordnet lack stopwords (“the”, “of”, “her”, etc)?

I have attempted to access it through both NLTK and the web inteface: http://wordnetweb.princeton.edu/perl/webwn?s=her&sub=Search%20WordNet&o2=&o0=1&o8=1&o1=1&o7=&o5=&...
3
votes
1answer
1k views

Detection if input sentence represents an incomplete sentence?

I am curious if there is an automated way to detect if a given string, representing a sentence, is an 'incomplete' sentence. By this I mean that either the text is not grammatically correct, or is ...
1
vote
0answers
347 views

How do PCFG parsers actually work?

I'm new to NLP. I have a few doubts about PCFG parser (NLTK). My understanding is that PCFG parser will return most probable parse tree. So if I'm parsing one sentence with PCFG parser, I'll be ...
1
vote
2answers
192 views

Determine adjective order algorithmically

Does NLTK (or any other Python natural language module) have the ability to determine the order of multiple modifier adjectives? For example: metal round huge bowl (incorrect) huge round metal bowl (...
5
votes
1answer
369 views

Semantic Relatedness metric across Parts of Speech

I am a student in psychology, but I have very little familiarity with linguistics. I am doing working on flexible cognition and memory, and we are developing a task that requires participants to ...
4
votes
2answers
666 views

How to search Penn TreeBank for arbitrary patterns?

What is a general way to parse the trees in the Penn TreeBank for arbitrary patterns, e.g. perhaps I want all trees which have a plural subject and whose sister VP has a modal verb daughter. ...
17
votes
1answer
12k views

What do WordNet::Similarity scores mean?

I am using WordNet Interface in NLTK, which facilitates computation of a number of similarity metrics: Path similarity Leacock-Chodorow Similarity Wu-Palmer Similarity Resnik Similarity Jiang-Conrath ...
1
vote
1answer
349 views

NLP conversion between parts of speech and pertainyms?

I would like to write a program that can automatically group e.g. 'happiness', 'happily', 'happy' into 'happy': What do I need to read to get a handle on this subject? What is it called? What is the ...
4
votes
1answer
4k views

Filling in incomplete sentences using NLP and Python

I am trying to leverage NLTK and Python to perform some sentence completion. The sentences I'm working with are incomplete and pretty much just read as garbage. An example sentence would be something ...
5
votes
2answers
1k views

Expressing Context Free Grammar from academic article with Python's NLTK

Please forgive the potentially noob question, but I'm trying to get started with semantic text analysis, particularly in the legal space. I found a very good paper which describes a context free ...