Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

The tag has no usage guidance.

-2
votes
1answer
31 views

For each word in a corpus, find how many senses it has according to WordNet [closed]

I've come across this exercise in my studies and I do not know how to challenge, I've tried to follow examples though I can never find anything online that truly is symmetrical to what I'm trying to ...
0
votes
0answers
15 views

How to apply TF-IDF on my bows after generating frequencies

I'm working on document similarity using WordNet, though I have no idea how to apply the IDF weighting at this point in my code. I'm sure this weighting is one of the most simple things out there, but ...
0
votes
1answer
25 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(...
0
votes
1answer
44 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 ...
1
vote
2answers
47 views

Libs or APIs for removing background noise from voice input?

The effect of background noise on speech recognition is not good. Are there libs or APIs for removing background noise from voice input? Ideally language-agnostic or tuned for the top 100+ languages,...
2
votes
1answer
281 views

Python list to Parse tree

In Python, I have an input of list like following: [('S', ['NP', 'VP']), ('A', ['V', 'NP']), ('VP', ['V', 'NP']), ('NP', ['DET', 'NP']), ('N', "'mouse'"), ('NP', "'mouse'"), ('DET', "'the'"), ('V', "'...
0
votes
0answers
11 views

Automatic Semantic Clustering and Tagging of sentences using NLP

NLP Analysis for keyword clustering I have a set of keywords for search engines and I would like to create a python script to classify and tag them under unknown categories. To make it clear I ...
1
vote
1answer
43 views

P2G Alignment Algorithm in Python (OS X)

I'm looking for a basic phoneme-grapheme alignment algorithm which can be called in Python from a machine running OS X. So far the only implementations I've been able to find are part of larger C++ ...
0
votes
1answer
79 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....
3
votes
0answers
75 views

n-gram language model smoothing [closed]

I use the corpora of webtext to train n-gram model in NLTK.And i use katz back-off smoothing to solve 0 count-problem.But one problem is:while the smoothing used in based-on characters language model,...
8
votes
1answer
140 views

Representing knowledge extracted from output of dependency parsing

I am working on a problem to represent knowledge extracted from a paragraph and rank it to produce abstractive summaries. I have implemented dependency parsing using Stanford NLP, which gives dot ...
1
vote
0answers
65 views

Getting POS probabilities from TreeTagger in python?

Is there a way to get the underlying probabilities or pass a minimum probability threshold to treetaggerwrapper (the TreeTagger python wrapper module)? The goal is to know when the POS tagging for a ...
1
vote
1answer
135 views

Add-1 laplace smoothing for bigram implementation8

I am doing an exercise where I am determining the most likely corpus from a number of corpora when given a test sentence. I am trying to test an and-1 (laplace) smoothing model for this exercise. I ...
1
vote
1answer
84 views

Automated wh movement for turning an answer into the form of a question

I am not a linguist but I want to know if there are any parsing tools in existence that can help me do the following kind of thing: Given a sentence like the one below I would like to generate many ...
1
vote
0answers
183 views

Is there a Python lib to calculate HTER?

Is there a Python lib that calculates HTER - Human-targeted Translation Error Rate? Ideally it would expose a function that takes as parameters 1) at least one golden translation and 2) the ...