Update README.md
Browse files
README.md
CHANGED
@@ -23,19 +23,22 @@ This model was created with two key goals:
|
|
23 |
|
24 |
In theory this model should be able to detect and ignore metonyms. For example in the sentence:
|
25 |
|
26 |
-
`Manchester played Liverpool last night in
|
27 |
|
28 |
-
Both Manchester and Liverpool refer to football teams, therefore the model outputs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
-
`[
|
31 |
-
{
|
32 |
-
"entity_group": "location",
|
33 |
-
"score": 0.99784255027771,
|
34 |
-
"word": "london",
|
35 |
-
"start": 42,
|
36 |
-
"end": 48
|
37 |
-
}
|
38 |
-
]`
|
39 |
|
40 |
|
41 |
|
@@ -52,20 +55,20 @@ generator = pipeline(
|
|
52 |
aggregation_strategy="first",
|
53 |
)
|
54 |
|
55 |
-
out = generator("I
|
56 |
```
|
57 |
|
58 |
-
|
59 |
|
60 |
```python
|
61 |
-
[
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
```
|
|
|
23 |
|
24 |
In theory this model should be able to detect and ignore metonyms. For example in the sentence:
|
25 |
|
26 |
+
`Manchester played Liverpool last night in Liverpool.`
|
27 |
|
28 |
+
Both Manchester and the first Liverpool mention refer to football teams, therefore the model outputs:
|
29 |
+
|
30 |
+
```python
|
31 |
+
[
|
32 |
+
{
|
33 |
+
"entity_group": "location",
|
34 |
+
"score": 0.9975672,
|
35 |
+
"word": "liverpool",
|
36 |
+
"start": 42,
|
37 |
+
"end": 51,
|
38 |
+
}
|
39 |
+
]
|
40 |
+
```
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
|
44 |
|
|
|
55 |
aggregation_strategy="first",
|
56 |
)
|
57 |
|
58 |
+
out = generator("I like reading books. I live in Reading.")
|
59 |
```
|
60 |
|
61 |
+
`out` gives:
|
62 |
|
63 |
```python
|
64 |
+
[
|
65 |
+
{
|
66 |
+
"entity_group": "location",
|
67 |
+
"score": 0.94123614,
|
68 |
+
"word": "reading",
|
69 |
+
"start": 32,
|
70 |
+
"end": 39,
|
71 |
+
}
|
72 |
+
]
|
73 |
+
|
74 |
```
|