sujitpal / mlia-examples Goto Github PK
View Code? Open in Web Editor NEWPython and R Examples
Python and R Examples
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 phrase:
word_freq[word] += 1
word_degree[word] += degree # other words
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.
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]
KeyError: 'compatibility'
help me to solve this error.
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
on line 348 and 349. like this:
word_freq.update([word])
word_degree.update([word, degree]) # other words
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.