Semantic Role Labeling

Semantic Role Labeling



Semantic role labeling aims to model the predicate-argument structure of a sentence and is often described as answering “Who did what to whom”. BIO notation is typically used for semantic role labeling.


Although UD covers 130 languages, OntoNotes (NER, CON, SRL) covers only English, Chinese and Arabic. So NER/CON/SRL of languages other than the 3 are considered as Zero-Shot and their accuracies can be very low.

How to Use

Apply for Auth

We are hosting a non-commercial API service and you are welcome to apply for an auth keyopen in new window. 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 HanLPClientopen in new window:

      from hanlp_restful import HanLPClient
# Fill in your auth
HanLP = HanLPClient('', auth=None, language='mul')



Set tasks='srl' to perform SRL:

HanLP('''In 2021, HanLPv2.1 delivers state-of-the-art multilingual NLP techniques to production environments. 
2021年 HanLPv2.1为生产环境带来次世代最先进的多语种NLP技术。''', tasks='srl').pretty_print()


Native APIs

Please refer to docsopen in new window.

Last update: 7/3/2022, 8:02:35 PM
Contributors: hankcs