Skip to content

ExcelsiorCJH/textrank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextRank

Code for TextRank: Brining Order into Texts

Some codes and spliting files are inspired by lovit/textrank

PyQt5

Usage

in Python

from textrank import TextRank

sents = ['list of str form 1', 'list of str form 2', ...]

stopwords = ["뉴스", "기자", ...]
textrank = TextRank(tokenizer="mecab", stopwords=stopwords, method="iterative")

# sentences extraction
keysents = textrank.summarize(sents)

# keywords extraction
keywords = textrank.keywords(sents)

in Shell

# sentences extraction
$ python main.py --mode sentences --data_type news --tokenizer mecab  --topk 3
# keywords extraction
$ python main.py --mode words --data_type news --tokenizer mecab --topk 3

References

Releases

No releases published

Packages

No packages published