GPLinker事件抽取模型

模型介绍

使用方法

pip install litie
from pprint import pprint
from litie.pipelines import EventExtractionPipeline

pipeline = EventExtractionPipeline("gplinker", model_name_or_path="xusenlin/duee-gplinker", model_type="bert")
text = "油服巨头哈里伯顿裁员650人 因美国油气开采活动放缓。"
pprint(pipeline(text))

# 输出
[
  [
    {
      "event_type": "组织关系-裁员",
      "arguments": [
        {
          "role": "裁员人数",
          "argument": "650人"
        },
        {
          "role": "裁员方",
          "argument": "油服巨头哈里伯顿"
        }
      ]
    }
  ]
]

模型训练和推理的详细代码见 litie

Downloads last month
24
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no pipeline_tag.

Space using xusenlin/duee-gplinker 1