Skip to main content

Questions tagged [python]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
78 views

Where to find English POS words?

Given a POS (part of speech), tag, and dependency for words, where can I find words that have the same POS, tag, and dependency? I only need a list of words by (pos,tag) and do not need code for this (...
rlgekdcgc's user avatar
2 votes
2 answers
823 views

Finding phonetic similarity of names in different languages

I am trying to come up with a way using Python to find phonetic similarities between how differently written names with different meanings in different languages might sound alike. Names can be ...
Lndit39's user avatar
  • 21
0 votes
1 answer
57 views

Python's treetaggerwrapper does not recognize numbers

I'm using treetaggerwrapper to stem Italian texts and I'm interested in the final lemmas. As you can see, while other parts of speech are transformed correctly, all numbers are changed to @card@. Is ...
we_are_always_learning's user avatar
1 vote
2 answers
855 views

How to extract specific data from a TextGrid file?

I'm new here. Just found that there is a linguistics community on stack exchange! I have a TextGrid file that has been output from a forced aligner, webMAUS and I mainly want to understand how to ...
joannea99's user avatar
0 votes
0 answers
4k views

ValueError: Can not squeeze dim[1], expected a dimension of 1

I want to buil a sequential LSTM model that predicts binary classification at every time step. More exactly, I want to predict an output for every paragraph in my texts (48 is the number of paragraphs)...
maeven's user avatar
  • 11
1 vote
1 answer
121 views

Seq2seq translation model. ValueError: An operation has `None` for gradient

So I'm trying to build a seq2seq encoder-decoder network for a translation task. I've been stuck now for a while, I have no idea how to fix the error I'm getting and would appreciate any help. My code ...
maeven's user avatar
  • 11
6 votes
1 answer
444 views

How to make a Corpus? (selecting a good structure)

I'm making a Corpus. I have searched for good practices on how to build it. I've downloaded some Corpus to check their internal structure and the extension file, but I didn't find many. So, I am lost ...
XOREZ's user avatar
  • 63
-3 votes
1 answer
398 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 ...
bemzoo's user avatar
  • 17
1 vote
0 answers
60 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 ...
bemzoo's user avatar
  • 17
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
499 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
1 vote
2 answers
1k 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,...
Adam Bittlingmayer's user avatar
1 vote
1 answer
1k 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', "'...
Touhidul Alam's user avatar
2 votes
1 answer
130 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++ ...
jon_simon's user avatar
  • 151
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
3 votes
0 answers
110 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,...
Tina_seven's user avatar
7 votes
1 answer
454 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 ...
Riken Shah's user avatar
0 votes
1 answer
3k 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 ...
Héctor's user avatar
  • 19
1 vote
1 answer
133 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 ...
user915's user avatar
  • 11
2 votes
0 answers
850 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 ...
Adam Bittlingmayer's user avatar