Update README.md
Browse files
README.md
CHANGED
@@ -14,7 +14,7 @@ library_name: fasttext
|
|
14 |
<table style="width:100%;height:100%">
|
15 |
<tr>
|
16 |
<td colspan=2>
|
17 |
-
<h2>FastText</h2>
|
18 |
</td>
|
19 |
</tr>
|
20 |
<tr style="width:100%;height:100%">
|
@@ -50,6 +50,26 @@ for e in examples:
|
|
50 |
0.5771946
|
51 |
0.8870213
|
52 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
<div class="inline-flex flex-col" style="line-height: 1.5;padding-right:50px">
|
55 |
<div style="text-align: center; margin-top: 3px; font-size: 16px; font-weight: 800">Editor</div>
|
|
|
14 |
<table style="width:100%;height:100%">
|
15 |
<tr>
|
16 |
<td colspan=2>
|
17 |
+
<h2>FastText Sr</h2>
|
18 |
</td>
|
19 |
</tr>
|
20 |
<tr style="width:100%;height:100%">
|
|
|
50 |
0.5771946
|
51 |
0.8870213
|
52 |
```
|
53 |
+
```python
|
54 |
+
from gensim.models.fasttext import load_facebook_model
|
55 |
+
model = load_facebook_model("TeslaFT.bin")
|
56 |
+
examples = [
|
57 |
+
("dim", "zavesa"),
|
58 |
+
("staklo", "zavesa"),
|
59 |
+
("ormar", "zavesa"),
|
60 |
+
("prozor", "zavesa"),
|
61 |
+
("draperija", "zavesa")
|
62 |
+
]
|
63 |
+
for e in examples:
|
64 |
+
model.wv.cosine_similarities(ft.wv[e[0]], ft.wv[[e[1]]])[0]
|
65 |
+
```
|
66 |
+
```
|
67 |
+
0.5305264
|
68 |
+
0.7095266
|
69 |
+
0.6041575
|
70 |
+
0.5771946
|
71 |
+
0.8870213
|
72 |
+
```
|
73 |
|
74 |
<div class="inline-flex flex-col" style="line-height: 1.5;padding-right:50px">
|
75 |
<div style="text-align: center; margin-top: 3px; font-size: 16px; font-weight: 800">Editor</div>
|