Questions tagged [nltk]

for questions about the NLTK library used for computational linguistic programming

Filter by
Sorted by
Tagged with
0 votes
1 answer
73 views

What is the more natural parsing, the one that leads to the preferred reading of the sentence

I have those rules: and those two possible parse trees: I am asked for the next question: What is the more natural parsing, the one that leads to the preferred reading of the sentence? Can anyone ...
Ilya.K.'s user avatar
  • 103
1 vote
0 answers
365 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 ...
Miriam Farber's user avatar
-1 votes
1 answer
386 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=...
Aman Dalmia's user avatar
0 votes
1 answer
112 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(...
bemzoo's user avatar
  • 17
3 votes
1 answer
491 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 ...
Goli A's user avatar
  • 31
2 votes
1 answer
442 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 ...
Revolucion for Monica's user avatar
1 vote
1 answer
119 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 ...
Revolucion for Monica's user avatar
2 votes
1 answer
1k 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 ...
Baatarhuu Monhkbayar's user avatar
0 votes
1 answer
1k 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 ...
AKKA's user avatar
  • 11
4 votes
2 answers
143 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, ...
rafiko1's user avatar
  • 43
0 votes
1 answer
128 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....
Arman's user avatar
  • 11
0 votes
1 answer
251 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 >>> ...
Roman's user avatar
  • 95
1 vote
1 answer
648 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....
dia's user avatar
  • 113
3 votes
2 answers
552 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=&...
zadrozny's user avatar
  • 153
3 votes
1 answer
2k 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 ...
mrquintopolous's user avatar
1 vote
0 answers
361 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 ...
m-bhole's user avatar
  • 111
2 votes
2 answers
303 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 (...
Hooked's user avatar
  • 517
5 votes
1 answer
395 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 ...
Gavin's user avatar
  • 51
4 votes
2 answers
823 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. ...
user3898238's user avatar
18 votes
1 answer
13k 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 ...
piggs_boson's user avatar
1 vote
1 answer
422 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 ...
user3279453's user avatar
4 votes
1 answer
5k 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 ...
Josh's user avatar
  • 141
5 votes
2 answers
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 ...
user94154's user avatar