小编Bas*_*dev的帖子

使用 spacy 进行 POS 模式挖掘

我正在尝试使用 python 3 中的 spacy 从文本中提取语言特征。我的输入看起来像这样

Sent_id Text
1   I am exploring text analytics using spacy
2   amazing spacy is going to help me
Run Code Online (Sandbox Code Playgroud)

我正在通过使用我提供的特定 POS 模式将单词提取为三元组/二元组短语来寻找这样的输出。像 NOUN VERB NOUN、ADJ NOUN 等,并保留数据帧结构。如果一个句子中有多个短语,则必须用新短语复制记录。

Sent_id Text    Feature Pattern
1   I am exploring text analytics using spacy   exploring text analytics    VERB NOUN NOUN
1   I am exploring text analytics using spacy   analytics using spacy   NOUN VERB NOUN
2   amazing spacy is going to help me   amazing spacy   ADJ NOUN
Run Code Online (Sandbox Code Playgroud)

python-3.x spacy

6
推荐指数
1
解决办法
1304
查看次数

标签 统计

python-3.x ×1

spacy ×1