class_docstr: Reader for Rasa NLU training data in JSON format.
  
  Example:
      {
        "rasa_nlu_data": {
          "regex_features": [
            {
              "name": "zipcode",
              "pattern": "[0-9]{5}"
            }
          ],
          "entity_synonyms": [
            {
              "value": "chinese",
              "synonyms": ["Chinese", "Chines", "chines"]
            }
          ],
          "common_examples": [
            {
              "text": "hey",
              "intent": "greet",
              "entities": []
            },
            {
              "text": "howdy",
              "intent": "greet",
              "entities": []
            }
          ]
        }
      }
class_docstr_tok: ["Reader","for","Rasa","NLU","training","data","in","JSON","format",".","Example",":","{","``","rasa_nlu_data","''",":","{","``","regex_features","''",":","[","{","``","name","''",":","``","zipcode","''",",","``","pattern","''",":","``","[","0-9","]","{","5","}","''","}","]",",","``","entity_synonyms","''",":","[","{","``","value","''",":","``","chinese","''",",","``","synonyms","''",":","[","``","Chinese","''",",","``","Chines","''",",","``","chines","''","]","}","]",",","``","common_examples","''",":","[","{","``","text","''",":","``","hey","''",",","``","intent","''",":","``","greet","''",",","``","entities","''",":","[","]","}",",","{","``","text","''",":","``","howdy","''",",","``","intent","''",":","``","greet","''",",","``","entities","''",":","[","]","}","]","}","}"]
docstr: Loads training data stored in the rasa NLU data format.
docstr_tok: ["Loads","training","data","stored","in","the","rasa","NLU","data","format","."]
code: def read_from_json(
      self, js: Dict[Text, Any], **_: Any
  ) -> "TrainingData":
      """Loads training data stored in the rasa NLU data format."""
      import rasa.shared.nlu.training_data.schemas.data_schema as schema
      import rasa.shared.utils.validation as validation_utils
  
      validation_utils.validate_training_data(
          js, schema.rasa_nlu_data_schema()
      )
  
      data = js["rasa_nlu_data"]
      common_examples = data.get("common_examples", [])
      entity_synonyms = data.get("entity_synonyms", [])
      regex_features = data.get("regex_features", [])
      lookup_tables = data.get("lookup_tables", [])
  
      entity_synonyms = transform_entity_synonyms(entity_synonyms)
  
      training_examples = []
      for ex in common_examples:
          # taking care of custom entries
          msg = Message.build(
              text=ex.pop(TEXT, ""),
              intent=ex.pop(INTENT, None),
              entities=ex.pop(ENTITIES, None),
              **ex,
          )
          training_examples.append(msg)
  
      return TrainingData(
          training_examples,
          entity_synonyms,
          regex_features,
          lookup_tables,
      )
  
file_path: rasa/rasa/shared/nlu/training_data/formats/rasa.py
imports: import logging
  from collections import defaultdict
  from typing import Any, Dict, Text
  from rasa.shared.constants import DOCS_URL_MIGRATION_GUIDE
  from rasa.shared.nlu.constants import TEXT, INTENT, ENTITIES
  from rasa.shared.nlu.training_data.formats.readerwriter import JsonTrainingDataReader, TrainingDataWriter
  from rasa.shared.nlu.training_data.util import transform_entity_synonyms
  from rasa.shared.utils.io import json_to_string
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
  import rasa.shared.utils.io
label_desc: Use image node_id 2 for calling the RasaReader obj's underlying member method code with example usage: obj.read_from_json(js) and returns: TrainingData