rtapiaoregui / collocater

Spacy integrable pipeline component to identify collocations in text
MIT License
5 stars 3 forks source link

dead loop #1

Open rebrn opened 4 years ago

rebrn commented 4 years ago

If the input text is "environmentalists" it will stuck in a dead loop

rtapiaoregui commented 4 years ago

Hi,

Thanks a lot for raising this issue, it has made me stumble upon a mistake I'd made in the readme page. Regarding the issue itself, unfortunately, I am not able to replicate it. Would you mind pasting the code that's generating it over here, so that I can keep looking into it?

rebrn commented 4 years ago

from collocater.collocater import Collocater import spacy

collie = Collocater.loader() nlp = spacy.load('en_core_web_sm') nlp.add_pipe(collie)

text = "An environmentalist can be considered a supporter of the goals of the environmental movement." doc = nlp(text) print(doc._.collocs)

If the input contains "environmentalist", the thread will die but it will be ok in Windows and not in Centos, very strange