forked from aneesha/RAKE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request aneesha#9 from drkatnz/master
Added setup.py to make module easily installable
- Loading branch information
Showing
12 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ __pycache__/ | |
|
||
# Distribution / packaging | ||
.Python | ||
.DS_STORE | ||
env/ | ||
bin/ | ||
build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include data/stoplists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,30 @@ | ||
RAKE | ||
==== | ||
# RAKE | ||
--- | ||
|
||
A Python implementation of the Rapid Automatic Keyword Extraction (RAKE) algorithm as described in: Rose, S., Engel, D., Cramer, N., & Cowley, W. (2010). Automatic Keyword Extraction from Individual Documents. In M. W. Berry & J. Kogan (Eds.), Text Mining: Theory and Applications: John Wiley & Sons. | ||
|
||
The source code is released under the MIT License. | ||
|
||
## Installing rake | ||
|
||
To install rake as a package, run: | ||
|
||
`python setup.py install` | ||
|
||
## Example use | ||
|
||
```python | ||
from nlp_rake import rake | ||
|
||
stoppath = 'data/stoplists/SmartStoplist.txt' | ||
|
||
rake_object = rake.Rake(stoppath, 5, 3, 4) | ||
|
||
sample_file = open("data/docs/fao_test/w2167e.txt", 'r', encoding="iso-8859-1") | ||
text = sample_file.read() | ||
|
||
keywords = rake_object.run(text) | ||
|
||
# 3. print results | ||
print("Keywords:", keywords) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import rake |
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env python | ||
|
||
from setuptools import setup | ||
|
||
setup(name='nlp_rake', | ||
version='1.0', | ||
description='Rapid Automatic Keyword Extraction (RAKE) algorithm', | ||
long_description='A Python implementation of the Rapid Automatic Keyword Extraction (RAKE) algorithm as described in: Rose, S., Engel, D., Cramer, N., & Cowley, W. (2010). Automatic Keyword Extraction from Individual Documents. In M. W. Berry & J. Kogan (Eds.), Text Mining: Theory and Applications: John Wiley & Sons.', | ||
author='zelandiya, aneesha', | ||
url='https://www.python.org/sigs/distutils-sig/', | ||
packages=['nlp_rake'], | ||
package_dir={'nlp_rake': './'}, | ||
package_data={'nlp_rake': ['data/']}, | ||
include_package_data = True, | ||
) |