File size: 850 Bytes
f22791f
 
 
 
 
 
 
 
 
 
 
 
ba9c6c6
e6f30f0
ba9c6c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
language:
- zh
tags:
- relation extraction
license: apache-2.0
datasets:
- DuIE
metrics:
- micro f1
---

# GPLinker关系抽取模型

## 模型介绍

+ 数据集:百度 `DUIE2.0` 信息抽取

+ 模型方法:[GPLinker:基于GlobalPointer的实体关系联合抽取](https://kexue.fm/archives/8888)

## 使用方法

```commandline
pip install lightningnlp
```

```python
from pprint import pprint
from lightningnlp.task.relation_extraction import RelationExtractionPipeline

pipline = RelationExtractionPipeline(model_name_or_path="xusenlin/duie-gplinker", model_name="gplinker", model_type="bert")
text = "查尔斯·阿兰基斯(Charles Aránguiz),1989年4月17日出生于智利圣地亚哥,智利职业足球运动员,司职中场,效力于德国足球甲级联赛勒沃库森足球俱乐部。"
pprint(pipline(text))
```