DerwenAI / pytextrank

Python implementation of TextRank algorithms ("textgraphs") for phrase extraction
https://derwen.ai/docs/ptr/
MIT License
2.15k stars 333 forks source link

why does the algorithm filter out the verbs? #31

Closed liuvic closed 2 years ago

liuvic commented 5 years ago

I do not know why does the algorithm filter out the verbs?

def limit_keyphrases (json_iter, phrase_limit=10): ..... for rl in lex: if rl.pos[0] != "v": if (used > phrase_limit) or (rl.rank < rank_thresh): return

ceteri commented 5 years ago

Check the v2.0.0 release, where that can be parameterized by updating the TextRank.pos_kept list.