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

ContextData can't be saved and loaded #1311

Open
maiernte opened this issue May 8, 2023 · 0 comments
Open

ContextData can't be saved and loaded #1311

maiernte opened this issue May 8, 2023 · 0 comments

Comments

@maiernte
Copy link

maiernte commented May 8, 2023

contextData won't be save
I try out the Example of NER, save the hero-data in an other files. It works by nlp.addCorpus() and nlp.train().

But when I call nlp.save() and nlp.load(), I find out that the contextData in file "heros.json" won't be save in model.nlp

{
  "name": "Corpus test hero",
  "locale": "en-US",
  "contextData": "./src/data/base/heros.json",
  "data": [
    {
      "intent": "hero.realname",
      "utterances": [
        "what is the real name of @hero"
      ],
      "answers": [
        {
          "opts": "entities.hero !== undefined",
          "answer": "The real name of {{ hero }} is {{ _data[entities.hero.option].realName }}"
        },
        {
          "opts": "entities.hero === undefined",
          "answer": "Sorry, I don't know the real name of {{ hero }}."
        }
      ]
    },
    {
      "intent": "hero.city",
      "utterances": [
        "where @hero lives?",
        "what's the city of @hero?"
      ],
      "answers": [
        "{{ hero }} lives at {{ _data[entities.hero.option].city }}"
      ]
    }
  ],
  "entities": {
    "hero": {
      "options": {
        "spiderman": ["spiderman", "spider-man"],
        "ironman": ["ironman", "iron-man"],
        "thor": ["thor"]
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant