snipsco / snips-nlu

Snips Python library to extract meaning from text
https://snips-nlu.readthedocs.io
Apache License 2.0
3.9k stars 512 forks source link

Utterance not picking up slots correctly #856

Open ffos opened 5 years ago

ffos commented 5 years ago

Main point

snips/number slot is not being detected due to the presence of other intents with similar utterance pattern, even when using intent filter

Long description:

No Bug case:

Template:

---
type: intent
name: find_suburb
slots:
  - {name: suburb, entity: suburb}
  - {name: state, entity: state}
  - {name: postcode, entity: snips/number}
utterances:
  - '[suburb](petersham)'
  - 'in [suburb](petersham)'
  - 'that''s in [suburb](petersham)'
  - 'that''s [suburb](petersham)'
  - 'around [suburb](petersham)'
  - 'close to [suburb](petersham)'
  - 'near [suburb](petersham)'
  - 'somewhere near [suburb](petersham)'
  - 'somewhere in [suburb](petersham)'
  - 'by [suburb](petersham)'
  - 'nearby [suburb](petersham)'
  - 'within close distance to [suburb](petersham)'
  - 'within close distance from [suburb](petersham)'
  - 'not very far from [suburb](petersham)'
  - 'not too far from [suburb](petersham)'
  - 'within a few kilometers of [suburb](petersham)'
  - 'within a few kilometers from [suburb](petersham)'
  - 'I wanted one in [suburb](petersham)'
  - 'I''m looking for one in [suburb](petersham)'
  - 'I''d like one in [suburb](petersham)'
  - 'The [suburb](petersham) area'
  - 'My suburb is [suburb](petersham)'
  - 'not that, it is [suburb](petersham)'
  - 'not that, in [suburb](petersham)'
  - 'no [suburb](petersham)'
  - 'no I need in [suburb](petersham)'
  - 'no in [suburb](petersham)'
  - 'no near [suburb](petersham)'
  - 'no close to [suburb](petersham)'
  - 'no nearby [suburb](petersham)'
  - 'no around [suburb](petersham)'
  - 'no no in [suburb](petersham)'
  - 'no no near [suburb](petersham)'
  - 'no no close to [suburb](petersham)'
  - 'no no nearby [suburb](petersham)'
  - 'no no around [suburb](petersham)'
  - 'nope I need in [suburb](petersham)'
  - 'nope in [suburb](petersham)'
  - 'nope near [suburb](petersham)'
  - 'nope close to [suburb](petersham)'
  - 'nope nearby [suburb](petersham)'
  - 'nope around [suburb](petersham)'
  - 'sorry I need in [suburb](petersham)'
  - 'sorry in [suburb](petersham)'
  - 'sorry near [suburb](petersham)'
  - 'sorry close to [suburb](petersham)'
  - 'sorry nearby [suburb](petersham)'
  - 'sorry around [suburb](petersham)'
  - 'yes [suburb](petersham)'
  - 'yes I need in [suburb](petersham)'
  - 'yes in [suburb](petersham)'
  - 'yes near [suburb](petersham)'
  - 'yes close to [suburb](petersham)'
  - 'yes nearby [suburb](petersham)'
  - 'yes around [suburb](petersham)'
  - 'yes in [suburb](petersham)'
  - 'yup I need in [suburb](petersham)'
  - 'yup in [suburb](petersham)'
  - 'yep near [suburb](petersham)'
  - '[suburb](petersham) [state](NSW)'

  - 'in [suburb](petersham) [state](NSW)'
  - 'that''s in [suburb](petersham) [state](NSW)'
  - 'that''s [suburb](petersham) [state](NSW)'
  - 'around [suburb](petersham) [state](NSW)'
  - 'close to [suburb](petersham) [state](NSW)'
  - 'near [suburb](petersham) [state](NSW)'
  - 'somewhere near [suburb](petersham) [state](NSW)'
  - 'by [suburb](petersham) [state](NSW)'
  - 'nearby [suburb](petersham) [state](NSW)'
  - 'within close distance to [suburb](petersham) [state](NSW)'
  - 'within close distance from [suburb](petersham) [state](NSW)'
  - 'not very far from [suburb](petersham) [state](NSW)'
  - 'not too far from [suburb](petersham) [state](NSW)'
  - 'within a few kilometers of [suburb](petersham) [state](NSW)'
  - 'within a few kilometers from [suburb](petersham) [state](NSW)'
  - 'I wanted one in [suburb](petersham) [state](NSW)'
  - 'I''m looking for one in [suburb](petersham) [state](NSW)'
  - 'I''d like one in [suburb](petersham) [state](NSW)'
  - 'The [suburb](petersham) [state](NSW) area'
  - 'My suburb is [suburb](petersham) [state](NSW)'
  - 'not that, it is [suburb](petersham) [state](NSW)'
  - 'not that, in [suburb](petersham) [state](NSW)'
  - 'no [suburb](petersham) [state](NSW)'
  - 'no I need in [suburb](petersham) [state](NSW)'
  - 'no in [suburb](petersham) [state](NSW)'
  - 'no near [suburb](petersham) [state](NSW)'
  - 'no close to [suburb](petersham) [state](NSW)'
  - 'no nearby [suburb](petersham) [state](NSW)'
  - 'no around [suburb](petersham) [state](NSW)'
  - 'no no in [suburb](petersham) [state](NSW)'
  - 'no no near [suburb](petersham) [state](NSW)'
  - 'no no close to [suburb](petersham) [state](NSW)'
  - 'no no nearby [suburb](petersham) [state](NSW)'
  - 'no no around [suburb](petersham) [state](NSW)'
  - 'nope I need in [suburb](petersham) [state](NSW)'
  - 'nope in [suburb](petersham) [state](NSW)'
  - 'nope near [suburb](petersham) [state](NSW)'
  - 'nope close to [suburb](petersham) [state](NSW)'
  - 'nope nearby [suburb](petersham) [state](NSW)'
  - 'nope around [suburb](petersham) [state](NSW)'
  - 'sorry I need in [suburb](petersham) [state](NSW)'
  - 'sorry in [suburb](petersham) [state](NSW)'
  - 'sorry near [suburb](petersham) [state](NSW)'
  - 'sorry close to [suburb](petersham) [state](NSW)'
  - 'sorry nearby [suburb](petersham) [state](NSW)'
  - 'sorry around [suburb](petersham) [state](NSW)'
  - 'yes [suburb](petersham) [state](NSW)'
  - 'yes I need in [suburb](petersham) [state](NSW)'
  - 'yes in [suburb](petersham) [state](NSW)'
  - 'yes near [suburb](petersham) [state](NSW)'
  - 'yes close to [suburb](petersham) [state](NSW)'
  - 'yes nearby [suburb](petersham) [state](NSW)'
  - 'yes around [suburb](petersham) [state](NSW)'
  - 'yes in [suburb](petersham) [state](NSW)'
  - 'yup I need in [suburb](petersham) [state](NSW)'
  - 'yup in [suburb](petersham) [state](NSW)'
  - 'yep near [suburb](petersham) [state](NSW)'

  - '[suburb](petersham) [postcode](2232)'
  - 'in [suburb](petersham) [postcode](2232)'
  - 'that''s in [suburb](petersham) [postcode](2232)'
  - 'that''s [suburb](petersham) [postcode](2232)'
  - 'around [suburb](petersham) [postcode](2232)'
  - 'close to [suburb](petersham) [postcode](2232)'
  - 'near [suburb](petersham) [postcode](2232)'
  - 'somewhere near [suburb](petersham) [postcode](2232)'
  - 'by [suburb](petersham) [postcode](2232)'
  - 'nearby [suburb](petersham) [postcode](2232)'
  - 'within close distance to [suburb](petersham) [postcode](2232)'
  - 'within close distance from [suburb](petersham) [postcode](2232)'
  - 'not very far from [suburb](petersham) [postcode](2232)'
  - 'not too far from [suburb](petersham) [postcode](2232)'
  - 'within a few kilometers of [suburb](petersham) [postcode](2232)'
  - 'within a few kilometers from [suburb](petersham) [postcode](2232)'
  - 'I wanted one in [suburb](petersham) [postcode](2232)'
  - 'I''m looking for one in [suburb](petersham) [postcode](2232)'
  - 'I''d like one in [suburb](petersham) [postcode](2232)'
  - 'The [suburb](petersham) [postcode](2232) area'
  - 'My suburb is [suburb](petersham) [postcode](2232)'
  - 'not that, it is [suburb](petersham) [postcode](2232)'
  - 'not that, in [suburb](petersham) [postcode](2232)'
  - 'no [suburb](petersham) [postcode](2232)'
  - 'no I need in [suburb](petersham) [postcode](2232)'
  - 'no in [suburb](petersham) [postcode](2232)'
  - 'no near [suburb](petersham) [postcode](2232)'
  - 'no close to [suburb](petersham) [postcode](2232)'
  - 'no nearby [suburb](petersham) [postcode](2232)'
  - 'no around [suburb](petersham) [postcode](2232)'
  - 'no no in [suburb](petersham) [postcode](2232)'
  - 'no no near [suburb](petersham) [postcode](2232)'
  - 'no no close to [suburb](petersham) [postcode](2232)'
  - 'no no nearby [suburb](petersham) [postcode](2232)'
  - 'no no around [suburb](petersham) [postcode](2232)'
  - 'nope I need in [suburb](petersham) [postcode](2232)'
  - 'nope in [suburb](petersham) [postcode](2232)'
  - 'nope near [suburb](petersham) [postcode](2232)'
  - 'nope close to [suburb](petersham) [postcode](2232)'
  - 'nope nearby [suburb](petersham) [postcode](2232)'
  - 'nope around [suburb](petersham) [postcode](2232)'
  - 'sorry I need in [suburb](petersham) [postcode](2232)'
  - 'sorry in [suburb](petersham) [postcode](2232)'
  - 'sorry near [suburb](petersham) [postcode](2232)'
  - 'sorry close to [suburb](petersham) [postcode](2232)'
  - 'sorry nearby [suburb](petersham) [postcode](2232)'
  - 'sorry around [suburb](petersham) [postcode](2232)'
  - 'yes [suburb](petersham) [postcode](2232)'
  - 'yes I need in [suburb](petersham) [postcode](2232)'
  - 'yes in [suburb](petersham) [postcode](2232)'
  - 'yes near [suburb](petersham) [postcode](2232)'
  - 'yes close to [suburb](petersham) [postcode](2232)'
  - 'yes nearby [suburb](petersham) [postcode](2232)'
  - 'yes around [suburb](petersham) [postcode](2232)'
  - 'yes in [suburb](petersham) [postcode](2232)'
  - 'yup I need in [suburb](petersham) [postcode](2232)'
  - 'yup in [suburb](petersham) [postcode](2232)'
  - 'yep near [suburb](petersham) [postcode](2232)'

  - '[suburb](petersham) [state](NSW) [postcode](2232)'
  - 'in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'that''s in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'that''s [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'somewhere near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'by [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'within close distance to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'within close distance from [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'not very far from [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'not too far from [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'within a few kilometers of [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'within a few kilometers from [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'I wanted one in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'I''m looking for one in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'I''d like one in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'The [suburb](petersham) [state](NSW) area'
  - 'My suburb is [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'not that, it is [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'not that, in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yup I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yup in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yep near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'in [postcode](2000)'
  - 'in postcode [postcode](2000)'
  - 'postcode [postcode](2000)'
  - '[postcode](2000)'
  - 'near [postcode](2000)'

---
type: entity
name: suburb
automatically_extensible: true
matching_strictness: 0.8
values:
  - Sydney
  - Bondi
  - Haymarket

Execution:

engine.parse("in 2000", ["find_suburb"])
//Correct output:
{
      "input": "in 2000",
      "intent": {
        "intentName": "find_suburb",
        "probability": 1.0
      },
      "slots": [
        {
          "range": {
            "start": 3,
            "end": 7
          },
          "rawValue": "2000",
          "value": {
            "kind": "Number",
            "value": 2000.0
          },
          "entity": "snips/number",
          "slotName": "postcode"
        }
      ]
    }

Bug:

Template:

# use_sms intent
---
type: intent
name: use_sms
slots: []
utterances:
  - text
  - send text
  - send it to me
  - send them to me
  - send the text
  - send it
  - text it
  - text the options
  - text them
  - text it to me
  - text them to me
  - text me
  - text me the options
  - send me a text
  - text me a message
  - text to my phone
  - text to my mobile
  - text to my cell
  - text to phone

  - s.m.s
  - send s.m.s.
  - s.m.s. it
  - s.m.s. the options
  - s.m.s. them
  - s.m.s. them to me
  - s.m.s. me
  - send me a s.m.s.
  - s.m.s. me a message
  - s.m.s. to my phone
  - s.m.s. to my mobile
  - s.m.s. to my cell
  - s.m.s. to phone

# read_results intent
---
type: intent
name: read_results
slots: []
utterances:
  - read all results
  - read the results
  - read results
  - read them
  - read them out
  - read
  - read out the options
  - read all options
  - tell me
  - I want to hear them
  - I'd like to hear the options
  - I'd like to hear them
  - tell me the results
  - tell me the options
  - what are the options
  - what are the results

# read_results_repeat intent
---
type: intent
name: read_results_repeat
slots: []
utterances:
  - repeat please
  - repeat
  - repeat that
  - can you repeat it again
  - can you say it again
  - again
  - say again
  - once more
  - once again
  - Can you repeat

# finish intent
---
type: intent
name: finish
slots: []
utterances:
  - 'that''s it'
  - 'that''s all'
  - 'that''s all thanks'
  - 'that''s all ta'
  - 'yep that''s it for today'
  - 'yep that''s it'
  - 'yes that''s it'
  - 'yes that''s all'
  - 'that''s ok'
  - 'that''s all I need'
  - 'no more'
  - 'I don''t need anything else'
  - 'that''ll be all'
  - 'there''s no more'
  - 'that''s all for today'
  - 'nothing else'
  - 'all good'
  - 'yep that''s it'
  - 'yep all good'

# do_both intent
---
type: intent
name: do_both
slots:
  - {name: both, entity: both}
utterances:
  - 'do [both](both)'
  - '[both](both) of them'
  - '[both](both) please'
  - '[both](both)'
  - 'can you do [both](both)'
  - 'I want [both](both)'

# agree intent
---
type: intent
name: agree
slots: []
utterances:
  - 'yes'
  - yea
  - yup
  - yep
  - yeah exactly
  - yeah
  - yes and yes
  - yes yes
  - yah
  - ya
  - ofcourse
  - that's right
  - that's correct
  - right
  - yes right
  - i agree
  - definitely
  - yes definitely
  - sure
  - yes sure
  - why not
  - alrighty
  - correct
  - fine
  - that's fine
  - sounds good

---
type: intent
name: disagree
slots: []
utterances:
  - 'no'
  - no no
  - incorrect
  - wrong
  - nah
  - na
  - nay
  - no no no
  - nope
  - that's wrong
  - that's not right
  - that' incorrect
  - absolutely no
  - absolutely not
  - no it's not
  - no incorrect

---
type: intent
name: unsure
slots: []
utterances:
  - don't know
  - unsure
  - I don't know
  - I am not sure
  - not sure
  - sorry I don't know
  - I have no idea
  - no idea

---
type: intent
name: gp_home
slots: []
utterances:
  - for a home visit
  - for the home
  - visit my house
  - to visit my place
  - a home visit doctor
  - a doctor to visit my home
  - yes that's a home visit
  - yes that's a house visit
  - I need a home visit
  - I need a home visit doctor
  - I need a doctor who makes home visits
  - someone to come to my home
  - a doctor to visit me soon
  - a doctor to come to me
  - a nurse who makes home visits
  - i can't visit the doctor
  - I'm not able to get to the doctor
  - at my house

---
type: intent
name: gp_clinic
slots: []
utterances:
  - at a clinic
  - yes a clinic
  - i need a clinic doctor
  - I need a doctor at a clinic
  - a clinic doctor
  - clinic doctor please
  - yes a doctor at a clinic
  - a doctor's surgery
  - a doctor's office
  - a surgery
  - I want to visit the doctor
  - yes I can visit
  - I'm able to visit
  - get me a clinic doctor
  - I want to find a doctor at a clinic
  - that's for a doctor at a clinic
  - yes i can go to the doctor
  - to see a doctor
  - to go to the clinic
  - to visit a clinic
  - outside
  - at doctor's office

---
type: intent
name: different_service
slots: []
utterances:
  - That's not what I wanted
  - I don't want any of those
  - I don't want any of those health services
  - I want something else
  - I need a different service
  - I need a different health service
  - something else
  - not that

---
type: intent
name: find_service
slots:
  - {name: service, entity: service}
utterances:
  - '[service](doctor)'
  - 'help me find [service](doctor)'
  - 'help find me [service](doctor)'
  - '[service](doctor) thanks'
  - 'a [service](doctor)'
  - 'an [service](doctor)'
  - 'the [service](doctor)'
  - 'open [service](doctor)'
  - 'find [service](doctor)'
  - 'find a [service](doctor)'
  - 'find me a nearby [service](doctor) please'
  - 'please find me a [service](doctor) nearby'
  - 'find me a [service](doctor) who is nearby'
  - 'find me a nearby [service](doctor)'
  - 'locate a [service](doctor) for me'
  - 'find me a [service](doctor) close to me'
  - 'I want to talk to a [service](nurse)'
  - 'I am looking for a [service](pharmacy) which is close'
  - 'I am looking for a [service](pharmacy) that is nearby'
  - 'I am looking for a [service](pharmacy) that is close by'
  - 'I am looking for a [service](pharmacy) that is still open'
  - 'I need a [service](pharmacy) that is still open'
  - 'I need a [service](doctor) who is within 100 km'
  - 'I need a [service](doctor) who is close'
  - 'I need a local [service](doctor)'
  - 'I need a [service](doctor)'
  - 'I am looking for an open [service](pharmacy)'
  - 'I am looking for a nearby [service](doctor)'
  - 'I am looking for a [service](doctor)'
  - 'I want a [service](pharmacy)'
  - 'I want a nearby [service](doctor)'
  - 'I want to see a [service](doctor)'
  - 'I''d like [service](doctor)'
  - 'I''d like a [service](doctor)'
  - 'Id like [service](doctor)' # accounting for Speech to text translation errors
  - 'Id like a [service](doctor)' # accounting for Speech to text translation errors
  - 'Id like for [service](doctor)' # accounting for Speech to text translation errors
  - 'want to see a [service](doctor)'
  - 'see a [service](doctor)'
  - 'could you find me a [service](doc)'
  - 'no, I need a [service](dentist)'
  - 'no, [service](dentist)'
  - 'no, a [service](dentist)'
  - 'nope, a [service](dentist)'
  - 'sorry, a [service](dentist)'
  - 'sorry, I am looking for a [service](dentist)'
  - 'nah, a  [service](dentist)'
  - 'yes, I need a [service](dentist)'
  - 'yes, [service](dentist)'
  - 'yes, a [service](dentist)'
  - 'yup, a [service](dentist)'
  - 'a [service](dentist) at a clinic'
  - '[service](dentist) clinic'
  - 'a clinic [service](dentist)'
  - 'a home [service](dentist)'

---
type: intent
name: find_date
slots:
  - {name: date, entity: snips/date}
utterances:
  - '[date](wednesday)'
  - '[date](13th Sep.)'
  - '[date](13th September)'
  - 'on [date](wednesday)'
  - 'on [date](13th Sep.)'
  - 'on [date](13th September)'
  - 'on [date](13th)'
  - 'by [date](today)'
  - 'for [date](wednesday)'
  - 'visit [date](wednesday)'
  - 'want [date](wednesday)'
  - 'say [date](wednesday)'
  - 'wanted [date](wednesday)'
  - 'said [date](wednesday)'
  - 'said [date](today)'
  - 'was [date](tomorrow)'
  - 'it''s [date](tomorrow)'
  - 'I was looking for [date](tomorrow)'

---
type: intent
name: find_time
slots:
  - {name: time, entity: snips/datetime}
  - {name: service_open_attribute, entity: service_open_attribute}
utterances:
  - 'at [time](on wednesday)'
  - 'by [time](on wednesday)'
  - 'on [time](on wednesday)'
  - 'for [time](on wednesday)'
  - 'visit [time](8am today)'
  - 'before [time](on wednesday)'
  - 'after [time](on wednesday)'
  - 'around [time](on wednesday)'
  - 'sometime around [time](on wednesday)'
  - 'anytime around [time](on wednesday)'
  - 'anytime [time](on wednesday)'
  - 'sometime [time](on wednesday)'
  - '[time](on wednesday)'
  - 'I was looking for [time](today)'
  - 'no, at [time](on wednesday)'
  - 'no, on [time](on wednesday)'
  - 'no, before [time](on wednesday)'
  - 'no, after [time](on wednesday)'
  - 'no, around [time](on wednesday)'
  - 'no, sometime around [time](on wednesday)'
  - 'no, anytime around [time](on wednesday)'
  - 'no, anytime  [time](on wednesday)'
  - 'no, sometime  [time](on wednesday)'

  - 'open [service_open_attribute](now)'
  - 'for [service_open_attribute](now)'
  - '[service_open_attribute](now)'
  - 'something [service_open_attribute](now)'
  - 'something for [service_open_attribute](now)'
  - 'anything [service_open_attribute](now)'
  - 'anything for [service_open_attribute](now)'
  - 'something that''s open [service_open_attribute](now)'
  - 'I was looking for one that is open [service_open_attribute](now)'
  - 'no, [service_open_attribute](now)'

---
type: intent
name: find_time_as_number
slots:
  - {name: time_as_number, entity: snips/number}
  - {name: time_as_number_date, entity: snips/date}
utterances:
  - 'at [time_as_number](1)'
  - 'by [time_as_number](1)'
  - 'before [time_as_number](1)'
  - 'after [time_as_number](1)'
  - 'around [time_as_number](1)'
  - 'sometime around [time_as_number](1)'
  - 'anytime around [time_as_number](1)'
  - '[time_as_number](1)'
  - 'at [time_as_number](1) on [time_as_number_date](wednesday)'
  - 'by [time_as_number](1) on [time_as_number_date](wednesday)'
  - 'before [time_as_number](1) on [time_as_number_date](wednesday)'
  - 'after [time_as_number](1) on [time_as_number_date](wednesday)'
  - 'around [time_as_number](1) on [time_as_number_date](wednesday)'
  - 'sometime around [time_as_number](1) on [time_as_number_date](wednesday)'
  - 'anytime around [time_as_number](1) on [time_as_number_date](wednesday)'
  - '[time_as_number](1) on [time_as_number_date](wednesday)'
  - '[time_as_number](1) [time_as_number_date](tomorrow)'
  - 'visit [time_as_number](1) [time_as_number_date](today)'
  - 'that''s [time_as_number](1) [time_as_number_date](today)'
  - 'it''s [time_as_number](1) [time_as_number_date](today)'
  - 'wanted [time_as_number](1) [time_as_number_date](today)'
  - 'said [time_as_number](1) [time_as_number_date](today)'
  - 'I was looking for [time_as_number](1) [time_as_number_date](today)'

---
type: intent
name: find_suburb
slots:
  - {name: suburb, entity: suburb}
  - {name: state, entity: state}
  - {name: postcode, entity: snips/number}
utterances:
  - '[suburb](petersham)'
  - 'in [suburb](petersham)'
  - 'that''s in [suburb](petersham)'
  - 'that''s [suburb](petersham)'
  - 'around [suburb](petersham)'
  - 'close to [suburb](petersham)'
  - 'near [suburb](petersham)'
  - 'somewhere near [suburb](petersham)'
  - 'somewhere in [suburb](petersham)'
  - 'by [suburb](petersham)'
  - 'nearby [suburb](petersham)'
  - 'within close distance to [suburb](petersham)'
  - 'within close distance from [suburb](petersham)'
  - 'not very far from [suburb](petersham)'
  - 'not too far from [suburb](petersham)'
  - 'within a few kilometers of [suburb](petersham)'
  - 'within a few kilometers from [suburb](petersham)'
  - 'I wanted one in [suburb](petersham)'
  - 'I''m looking for one in [suburb](petersham)'
  - 'I''d like one in [suburb](petersham)'
  - 'The [suburb](petersham) area'
  - 'My suburb is [suburb](petersham)'
  - 'not that, it is [suburb](petersham)'
  - 'not that, in [suburb](petersham)'
  - 'no [suburb](petersham)'
  - 'no I need in [suburb](petersham)'
  - 'no in [suburb](petersham)'
  - 'no near [suburb](petersham)'
  - 'no close to [suburb](petersham)'
  - 'no nearby [suburb](petersham)'
  - 'no around [suburb](petersham)'
  - 'no no in [suburb](petersham)'
  - 'no no near [suburb](petersham)'
  - 'no no close to [suburb](petersham)'
  - 'no no nearby [suburb](petersham)'
  - 'no no around [suburb](petersham)'
  - 'nope I need in [suburb](petersham)'
  - 'nope in [suburb](petersham)'
  - 'nope near [suburb](petersham)'
  - 'nope close to [suburb](petersham)'
  - 'nope nearby [suburb](petersham)'
  - 'nope around [suburb](petersham)'
  - 'sorry I need in [suburb](petersham)'
  - 'sorry in [suburb](petersham)'
  - 'sorry near [suburb](petersham)'
  - 'sorry close to [suburb](petersham)'
  - 'sorry nearby [suburb](petersham)'
  - 'sorry around [suburb](petersham)'
  - 'yes [suburb](petersham)'
  - 'yes I need in [suburb](petersham)'
  - 'yes in [suburb](petersham)'
  - 'yes near [suburb](petersham)'
  - 'yes close to [suburb](petersham)'
  - 'yes nearby [suburb](petersham)'
  - 'yes around [suburb](petersham)'
  - 'yes in [suburb](petersham)'
  - 'yup I need in [suburb](petersham)'
  - 'yup in [suburb](petersham)'
  - 'yep near [suburb](petersham)'
  - '[suburb](petersham) [state](NSW)'

  - 'in [suburb](petersham) [state](NSW)'
  - 'that''s in [suburb](petersham) [state](NSW)'
  - 'that''s [suburb](petersham) [state](NSW)'
  - 'around [suburb](petersham) [state](NSW)'
  - 'close to [suburb](petersham) [state](NSW)'
  - 'near [suburb](petersham) [state](NSW)'
  - 'somewhere near [suburb](petersham) [state](NSW)'
  - 'by [suburb](petersham) [state](NSW)'
  - 'nearby [suburb](petersham) [state](NSW)'
  - 'within close distance to [suburb](petersham) [state](NSW)'
  - 'within close distance from [suburb](petersham) [state](NSW)'
  - 'not very far from [suburb](petersham) [state](NSW)'
  - 'not too far from [suburb](petersham) [state](NSW)'
  - 'within a few kilometers of [suburb](petersham) [state](NSW)'
  - 'within a few kilometers from [suburb](petersham) [state](NSW)'
  - 'I wanted one in [suburb](petersham) [state](NSW)'
  - 'I''m looking for one in [suburb](petersham) [state](NSW)'
  - 'I''d like one in [suburb](petersham) [state](NSW)'
  - 'The [suburb](petersham) [state](NSW) area'
  - 'My suburb is [suburb](petersham) [state](NSW)'
  - 'not that, it is [suburb](petersham) [state](NSW)'
  - 'not that, in [suburb](petersham) [state](NSW)'
  - 'no [suburb](petersham) [state](NSW)'
  - 'no I need in [suburb](petersham) [state](NSW)'
  - 'no in [suburb](petersham) [state](NSW)'
  - 'no near [suburb](petersham) [state](NSW)'
  - 'no close to [suburb](petersham) [state](NSW)'
  - 'no nearby [suburb](petersham) [state](NSW)'
  - 'no around [suburb](petersham) [state](NSW)'
  - 'no no in [suburb](petersham) [state](NSW)'
  - 'no no near [suburb](petersham) [state](NSW)'
  - 'no no close to [suburb](petersham) [state](NSW)'
  - 'no no nearby [suburb](petersham) [state](NSW)'
  - 'no no around [suburb](petersham) [state](NSW)'
  - 'nope I need in [suburb](petersham) [state](NSW)'
  - 'nope in [suburb](petersham) [state](NSW)'
  - 'nope near [suburb](petersham) [state](NSW)'
  - 'nope close to [suburb](petersham) [state](NSW)'
  - 'nope nearby [suburb](petersham) [state](NSW)'
  - 'nope around [suburb](petersham) [state](NSW)'
  - 'sorry I need in [suburb](petersham) [state](NSW)'
  - 'sorry in [suburb](petersham) [state](NSW)'
  - 'sorry near [suburb](petersham) [state](NSW)'
  - 'sorry close to [suburb](petersham) [state](NSW)'
  - 'sorry nearby [suburb](petersham) [state](NSW)'
  - 'sorry around [suburb](petersham) [state](NSW)'
  - 'yes [suburb](petersham) [state](NSW)'
  - 'yes I need in [suburb](petersham) [state](NSW)'
  - 'yes in [suburb](petersham) [state](NSW)'
  - 'yes near [suburb](petersham) [state](NSW)'
  - 'yes close to [suburb](petersham) [state](NSW)'
  - 'yes nearby [suburb](petersham) [state](NSW)'
  - 'yes around [suburb](petersham) [state](NSW)'
  - 'yes in [suburb](petersham) [state](NSW)'
  - 'yup I need in [suburb](petersham) [state](NSW)'
  - 'yup in [suburb](petersham) [state](NSW)'
  - 'yep near [suburb](petersham) [state](NSW)'

  - '[suburb](petersham) [postcode](2232)'
  - 'in [suburb](petersham) [postcode](2232)'
  - 'that''s in [suburb](petersham) [postcode](2232)'
  - 'that''s [suburb](petersham) [postcode](2232)'
  - 'around [suburb](petersham) [postcode](2232)'
  - 'close to [suburb](petersham) [postcode](2232)'
  - 'near [suburb](petersham) [postcode](2232)'
  - 'somewhere near [suburb](petersham) [postcode](2232)'
  - 'by [suburb](petersham) [postcode](2232)'
  - 'nearby [suburb](petersham) [postcode](2232)'
  - 'within close distance to [suburb](petersham) [postcode](2232)'
  - 'within close distance from [suburb](petersham) [postcode](2232)'
  - 'not very far from [suburb](petersham) [postcode](2232)'
  - 'not too far from [suburb](petersham) [postcode](2232)'
  - 'within a few kilometers of [suburb](petersham) [postcode](2232)'
  - 'within a few kilometers from [suburb](petersham) [postcode](2232)'
  - 'I wanted one in [suburb](petersham) [postcode](2232)'
  - 'I''m looking for one in [suburb](petersham) [postcode](2232)'
  - 'I''d like one in [suburb](petersham) [postcode](2232)'
  - 'The [suburb](petersham) [postcode](2232) area'
  - 'My suburb is [suburb](petersham) [postcode](2232)'
  - 'not that, it is [suburb](petersham) [postcode](2232)'
  - 'not that, in [suburb](petersham) [postcode](2232)'
  - 'no [suburb](petersham) [postcode](2232)'
  - 'no I need in [suburb](petersham) [postcode](2232)'
  - 'no in [suburb](petersham) [postcode](2232)'
  - 'no near [suburb](petersham) [postcode](2232)'
  - 'no close to [suburb](petersham) [postcode](2232)'
  - 'no nearby [suburb](petersham) [postcode](2232)'
  - 'no around [suburb](petersham) [postcode](2232)'
  - 'no no in [suburb](petersham) [postcode](2232)'
  - 'no no near [suburb](petersham) [postcode](2232)'
  - 'no no close to [suburb](petersham) [postcode](2232)'
  - 'no no nearby [suburb](petersham) [postcode](2232)'
  - 'no no around [suburb](petersham) [postcode](2232)'
  - 'nope I need in [suburb](petersham) [postcode](2232)'
  - 'nope in [suburb](petersham) [postcode](2232)'
  - 'nope near [suburb](petersham) [postcode](2232)'
  - 'nope close to [suburb](petersham) [postcode](2232)'
  - 'nope nearby [suburb](petersham) [postcode](2232)'
  - 'nope around [suburb](petersham) [postcode](2232)'
  - 'sorry I need in [suburb](petersham) [postcode](2232)'
  - 'sorry in [suburb](petersham) [postcode](2232)'
  - 'sorry near [suburb](petersham) [postcode](2232)'
  - 'sorry close to [suburb](petersham) [postcode](2232)'
  - 'sorry nearby [suburb](petersham) [postcode](2232)'
  - 'sorry around [suburb](petersham) [postcode](2232)'
  - 'yes [suburb](petersham) [postcode](2232)'
  - 'yes I need in [suburb](petersham) [postcode](2232)'
  - 'yes in [suburb](petersham) [postcode](2232)'
  - 'yes near [suburb](petersham) [postcode](2232)'
  - 'yes close to [suburb](petersham) [postcode](2232)'
  - 'yes nearby [suburb](petersham) [postcode](2232)'
  - 'yes around [suburb](petersham) [postcode](2232)'
  - 'yes in [suburb](petersham) [postcode](2232)'
  - 'yup I need in [suburb](petersham) [postcode](2232)'
  - 'yup in [suburb](petersham) [postcode](2232)'
  - 'yep near [suburb](petersham) [postcode](2232)'

  - '[suburb](petersham) [state](NSW) [postcode](2232)'
  - 'in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'that''s in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'that''s [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'somewhere near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'by [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'within close distance to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'within close distance from [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'not very far from [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'not too far from [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'within a few kilometers of [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'within a few kilometers from [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'I wanted one in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'I''m looking for one in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'I''d like one in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'The [suburb](petersham) [state](NSW) area'
  - 'My suburb is [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'not that, it is [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'not that, in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'no no around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'nope around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'sorry around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes close to [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes nearby [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes around [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yes in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yup I need in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yup in [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'yep near [suburb](petersham) [state](NSW) [postcode](2232)'
  - 'in [postcode](2000)'
  - 'in postcode [postcode](2000)'
  - 'postcode [postcode](2000)'
  - '[postcode](2000)'
  - 'near [postcode](2000)'

---
type: intent
name: speak_to_nurse
slots: 
  - {name: nurse, entity: nurse}
  - {name: issue, entity: issue}
  - {name: action, entity: action}
utterances:
  - '[action](take me) to [nurse](nurse)'
  - '[action](take me to) [nurse](nurse)'
  - having an [issue](emergency)
  - it is an [issue](emergency)
  - this is an [issue](emergency)
  - '[issue](emergency)'
  - I have an [issue](emergency)
  - '[issue](emergency) issue'
  - ok [nurse](nurse)
  - need [nurse](nurse)
  - I need [nurse](nurse)
  - '[nurse](nurse) please'
  - 'I want a [nurse](nurse)'
  - 'yes, [nurse](nurse)'
  - 'yes, a [nurse](nurse)'
  - I want to talk to a [service](nurse)
  - I''d like to [action](speak) to [nurse](nurse) please
  - '[action](speak) to [nurse](nurse)'
  - can I [action](speak) to [nurse](nurse)
  - can I [action](speak) with [nurse](nurse)
  - '[nurse](nurse)'
  - '[nurse](nurse) now'
  - '[nurse](nurse) please'
  - i want to [action](speak) to [nurse](nurse)
  - get a [nurse](nurse)
  - '[action](speak) me through'
  - '[action](speak) me please'
  - 'not what I wanted'
  - 'not what I want'
  - 'isn''t helpful'
  - 'is not  helpful'
  - 'not working'
  - this won''t work
  - no this won''t work
  - I'm in [caller_physical_state](pain)
  - I am in [caller_physical_state](pain)
  - in [caller_physical_state](pain)
  - it's [caller_physical_state](painful)
  - it is [caller_physical_state](painful)
  - is [caller_physical_state](painful)

# nurse
---
type: entity
name: nurse
automatically_extensible: false
matching_strictness: 0.8
values:
  - [Nurse, help, person, person, human being, nurses, someone to talk to, someone ]

# nurse_issues
---
type: entity
name: issue
automatically_extensible: false
matching_strictness: 0.8
values:
  - [Emergency, urgent, time critical]

# nurse_actions
---
type: entity
name: action
automatically_extensible: false
matching_strictness: 0.8
values:
  - [talk, transfer, speak, take me]

# nurse_intent_caller_state
---
type: entity
name: caller_physical_state
automatically_extensible: false
matching_strictness: 0.8
values:
  - [pain, painful, hurting]

# service entity
---
type: entity
name: service
automatically_extensible: false
values:
  - [General Practice, gp]
  - [Pharmacy, chemist]
  - [Dentist]
  - [Home_Visit, doctor to visit at home]
  - [Another_Service, another service, another health service, other services, Physiotherapy]

# state entity
---
type: entity
name: state
automatically_extensible: false
matching_strictness: 0.9
values:
  - [NSW, New South Wales, South Wales, N.S.W. ]
  - [VIC, Victoria ]
  - [QLD, Queensland, Q.L.D. ]
  - [TAS, Tasmania ]
  - [ACT, Australia Capital Territory, A.C.T. ]
  - [SA, South Australia ]
  - [WA, Western Australia ]
  - [NT, Northern Territory ]

---
type: entity
name: service_open_attribute
automatically_extensible: false
values:
  - ['OPEN_NOW', now, right now, right away,  ]

---
type: entity
name: both
automatically_extensible: false
values:
  - [both, bath, book, bought, bot, but, bow]

---
type: entity
name: suburb
automatically_extensible: true
matching_strictness: 0.8
values:
  - Sydney
  - Bondi
  - Haymarket

Execution:

engine.parse("in 2000", ["find_suburb"])
//Incorrect output:
{
      "input": "in 2000",
      "intent": {
        "intentName": null,
        "probability": 0.6122865955641599
      },
      "slots": []
    }

Expected behavior

//Correct output:
{
      "input": "in 2000",
      "intent": {
        "intentName": "find_suburb",
        "probability": 1.0
      },
      "slots": [
        {
          "range": {
            "start": 3,
            "end": 7
          },
          "rawValue": "2000",
          "value": {
            "kind": "Number",
            "value": 2000.0
          },
          "entity": "snips/number",
          "slotName": "postcode"
        }
      ]
    }

Environment:

adrienball commented 5 years ago

Hi @ffos , I tried on my side with the latest version of snips-nlu (0.20.1) and it works as expected, so I suggest you upgrade the lib on your side. Please report here if you still have issues after the upgrade. Thanks!