检测自然语言中的“语言”

时间:2021-06-13 03:25:51

标签: python text nlp spacy text-mining

python 中有什么方法可以检测语言。动词是由动词组成的词,但作为不同的词类起作用,例如“产品新鲜,美味,价格合理”中的“定价”。 [1]

当以下代码在 spacy 中运行时,“定价”这个词被正确地检测为动词,但是是否有任何能够将其检测为非正常动词,即口头

for token in nlp("the product is fresh , delicious , and reasonably priced"):
    print(token, token.pos_)

[1] 检索自 https://alt.qcri.org/semeval2014/task4/data/uploads/semeval14_absa_annotationguidelines.pdf

1 个答案:

答案 0 :(得分:0)

如果您使用 .tag_ 而不是 .pos_,您会得到 VBN,这是一个过去分词标签。标签基于 Penn Treebank tagset