spaCy: Word in vocabulary
问题 I try to do typo correction with spaCy, and for that I need to know if a word exists in the vocab or not. If not, the idea is to split the word in two until all segments do exist. As example, "ofthe" does not exist, "of" and "the" do. So I first need to know if a word exists in the vocab. That's where the problems start. I try: for token in nlp("apple"): print(token.lemma_, token.lemma, token.is_oov, "apple" in nlp.vocab) apple 8566208034543834098 True True for token in nlp("andshy"): print