GuiGel commited on
Commit
5078f1e
1 Parent(s): 39ee531

Add model trained with Flair

Browse files
Files changed (2) hide show
  1. README.md +26 -0
  2. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - flair
4
+ - token-classification
5
+ - sequence-tagger-model
6
+ ---
7
+ ### Demo: How to use in Flair
8
+ Requires:
9
+ - **[Flair](https://github.com/flairNLP/flair/)** (`pip install flair`)
10
+ ```python
11
+ from flair.data import Sentence
12
+ from flair.models import SequenceTagger
13
+ # load tagger
14
+ tagger = SequenceTagger.load("GuiGel/xlm-roberta-large-flert-we-finetune-meddocan")
15
+ # make example sentence
16
+ sentence = Sentence("On September 1st George won 1 dollar while watching Game of Thrones.")
17
+ # predict NER tags
18
+ tagger.predict(sentence)
19
+ # print sentence
20
+ print(sentence)
21
+ # print predicted NER spans
22
+ print('The following NER tags are found:')
23
+ # iterate over entities and print
24
+ for entity in sentence.get_spans('ner'):
25
+ print(entity)
26
+ ```
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c4cc679639a754c3a5f346980be94b2fb942ed7cff5c1c04b127ceede8b8b15
3
+ size 3456215595