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

Training with corpus #944

Closed
7633 opened this issue Aug 17, 2017 · 4 comments
Closed

Training with corpus #944

7633 opened this issue Aug 17, 2017 · 4 comments

Comments

@7633
Copy link

7633 commented Aug 17, 2017

I have two questions according to corpus data:

  1. How are the specified categories in *.yaml files using in training?
    In the source code I found out only parsing separately categories and conversations inside.
            corpora.categories = corpus.get('categories', [])
            conversations = corpus.get('conversations', [])

            corpora.extend([conversations])
  1. How should I write corpus in yaml, if parser doesn't pay attention at -- and - statements?
    exmaple from conversations.yaml:
- - Good morning, how are you?
  - I am doing well, how about you?
  - I'm also good.
  - That's good to hear.
  - Yes it is.
- - Hello

example from ai.yaml:

- - What is ai
  - Artificial Intelligence is the branch of engineering and science devoted to constructing
    machines that think.
- - What language are you written in
  - python
- - You sound like data
  - Yes I am inspired by commander data's artificial personality.

I want to write several responses in one statement. e.g.:

- - Hello
  - hi
  - good morning
  - hello
  - hey
  - what's up
- - How are you
  - I'm fine
  - good
  - I'm fine, and what about you?
  - I'm sad
@vkosuri
Copy link
Collaborator

vkosuri commented Aug 17, 2017

@7633 Yes, it should work, I would recommand to you write serveral response before you check YAML lint http://www.yamllint.com/

The below example save it into .yaml and train your bot it should work.

--- 
- 
  - Hello
  - hi
  - "good morning"
  - hello
  - hey
  - "what's up"
- 
  - "How are you"
  - "I'm fine"
  - good
  - "I'm fine, and what about you?"
  - "I'm sad"

@7633
Copy link
Author

7633 commented Aug 18, 2017

@vkosuri yep, but how Chatterbot use this information about category?

@vkosuri
Copy link
Collaborator

vkosuri commented Aug 18, 2017

short and detail described here #925

@7633 7633 closed this as completed Aug 21, 2017
@lock
Copy link

lock bot commented Mar 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants