相关疑难解决方法(0)

词汇化与词干化之间的真正区别是什么?

我什么时候使用?

另外...... NLTK的词形还原取决于词性?如果它是不是更准确?

python nlp nltk lemmatization

108
推荐指数
8
解决办法
6万
查看次数

如何在熊猫数据框中提取单个单词(不包含较大单词)?

我想提取这样的词:

a dog ==> dog
some dogs ==> dog
dogmatic ==> None
Run Code Online (Sandbox Code Playgroud)

有一个类似的链接: 从pandas DataFrame中的文本中提取子字符串作为新列

但这不能满足我的要求。

从此数据帧:

df = pd.DataFrame({'comment': ['A likes cat', 'B likes Cats',
                               'C likes cats.', 'D likes cat!', 
                               'E is educated',
                              'F is catholic',
                              'G likes cat, he has three of them.',
                              'H likes cat; he has four of them.',
                              'I adore !!cats!!',
                              'x is dogmatic',
                              'x is eating hotdogs.',
                              'x likes dogs, he has three of them.',
                              'x likes dogs; he has four of them.', …
Run Code Online (Sandbox Code Playgroud)

python regex pandas

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

标签 统计

python ×2

lemmatization ×1

nlp ×1

nltk ×1

pandas ×1

regex ×1