imvladikon commited on
Commit
1aedbd3
·
1 Parent(s): 819c939

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -1
README.md CHANGED
@@ -12,7 +12,40 @@ model-index:
12
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
  should probably proofread and complete it, then remove this comment. -->
14
 
15
- # ner-news-t5-large
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  This model is a fine-tuned version of [t5-large](https://huggingface.co/t5-large) on the private(en) dataset.
18
  It achieves the following results on the evaluation set:
 
12
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
  should probably proofread and complete it, then remove this comment. -->
14
 
15
+ # NER using T5-large on small dataset
16
+
17
+ Simple experimental model that was trained in 3 epochs on very small dataset (~100 examples)
18
+
19
+ ## Usage
20
+
21
+ ```python
22
+ from transformers import AutoTokenizer, AutoModelForTokenClassification, NerPipeline
23
+
24
+ model = AutoModelForTokenClassification.from_pretrained("imvladikon/t5-english-ner", trust_remote_code=True)
25
+ tokenizer = AutoTokenizer.from_pretrained("imvladikon/t5-english-ner", trust_remote_code=True)
26
+
27
+ pipe = NerPipeline(model=model, tokenizer=tokenizer, aggregation_strategy="max")
28
+ print(pipe("London is the capital city of England and the United Kingdom"))
29
+ """
30
+ [{'entity_group': 'LOCATION',
31
+ 'score': 0.84536326,
32
+ 'word': 'London',
33
+ 'start': 0,
34
+ 'end': 6},
35
+ {'entity_group': 'LOCATION',
36
+ 'score': 0.8957489,
37
+ 'word': 'England',
38
+ 'start': 30,
39
+ 'end': 37},
40
+ {'entity_group': 'LOCATION',
41
+ 'score': 0.73186326,
42
+ 'word': 'UnitedKingdom',
43
+ 'start': 46,
44
+ 'end': 60}]
45
+ """
46
+ ```
47
+
48
+
49
 
50
  This model is a fine-tuned version of [t5-large](https://huggingface.co/t5-large) on the private(en) dataset.
51
  It achieves the following results on the evaluation set: