UGARIT commited on
Commit
4afbe90
·
verified ·
1 Parent(s): 88498af

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -1
README.md CHANGED
@@ -13,4 +13,37 @@ widget:
13
  ---
14
  # Named Entity Recognition for Ancient Greek
15
 
16
- Pretrained NER tagging model for ancient Greek
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  ---
14
  # Named Entity Recognition for Ancient Greek
15
 
16
+ Pretrained NER tagging model for ancient Greek
17
+
18
+ # Usage
19
+
20
+ ```python
21
+ from transformers import pipeline
22
+
23
+ # create pipeline for NER
24
+ ner = pipeline('ner', model="UGARIT/grc-ner-bert", aggregation_strategy = 'first')
25
+ ner("ταῦτα εἴπας ὁ Ἀλέξανδρος παρίζει Πέρσῃ ἀνδρὶ ἄνδρα Μακεδόνα ὡς γυναῖκα τῷ λόγῳ · οἳ δέ , ἐπείτε σφέων οἱ Πέρσαι ψαύειν ἐπειρῶντο , διεργάζοντο αὐτούς .")
26
+ ```
27
+ Output
28
+ ```
29
+ [{'entity_group': 'PER',
30
+ 'score': 0.9999349,
31
+ 'word': 'αλεξανδρος',
32
+ 'start': 14,
33
+ 'end': 24},
34
+ {'entity_group': 'NORP',
35
+ 'score': 0.9369563,
36
+ 'word': 'περση',
37
+ 'start': 33,
38
+ 'end': 38},
39
+ {'entity_group': 'NORP',
40
+ 'score': 0.60742134,
41
+ 'word': 'μακεδονα',
42
+ 'start': 51,
43
+ 'end': 59},
44
+ {'entity_group': 'NORP',
45
+ 'score': 0.9900457,
46
+ 'word': 'περσαι',
47
+ 'start': 105,
48
+ 'end': 111}]
49
+ ```