Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1 |
---
|
2 |
license: gpl-3.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: gpl-3.0
|
3 |
---
|
4 |
+
|
5 |
+
Pre-trained word embeddings using the text of published clinical case reports.
|
6 |
+
|
7 |
+
## Getting started
|
8 |
+
|
9 |
+
```python
|
10 |
+
|
11 |
+
from gensim.models import FastText, Word2Vec, KeyedVectors # KeyedVectors are used to load the GloVe models
|
12 |
+
|
13 |
+
# Load the model
|
14 |
+
model = Word2Vec.load('w2v_oa_all_100d.bin')
|
15 |
+
|
16 |
+
# Return 100-dimensional vector representations of each word
|
17 |
+
model.wv.word_vec('diabetes')
|
18 |
+
model.wv.word_vec('cardiac_arrest')
|
19 |
+
model.wv.word_vec('lymphangioleiomyomatosis')
|
20 |
+
|
21 |
+
# Try out cosine similarity
|
22 |
+
model.wv.similarity('copd', 'chronic_obstructive_pulmonary_disease')
|
23 |
+
model.wv.similarity('myocardial_infarction', 'heart_attack')
|
24 |
+
model.wv.similarity('lymphangioleiomyomatosis', 'lam')
|
25 |
+
|
26 |
+
```
|