-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo.py
More file actions
15 lines (13 loc) · 724 Bytes
/
demo.py
File metadata and controls
15 lines (13 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from beatricevec import BeatriceVec
corpus = [
"Learning strategies for post-literacy and continuing education in Kenya, Nigeria, Tanzania, and the United Kingdom",
"Family planning and sexual behavior in the era of HIVAIDS the case of Nakuru District Kenya.. Recently the prevalence of contraceptive use has increased in Kenya.",
"ECHIDNOPSIS GLOBOSA SPNOV ASCLEPIADACEAESTAPELIEAE FROM YEMEN. The new species Echidnopsis globosa from rocky hillsides on Limestone in the Hadramaut Region in Yemen is described and illustrated.",
]
embedder = BeatriceVec(corpus)
embedder.build_vocab()
embedder.initialize_word_vectors()
embedder.train()
embeddings = embedder.get_embeddings()
lst = list(embeddings)
print(lst)