mlia-examples
mlia-examples copied to clipboard
Python and R Examples
def _calculate_phrase_scores(self, phrase_list, word_scores): phrase_scores = {} for phrase in phrase_list: phrase_score = 0 for word in phrase: phrase_score += word_scores[word] phrase_scores[" ".join(phrase)] = phrase_score return phrase_scores phrase_score += word_scores[word]...
When I run you're program I got this error, `AttributeError: 'FreqDist' object has no attribute 'inc' ` that's because latest version of `nltk` doesn't have `inc`. Rather I used `update`...
**SOURCE:** http://sujitpal.blogspot.ca/2013/03/implementing-rake-algorithm-with-nltk.html * https://github.com/sujitpal/mlia-examples/blob/master/src/salary_pred/rake_nltk.py * Adapted by author Sujit Pal from: github.com/aneesha/RAKE/rake.py * That 'adapted' code was not working properly (Py2 | Py3); e.g. the code posted on the blog...
In src/salary_pred/rake_nltk.py, with nltk 3, two lines of the example use .inc which no longer exists, and I believe the following code is needed instead: https://github.com/sujitpal/mlia-examples/blob/master/src/salary_pred/rake_nltk.py#L44 ``` for word in...
Please consider adding a license to the code in this repository. I'd like to use your implementation of the RAKE algorithm in NLTK in a commercial project.
A slight enhnacement with more seaborn
Hi I just added a few changes using the seaborn library. pip install seaborn is all you need to do in your virtualenv. I hope you like this. I'll add...