cjber commited on
Commit
bc1b4c8
1 Parent(s): b52b9e9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -23
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 London.`
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 live north of liverpool in Waterloo")
56
  ```
57
 
58
- Out gives:
59
 
60
  ```python
61
- [{'entity_group': 'location',
62
- 'score': 0.94054973,
63
- 'word': 'liverpool',
64
- 'start': 16,
65
- 'end': 25},
66
- {'entity_group': 'location',
67
- 'score': 0.99520856,
68
- 'word': 'waterloo',
69
- 'start': 29,
70
- 'end': 37}]
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
  ```