大家好,小弟目前在使用网路上常见的SnowNLP
然后我在网路上看到以下网址可供下载这工具:
github.com/isnowfy/snownlp
在这个工具我看到可以使用分别以下三个程式码执行,包括分词、词性标注、情感分析
以下是他们提供的分词程式码
from snownlp import seg
seg.train('data.txt')
seg.save('seg.marshal')
以下是他们提供的词性程式码
from snownlp import tag
tag.train('199801.txt')
tag.save('tag.marshal')
以下是他们提供的情感分析程式码
from snownlp import sentiment
sentiment.train('neg.txt', 'pos.txt')
sentiment.save('sentiment.marshal')
大家好,小弟目前在使用网路上常见的SnowNLP
然后我在网路上看到以下网址可供下载这工具:
github.com/isnowfy/snownlp
在这个工具我看到可以使用分别以下三个程式码执行,包括分词、词性标注、情感分析
以下是他们提供的分词程式码
from snownlp import seg
seg.train(‘data.txt’)
seg.save(‘seg.marshal’)
复制代码
以下是他们提供的词性程式码
from snownlp i