Downloads · 30 days
18
3% of all-time downloads
xusenlin/duie-gplinker
duie-gplinker is a machine learning model from xusenlin. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
18
3% of all-time downloads
All-time downloads
645
Public
Repo size
1.2 GB
Likes
9
Public
Click a slice to open those files.
.bin408 MB · 100%
From the Hugging Face model README
数据集:百度 DUIE2.0 信息抽取
pip install litie
from pprint import pprint
from litie.pipelines import RelationExtractionPipeline
pipeline = RelationExtractionPipeline("gplinker", model_name_or_path="xusenlin/duie-gplinker", model_type="bert")
text = "查尔斯·阿兰基斯(Charles Aránguiz),1989年4月17日出生于智利圣地亚哥,智利职业足球运动员,司职中场,效力于德国足球甲级联赛勒沃库森足球俱乐部。"
pprint(pipeline(text))
# 输出
[
{
"出生地": [
{
"subject": "查尔斯·阿兰基斯",
"object": "智利圣地亚哥"
}
],
"国籍": [
{
"subject": "查尔斯·阿兰基斯",
"object": "智利"
}
],
"出生日期": [
{
"subject": "查尔斯·阿兰基斯",
"object": "1989年4月17日"
}
]
}
]
模型训练和推理的详细代码见 litie