Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed code. Yet to clean it up. #15

Merged
merged 4 commits into from
Apr 2, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Namma scores is entered into a textrank
  • Loading branch information
sudarshansk committed Apr 2, 2017
commit 165805a53acf70f1864bd6b1e37ca0b0d0afad04
2 changes: 1 addition & 1 deletion LexChain/Boochain.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ def count_words(summary):
#print final_summary
return namscores

print LexicalChain(verbose=1)
#print LexicalChain(verbose=1)
Binary file modified LexChain/Boochain.pyc
Binary file not shown.
11 changes: 6 additions & 5 deletions Lexrank/summa/textrank.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from summarizer import summarize
from keywords import keywords

#sys.path.append('../../LexChain')
#from Boochain import LexicalChain
sys.path.append('../../LexChain')
from Boochain import LexicalChain

# Types of summarization
SENTENCE = 0
Expand Down Expand Up @@ -60,8 +60,9 @@ def usage():
print help_text


def textrank(text, summarize_by=SENTENCE, ratio=0.2, words=None):
#namscores = LexicalChain()
def textrank(text, path, summarize_by=SENTENCE, ratio=0.2, words=None):
namscores = LexicalChain(fileName=path)
print namscores
if summarize_by == SENTENCE:
return summarize(text, ratio, words)
else:
Expand All @@ -74,7 +75,7 @@ def main():
with open(path) as file:
text = file.read()

print textrank(text, summarize_by, ratio, words)
print textrank(text, path, summarize_by, ratio, words)


if __name__ == "__main__":
Expand Down
Binary file modified Lexrank/summa/textrank.pyc
Binary file not shown.