#1263·stanza

通过排除冗余词来加快 Stanza 词汇分析器的速度

作者: mrgransky创建于 2023年7月15日更新于 2026年9月30日
标签enhancementquestion

Given:

I have a small sample document with a limited number of words as follows: d = ''' I go to school by the school bus everyday with all of my best friends. There are several students who also take the buses to school. Buses are quite cheap in my city. The city which I live in has an enormous number of brilliant schools with smart students. We have a nice math teacher in my school whose name is Jane Doe. She also teaches several other topics in our school, including physics, chemistry and sometimes literature as a substitute teacher. Other classes don't appreciate her efforts as much as my class. She must be nominated as the best school's teacher. My school is located far from my apartment. This is why, I am taking the bus to school everyday. ''' Goal:

Considering my real-world large document with more words (4000 ~ 8000 words), I would like to speed up my Stanza lemmatizer by probably excluding lemmatizing repeated words, e.g., words which has occurred more than once. I do not intend to use the set() method to obtain the unique lemmas in my result list, rather I intend to ignore lemmatizing words which have already been lemmatized.

内容来源: stanfordnlp/stanza