Skip to content

Commit

Permalink
Fix PR davidadamojr#7 on original repo and change default number of s…
Browse files Browse the repository at this point in the history
…ummary words to 150 (works better IMO)
  • Loading branch information
abehmiel authored Oct 6, 2017
1 parent 742f604 commit b3222a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion textrank/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import networkx as nx
import nltk
import os
import sys
reload(sys)
sys.setdefaultencoding('utf8')


def setup_environment():
Expand Down Expand Up @@ -161,7 +164,7 @@ def extract_key_phrases(text):
return modified_key_phrases


def extract_sentences(text, summary_length=100, clean_sentences=False, language='english'):
def extract_sentences(text, summary_length=150, clean_sentences=False, language='english'):
"""Return a paragraph formatted summary of the source text.
:param text: A string.
Expand Down

0 comments on commit b3222a9

Please sign in to comment.