Update README.md
Browse files
README.md
CHANGED
@@ -16,13 +16,18 @@ Biomedical Entity Mention Linking for diseases:
|
|
16 |
Requires:
|
17 |
|
18 |
- **[Flair](https://github.com/flairNLP/flair/)>=0.14.0** (`pip install flair` or `pip install git+https://github.com/flairNLP/flair.git`)
|
19 |
-
|
20 |
```python
|
21 |
from flair.data import Sentence
|
22 |
-
from flair.
|
23 |
-
from flair.
|
24 |
-
|
25 |
-
sentence = Sentence(
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
# load hunflair to detect the entity mentions we want to link.
|
28 |
tagger = Classifier.load("hunflair-disease")
|
|
|
16 |
Requires:
|
17 |
|
18 |
- **[Flair](https://github.com/flairNLP/flair/)>=0.14.0** (`pip install flair` or `pip install git+https://github.com/flairNLP/flair.git`)
|
19 |
+
|
20 |
```python
|
21 |
from flair.data import Sentence
|
22 |
+
from flair.models import Classifier, EntityMentionLinker
|
23 |
+
from flair.tokenization import SciSpacyTokenizer
|
24 |
+
|
25 |
+
sentence = Sentence(
|
26 |
+
"The mutation in the ABCD1 gene causes X-linked adrenoleukodystrophy, "
|
27 |
+
"a neurodegenerative disease, which is exacerbated by exposure to high "
|
28 |
+
"levels of mercury in dolphin populations.",
|
29 |
+
use_tokenizer=SciSpacyTokenizer()
|
30 |
+
)
|
31 |
|
32 |
# load hunflair to detect the entity mentions we want to link.
|
33 |
tagger = Classifier.load("hunflair-disease")
|