下面的代码将句子分解为单独的标记,输出如下:
"cloud" "computing" "is" "benefiting" " major" "manufacturing" "companies"
import en_core_web_sm
nlp = en_core_web_sm.load()
doc = nlp("Cloud computing is benefiting major manufacturing companies")
for token in doc:
print(token.text)
我理想中的要求是将'cloud computing'作为一个单词一起阅读。
基本上我正在寻找一个双字组合。Spacy是否有任何功能允许Bi gram或Tri grams?