Getting error while training json data

{ “rasa_nlu_data”: { “common_examples”: [ { “text”: “send fgrekjbgjgr pin board to mani”, “intent”: “sendPin”, “entities”: [ { “start”: 5, “end”: 16, “entity”: “pinname”, “value”: “fgrekjbgjgr” }, { “start”: 30, “end”: 34, “entity”: “person”, “value”: “mani” } ] }, { “text”: “forward svfkjgvnrb pinboard to gopi”, “intent”: “sendPin”, “entities”: [ { “start”: 8, “end”: 18, “entity”: “pinname”, “value”: “svfkjgvnrb” }, { “start”: 31, “end”: 35, “entity”: “person”, “value”: “gopi” } ] }, { “text”: “share refkregrek pin to mahesh”, “intent”: “sendPin”, “entities”: [ { “start”: 24, “end”: 30, “entity”: “person”, “value”: “mahesh” }, { “start”: 6, “end”: 16, “entity”: “pinname”, “value”: “refkregrek” } ] }, { “text”: “send the rewfr pin board to ganesh”, “intent”: “sendPin”, “entities”: [ { “start”: 9, “end”: 14, “entity”: “pinname”, “value”: “rewfr” }, { “start”: 28, “end”: 34, “entity”: “person”, “value”: “ganesh” } ] } ] } }

pipelines used:

policies:

  • name: MemoizationPolicy
  • name: KerasPolicy
  • name: MappingPolicy

language: “en”

pipeline: “supervised_embeddings”

Error:

Traceback (most recent call last): File “/home/prasanth/anaconda3/envs/RasaNlu/bin/rasa”, line 11, in sys.exit(main()) File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/main.py”, line 70, in main cmdline_arguments.func(cmdline_arguments) File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/cli/train.py”, line 84, in train kwargs=extract_additional_arguments(args), File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/train.py”, line 40, in train kwargs=kwargs, File “uvloop/loop.pyx”, line 1451, in uvloop.loop.Loop.run_until_complete File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/train.py”, line 135, in train_async kwargs=kwargs, File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/train.py”, line 188, in _do_training fixed_model_name=fixed_model_name, File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/train.py”, line 382, in _train_nlu_with_validated_data config, nlu_data_directory, _train_path, fixed_model_name=“nlu” File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/nlu/train.py”, line 88, in train training_data = load_data(data, nlu_config.language) File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/nlu/training_data/loading.py”, line 56, in load_data data_sets = [_load(f, language) for f in files] File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/nlu/training_data/loading.py”, line 56, in data_sets = [_load(f, language) for f in files] File “/home/prasanth/anaconda3/envs/RasaNlu/lib/python3.6/site-packages/rasa/nlu/training_data/loading.py”, line 115, in _load raise ValueError(“Unknown data format for file {}”.format(filename)) ValueError: Unknown data format for file /tmp/tmpa_2n1sr7/e999c3760b4b46248fa94fe1d12923ab_sendPin.json

Hi Prasanth,

Your json file format is wrong, your {} arrangement has a missing pair or extra pair here and there.

I’d recommend you using the md format of writing your nlu.md/data.json files. if you need to convert md file to json, you can use the following method in terminal

usage: rasa data convert nlu [-h] [-v] [-vv] [–quiet] --data DATA --out OUT [-l LANGUAGE] -f {json,md}

I formated your contents in this md file help.md (248 Bytes)

for Json format: { “rasa_nlu_data”: { “common_examples”: [ { “intent”: “sendPin”, “entities”: [ { “start”: 5, “end”: 16, “value”: “fgrekjbgjgr”, “entity”: “pinname” }, { “start”: 30, “end”: 34, “value”: “mani”, “entity”: “person” } ], “text”: “send fgrekjbgjgr pin board to mani” }, { “intent”: “sendPin”, “entities”: [ { “start”: 8, “end”: 18, “value”: “svfkjgvnrb”, “entity”: “pinname” }, { “start”: 31, “end”: 35, “value”: “gopi”, “entity”: “person” } ], “text”: “forward svfkjgvnrb pinboard to gopi” }, { “intent”: “sendPin”, “entities”: [ { “start”: 6, “end”: 16, “value”: “refkregrek”, “entity”: “pinname” }, { “start”: 24, “end”: 30, “value”: “mahesh”, “entity”: “person” } ], “text”: “share refkregrek pin to mahesh” }, { “intent”: “sendPin”, “entities”: [ { “start”: 9, “end”: 14, “value”: “rewfr”, “entity”: “pinname” }, { “start”: 28, “end”: 34, “value”: “ganesh”, “entity”: “person” } ], “text”: “send the rewfr pin board to ganesh” } ], “regex_features”: [], “lookup_tables”: [], “entity_synonyms”: [] } }

Thank you @gcgloven. it works fine after converting.

@gcgloven can you please look into this Error while trying to create a look up table?