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

Doesn't work for Dutch language #228

Closed Tauvic closed 1 year ago

Tauvic commented 1 year ago

import spacy nlp = spacy.load('nl_core_news_lg') nlp.add_pipe("textrank")

ValueError: [E002] Can't find factory for 'textrank' for language Dutch (nl). This usually happens when spaCy calls nlp.create_pipe with a custom component name that's not registered on the current language class. If you're using a Transformer, make sure to install 'spacy-transformers'. If you're using a custom component, make sure you've added the decorator @Language.component (for function components) or @Language.factory (for class components).

0dB commented 1 year ago

It looks like you are missing import pytextrank ? When I add that it works for me.