918 B
918 B
jupytext, kernelspec
| jupytext | kernelspec | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
srl
Semantic Role Labeling (SRL) is one shallow semantic parsing that produces predicate-argument structures which are semantic roles (or participants) such as agent, patient, and theme associated with verbs.
Inputs to SRL are tokenized sentences:
```{hint}
Feed in multiple sentences at once for faster speed!
```
:tags: [output_scroll]
import hanlp
srl = hanlp.load(hanlp.pretrained.srl.CPB3_SRL_ELECTRA_SMALL)
srl(['男孩', '希望', '女孩', '相信', '他', '。'])
All the pre-trained labelers and their details are listed below.
.. automodule:: hanlp.pretrained.srl
:members: