Skip to content

Commit 18d3431

Browse files
committed
Add tags to example data and improve docs (for gunthercox#2409)
1 parent aecd57e commit 18d3431

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

docs/training.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ Training with CSV or TSV formatted data
139139
.. autoclass:: chatterbot.trainers.CsvFileTrainer
140140
:members: train
141141

142+
.. autoattribute:: chatterbot.trainers.CsvFileTrainer.DEFAULT_STATEMENT_TO_HEADER_MAPPING
143+
142144

143145
Example CSV data format:
144146

@@ -169,6 +171,8 @@ Training with JSON formatted data
169171
.. autoclass:: chatterbot.trainers.JsonFileTrainer
170172
:members: train
171173

174+
.. autoattribute:: chatterbot.trainers.JsonFileTrainer.DEFAULT_STATEMENT_TO_KEY_MAPPING
175+
172176

173177
Example JSON data format:
174178

tests/training/test_data/json_corpus/1.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44
"text": "Hello",
55
"in_response_to": null,
66
"persona": "user 1",
7-
"conversation": "test"
7+
"conversation": "test",
8+
"tags": [
9+
"greeting"
10+
]
811
},
912
{
1013
"text": "Is anyone there?",
1114
"in_response_to": "Hello",
1215
"persona": "user 1",
13-
"conversation": "test"
16+
"conversation": "test",
17+
"tags": [
18+
"question"
19+
]
1420
},
1521
{
1622
"text": "Yes",

0 commit comments

Comments
 (0)