有没有人有过修改以下(3.6)Python代码以获得法语而非英语词性标注的经验:
# *** POS tagging *** with CoreNLP
from nltk.tag.stanford import CoreNLPPOSTagger
CoreNLPPOSTagger(url='http://localhost:9000').tag('What is the airspeed of an unladen swallow ?'.split())
同样,对于解析:
# *** Parsing *** with CoreNLP
from nltk.parse.corenlp import CoreNLPParser
stanford_parser = CoreNLPParser()
json_result = stanford_parser.api_call('He is fine')
for sentence in json_result['sentences']:
for token in sentence['tokens']:
print(token)
所有这些代码运行平稳。你知道吗
谢谢你的帮助。你知道吗
L
目前没有回答
相关问题 更多 >
编程相关推荐