Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect entity position in rasa adapter #22

Closed
hungph-dev-ict opened this issue Oct 3, 2019 · 5 comments
Closed

Incorrect entity position in rasa adapter #22

hungph-dev-ict opened this issue Oct 3, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@hungph-dev-ict
Copy link

{
"entities": [
{
"end": 112,
"entity": "bot_job",
"start": 93,
"value": "sứ mệnh như thế nào"
}
],
"intent": "ask_for_bot_job",
"text": "xếp sứ mệnh như thế nào"
},

The 1.6.0 version and I are having the error of generating the wrong locations of entities in the sentence, above is an example. Please check again! Thank you

@SimGus
Copy link
Owner

SimGus commented Oct 3, 2019

I cannot reproduce this bug, I get the following output:

{
    "entities": [
      {
        "end": 23, 
        "entity": "slot", 
        "start": 4, 
        "value": "sứ mệnh như thế nào"
      }
    ], 
    "intent": "intent", 
    "text": "xếp sứ mệnh như thế nào"
}

Are you using a different file encoding than UTF-8? (this is likely the case if you're using Windows.)
If your file has a different file encoding, try changing it to UTF-8. Chatette should always work well with Unicode files.

If this is not an encoding problem, could you provide the template you used to get this output please?

@SimGus SimGus added the needs clarifications This issue lacks precision label Oct 3, 2019
@devdeca
Copy link

devdeca commented Oct 8, 2019

I'm having the same problem, the file encode is us-ascii.
It is also interesting notice that if I configure the training down to 1 or 2, the generation works out fine, but as I raised its value, the result became like showed below.

My template:

%[askPopulation]('training': '5')
    ~[greet?] ~[population] @[city]

@[city]
    new york
    tokyo

~[greet]
    hi
    hello

~[population]
    what is the population of
    how many people are there in

The output:

{
  "rasa_nlu_data": {
    "common_examples": [
      {
        "entities": [
          {
            "end": 183,
            "entity": "city",
            "start": 178,
            "value": "tokyo"
          }
        ],
        "intent": "askPopulation",
        "text": "how many people are there in tokyo"
      },
      {
        "entities": [
          {
            "end": 186,
            "entity": "city",
            "start": 178,
            "value": "new york"
          }
        ],
        "intent": "askPopulation",
        "text": "hello what is the population of new york"
      },
      {
        "entities": [
          {
            "end": 183,
            "entity": "city",
            "start": 178,
            "value": "tokyo"
          }
        ],
        "intent": "askPopulation",
        "text": "what is the population of tokyo"
      },
      {
        "entities": [
          {
            "end": 186,
            "entity": "city",
            "start": 178,
            "value": "new york"
          }
        ],
        "intent": "askPopulation",
        "text": "how many people are there in new york"
      },
      {
        "entities": [
          {
            "end": 186,
            "entity": "city",
            "start": 178,
            "value": "new york"
          }
        ],
        "intent": "askPopulation",
        "text": "what is the population of new york"
      }
    ],
    "entity_synonyms": [],
    "lookup_tables": [],
    "regex_features": []
  }
}

@SimGus
Copy link
Owner

SimGus commented Oct 8, 2019

There is a problem indeed. It doesn't seem related to encoding. I'll fix that as soon as I can.

Thanks for the heads up :)

@SimGus SimGus added bug Something isn't working and removed needs clarifications This issue lacks precision labels Oct 8, 2019
@SimGus SimGus closed this as completed in ba3b2d9 Oct 8, 2019
@SimGus
Copy link
Owner

SimGus commented Oct 8, 2019

This is fixed on master branch. The fix will be present in the next release.

Cheers

@SimGus
Copy link
Owner

SimGus commented Nov 11, 2019

The newest version of Chatette (v1.6.1) has just been released with this bug fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants