Update README.md
Browse files
README.md
CHANGED
@@ -69,8 +69,8 @@ Use the entity embeddings to predict the subsumption relationships between them.
|
|
69 |
|
70 |
```python
|
71 |
# suppose we want to compare "personal computer" and "computer", "berry" and "fruit"
|
72 |
-
child_entity_embeddings = model.encode(["personal computer", "berry"])
|
73 |
-
parent_entity_embeddings = model.encode(["computer", "fruit"])
|
74 |
|
75 |
# compute the hyperbolic distances and norms of entity embeddings
|
76 |
dists = model.manifold.dist(child_entity_embeddings, parent_entity_embeddings)
|
|
|
69 |
|
70 |
```python
|
71 |
# suppose we want to compare "personal computer" and "computer", "berry" and "fruit"
|
72 |
+
child_entity_embeddings = model.encode(["personal computer", "berry"], convert_to_tensor=True)
|
73 |
+
parent_entity_embeddings = model.encode(["computer", "fruit"], convert_to_tensor=True)
|
74 |
|
75 |
# compute the hyperbolic distances and norms of entity embeddings
|
76 |
dists = model.manifold.dist(child_entity_embeddings, parent_entity_embeddings)
|