"tokenize,mwt,lemma,pos"
)
doc
=
nlp
(
"""The prospects for Britain’s orderly withdrawal from the European Union
on March 29 have receded further, even as MPs rallied to stop a no-deal scenario.
An amendment to the draft bill on the termination of London’s membership of the
bloc obliges Prime Minister Theresa May to renegotiate her withdrawal agreement
with Brussels. A Tory backbencher’s proposal calls on the government to come up
with alternatives to the Irish backstop, a central tenet of the deal Britain agreed
with the rest of the EU."""
)
接着,把一段印地语文字放出来,作为目的文本:
hindi_doc
=
nlp
(
"""केंद्र की मोदी सरकार ने शुक्रवार को अपना अंतरिम बजट पेश किया. कार्यवाहक वित्त मंत्री पीयूष गोयल ने अपने बजट में किसान, मजदूर, करदाता, महिला वर्ग समेत हर किसी के लिए बंपर ऐलान किए. हालांकि, बजट के बाद भी टैक्स को लेकर काफी कन्फ्यूजन बना रहा. केंद्र सरकार के इस अंतरिम बजट क्या खास रहा और किसको क्या मिला, आसान भाषा में यहां समझें"""
)
"Chris Manning is a nice person. Chris wrote a simple sentence. He also gives oranges to people."
print
(
text
)
# 显示服务器启动信息
print
(
'---'
)
print
(
'starting up Java Stanford CoreNLP Server...'
)
# 启动客户端进程
with