fanxiao commited on
Commit
2f5f670
1 Parent(s): 0a98a5f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -4
README.md CHANGED
@@ -1,13 +1,29 @@
1
  rebel-base-chinese-cndbpedia is a generation-based relation extraction model
2
 
3
- ·a SOTA chinese end-to-end relation extraction model.
4
 
5
- ·using the training method of "REBEL:Relation Extraction By End-to-end Language generation"(EMNLP Findings 2021).
6
 
7
- ·using the Distant-supervised data from cndbpedia.
8
 
9
  ·can perform SOTA in many chinese relation extraction dataset,such as lic2019,lic2020,HacRED,etc.
10
 
11
  ·easy to use,just like normal generation task.
12
 
13
- ·input is sentence,and output is linearlize triples,such as input:姚明是一名NBA篮球运动员 output:[subj]姚明[obj]NBA[rel]公司[obj]篮球运动员[rel]职业(more details can read on REBEL paper)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  rebel-base-chinese-cndbpedia is a generation-based relation extraction model
2
 
3
+ ·a SOTA chinese end-to-end relation extraction model,using bart as backbone.
4
 
5
+ ·using the training method of <REBEL:Relation Extraction By End-to-end Language generation>(EMNLP Findings 2021).
6
 
7
+ ·using the Distant-supervised data from cndbpedia,pretrained from the checkpoint of fnlp/bart-base-chinese.
8
 
9
  ·can perform SOTA in many chinese relation extraction dataset,such as lic2019,lic2020,HacRED,etc.
10
 
11
  ·easy to use,just like normal generation task.
12
 
13
+ ·input is sentence,and output is linearlize triples,such as input:姚明是一名NBA篮球运动员 output:[subj]姚明[obj]NBA[rel]公司[obj]篮球运动员[rel]职业(more details can read on REBEL paper)
14
+
15
+ using model:
16
+
17
+ from transformers import BertTokenizer, BartForConditionalGeneration
18
+ # load tokenizer
19
+ model_name = 'fnlp/bart-base-chinese'
20
+
21
+ tokenizer_kwargs = {
22
+ "use_fast": True,
23
+ "additional_special_tokens": ['<rel>', '<obj>', '<subj>'],
24
+ }
25
+
26
+ tokenizer = BertTokenizer.from_pretrained(model_name, **tokenizer_kwargs)
27
+
28
+ #using model
29
+ model = BartForConditionalGeneration.from_pretrained("fanxiao/rebel-base-chinese-cndbpedia")