📜  nlp 在 python 代码示例中生成解析树

📅  最后修改于: 2022-03-11 14:45:32.705000             🧑  作者: Mango

代码示例5
from nltk.data import find
from bllipparser import RerankingParser

model_dir = find('models/bllip_wsj_no_aux').path
parser = RerankingParser.from_unified_model_dir(model_dir)

best = parser.parse("The old oak tree from India fell down.")

print(best.get_reranker_best())
print(best.get_parser_best())