Commit
·
4974c4d
1
Parent(s):
7a662ef
Update README.md
Browse files
README.md
CHANGED
@@ -27,10 +27,11 @@ Then you can use the model like this:
|
|
27 |
|
28 |
```python
|
29 |
from WordTransformer import WordTransformer
|
|
|
30 |
|
31 |
model = WordTransformer('pierluigic/xl-lexeme')
|
32 |
-
|
33 |
-
|
34 |
```
|
35 |
|
36 |
|
|
|
27 |
|
28 |
```python
|
29 |
from WordTransformer import WordTransformer
|
30 |
+
from InputExample import InputExample
|
31 |
|
32 |
model = WordTransformer('pierluigic/xl-lexeme')
|
33 |
+
examples = InputExample(texts=["the quick fox jumps over the lazy dog"], positions=[[10,13]])
|
34 |
+
fox_embedding = model.encode(examples)[0] #The embedding of the target word "fox"
|
35 |
```
|
36 |
|
37 |
|