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

How do I point to the custom corpus within Django project? #522

Closed
rajasimon opened this issue Dec 20, 2016 · 6 comments · Fixed by #550
Closed

How do I point to the custom corpus within Django project? #522

rajasimon opened this issue Dec 20, 2016 · 6 comments · Fixed by #550

Comments

@rajasimon
Copy link
Contributor

rajasimon commented Dec 20, 2016

I'm planning to create corpus directory inside my Django project, say I have the project called funstuff

funstuff
|__corpus
    |__data
        |__english
            |_greetings.json
|__funstuff
    |__settings.py
|__manage.py

I like to modify the settings.py file like this


# Chatterbot
CHATTERBOT = {
    'name': 'Fun stuff bot',
    'logic_adapters': [
        'chatterbot.logic.MathematicalEvaluation',
        'chatterbot.logic.BestMatch'
    ],
    'trainer': 'chatterbot.trainers.ChatterBotCorpusTrainer',
    'training_data': [
         'chatterbot.corpus.english.greetings',
         'funstuff.corpus.english.greetings'
    ]
}

Finally I want ./manage.py train should pick those corpus file and start the training!

@rajasimon rajasimon changed the title How to point the custom corpus within Django project? How do I point to the custom corpus within Django project? Dec 20, 2016
@vkosuri
Copy link
Collaborator

vkosuri commented Dec 20, 2016

You could more documentation from here http://chatterbot.readthedocs.io/en/stable/django/training.html#training

python manage.py train

@rajasimon
Copy link
Contributor Author

@vkosuri Nope still it's not picking my Django project corpus file. Can you replicate my above setup and give me solution

@gunthercox
Copy link
Owner

gunthercox commented Dec 20, 2016 via email

@gunthercox
Copy link
Owner

Hi @rajasimon The ability to specify custom corpus paths has been added in #549 and it will be available to use in the next release. I will update the documentation as well.

@vkosuri
Copy link
Collaborator

vkosuri commented Jan 3, 2017

Thanks @gunthercox

@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

Successfully merging a pull request may close this issue.

3 participants