3

It seems one can use custom corpus json files by specify a path to the location. However, I'm confused by how that is done. The example provided by chatterbot isn't very clear.

http://chatterbot.readthedocs.io/en/stable/training.html

they do.

"./data/my_corpus/"

does the ./ mean root with a folder named data inside? If so what is root? My django app?

And in the other line they directly refrence the .json file? They also seem to do .corpus.json? Is that the correct file name scheme? Do I need both lines? Its very confusing not a lot of clarity.

Is there a clear example of how to do this?

Raja Simon
  • 10,126
  • 5
  • 43
  • 74
Nonlin
  • 550
  • 1
  • 6
  • 18
  • `./` in Linux means current directory! So they are trying to refer to a directory inside current directory. – Himanshu Shankar Jun 06 '17 at 04:41
  • You can try different types of path. Try editing the path from relative to absolute and then check if its working to make sure there is not any other problem. There can be other error such as permission error. Then, try fixing the relative path, if it has a problem. – Himanshu Shankar Jun 06 '17 at 04:43

1 Answers1

2

Training data ( training_data ) accepts list of files. You can mention that file like this... <your_app or directory>/folders...

backend
|___ corbus/data/introduction.py
    |___ __init__.py

project
|___ settings.py

then in your settings you can mention the training data file by

'training_data': [
    'chatterbot.corpus.english',
    'backend/corpus/data/introduction/'
]
Raja Simon
  • 10,126
  • 5
  • 43
  • 74