Constituency Parsing
Constituency Parsing
136/800
Introduction
Constituency parsing aims to extract a constituency-based parse tree from a sentence that represents its syntactic structure according to a phrase structure grammar.
How to Use
Apply for Auth
We are hosting a non-commercial API service and you are welcome to apply for an auth key. An auth key is a password which gives you access to our API and protects our server from being abused.
Create RESTful Client
Create a HanLPClient
:
from hanlp_restful import HanLPClient # Support en: English, zh: Chinese, ja: Japanese, mul: Multilingual HanLP = HanLPClient('https://www.hanlp.com/api', auth=None, language='mul')
Parse
Set tasks='con'
to perform CON:
HanLP('''In 2021, HanLPv2.1 delivers state-of-the-art multilingual NLP techniques to production environments. 2021年、HanLPv2.1は次世代の最先端多言語NLP技術を本番環境に導入します。 2021年 HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。''', tasks='con').pretty_print()
Native APIs
Please refer to docs.