regel-corpus commited on
Commit
deaf117
1 Parent(s): 66ef034

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +39 -0
  3. pytorch_model.bin +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - flair
4
+ - token-classification
5
+ - sequence-tagger-model
6
+ ---
7
+
8
+ ### Demo: How to use in Flair
9
+
10
+ Requires:
11
+
12
+ - **[Flair](https://github.com/flairNLP/flair/)>=0.14.0** (`pip install flair` or `pip install git+https://github.com/flairNLP/flair.git`)
13
+
14
+ ```python
15
+ from flair.data import Sentence
16
+ from flair.nn import Classifier
17
+ from flair.tokenization import SciSpacyTokenizer
18
+
19
+ # load tagger
20
+ tagger = Classifier.load("regel-corpus/hunflair2-regel-tissue")
21
+
22
+ # make example sentence
23
+ sentence = Sentence("TNF-like factor that is both produced by osteoblasts, mesenchymal cells, "
24
+ "and activated T cells and required for osteoclast maturation and survival."
25
+ use_tokenizer=SciSpacyTokenizer())
26
+
27
+ # predict NER tags
28
+ tagger.predict(sentence)
29
+
30
+ # print sentence
31
+ print(sentence)
32
+
33
+ # print predicted NER spans
34
+ print('The following NER tags are found:')
35
+
36
+ # iterate over entities and print
37
+ for entity in sentence.get_spans('ner'):
38
+ print(entity)
39
+ ```
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f75e17e418e18623245b1d33d51b14f4f9d47aa4be8343e2fc26cc301b8c2bb
3
+ size 433760111