letiantian / TextRank4ZH

:deciduous_tree:从中文文本中自动提取关键词和摘要
MIT License
3.25k stars 844 forks source link

How do I create my own dictionary #7

Closed jrong75 closed 8 years ago

jrong75 commented 8 years ago

I only want words in my dictionary show in the 关键词section. How do I do? Thanks!

letiantian commented 8 years ago

One is to get the words and their weight (示例), then select the words in your dictionary which have the highest weight.

Or use sort_words() and sort_sentences() in file textrank4zh/util.py.