#person translated states don't match

1 messages · Page 1 of 1 (latest)

bright helm
#

I'm working on person_HassGetState tests. Sentences are problably OK, because it works with untranslated states (home, not_home), but not with translated states. So, if I ask kdo je doma (who is home), I get Nihče (Nobody) which is incorrect. If I ask kdo je home, I get Lev, which is correct. Same goes for not_home, bit not for any other state like v službi (at work).

rich crescent
bright helm
#

yes, EN was starting point, checked NL and DE as well, RO had no 'who' response but has 'which'.

#

My fixtured.yaml:

  - name: "Lev"
    id: "person.Lev"
    state:
      in: "doma"
      out: "home"
    attributes:
      untranslated_state: "home"
  - name: "Arya"
    id: "person.arya"
    state: "službi"
    attributes:
      untranslated_state: "v službi"
  - name: "Jon"
    id: "person.jon"
    state:
      in: "odsoten"
      out: "not_home"
    attributes:
      untranslated_state: "not_home"
#

part of test file:

 - sentences:
      - "kdo je v službi"
    intent:
      name: HassGetState
      slots:
        domain: person
        state: službi
    response: "Arya"

  - sentences:
      - "kdo je doma"
    intent:
      name: HassGetState
      slots:
        domain: person
        state: home
    response: "Lev"
rich crescent
#

please share a branch or PR or something. I can't follow this without the greated context

bright helm
rich crescent
#

Still haven't had the chance to properly debug this. Please remind me about it daily if I don't get back 😄

bright helm
#

Still trying to improve in some parts and make SL responses correct and I stumbled upon EN and I strarted getting headaches. Is it just me or anyone else is also getting strange matches.

$ python3 -m script.intentfest parse --language en --sentence 'is Ada at Work'
{
  "text": "is Ada at Work",
  "match": true,
  "intent": "HassGetState",
  "slots": {
    "name": "Ada",
    "state": "work",
    "domain": "person"
  },
  "context": {
    "domain": "person"
  },
  "response_key": "one_yesno",
  "response": "No, Work"
  
  
  $ python3 -m script.intentfest parse --language en --sentence 'is Ada at work'
{
  "text": "is Ada at work",
  "match": true,
  "intent": "HassGetState",
  "slots": {
    "name": "Ada",
    "state": "work",
    "domain": "person"
  },
  "context": {
    "domain": "person"
  },
  "response_key": "one_yesno",
  "response": "No, Work"
}

$ python3 -m script.intentfest parse --language en --sentence 'who is at work'
{
  "text": "who is at work",
  "match": true,
  "intent": "HassGetState",
  "slots": {
    "state": "work",
    "domain": "person"
  },
  "context": {},
  "response_key": "which",
  "response": "Not any"
}
@andrejs2 ➜ /workspaces/intents (responses) $ python3 -m script.intentfest parse --language en --sentence 'where is Ada'
{
  "text": "where is Ada",
  "match": true,
  "intent": "HassGetState",
  "slots": {
    "name": "Ada",
    "domain": "person"
  },
  "context": {
    "domain": "person"
  },
  "response_key": "where",
  "response": "Ada is at Work"
}
$ python3 -m script.intentfest parse --language en --sentence 'is everyone home'
{
  "text": "is everyone home",
  "match": true,
  "intent": "HassGetState",
  "slots": {
    "state": "home",
    "domain": "person"
  },
  "context": {},
  "response_key": "all",
  "response": "No, Ada and John are not home"
rich crescent
#

what branch/version is this?

#

these should have been more or less fixed in the untranslated-states branch

#

nevermind, you're right, there are still bugs

#

i know exactly why and it's going to be tough to fix 🙂