Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

nlp generate parse tree in python

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())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nlp #generate #parse #tree #python
ADD COMMENT
Topic
Name
3+6 =