olgaduchovny commited on
Commit
0484d16
1 Parent(s): bd03818

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -2
README.md CHANGED
@@ -44,7 +44,8 @@ options = ["LOC", "PER", "ORG", "MISC"]
44
  instruction = "please extract entities and their types from the input sentence, " \
45
  "all entity types are in options"
46
 
47
- text = "any asian cuisine around"
 
48
 
49
  generation_kwargs = {
50
  "num_beams": 2,
@@ -58,5 +59,10 @@ pred_spans = model.predict(
58
  options=options
59
  )
60
 
61
- >>> [(4, 9, 'Cuisine'), (18, 24, 'Location')]
 
 
 
 
 
62
  ```
 
44
  instruction = "please extract entities and their types from the input sentence, " \
45
  "all entity types are in options"
46
 
47
+ text = "Once I visited Sovok in Nizny Novgorod. I had asian wok there. It was the best WOK i ever had"\
48
+ "It was cheap but lemonades cost 5 dollars."
49
 
50
  generation_kwargs = {
51
  "num_beams": 2,
 
59
  options=options
60
  )
61
 
62
+ >>> ('sovok is a Restaurant_Name, Nizny Novgorod is a Location, asian wok is a Dish, cheap is a Price, lemonades is a Dish, 5 dollars is a Price.',
63
+ [(24, 38, 'Location'),
64
+ (46, 55, 'Dish'),
65
+ (100, 105, 'Price'),
66
+ (110, 119, 'Dish'),
67
+ (125, 134, 'Price')])
68
  ```