@classmethod
def _from_dict(cls, _dict):
    """Initialize a TokenDictRule object from a json dictionary."""
    args = {}
    if 'text' in _dict:
        args['text'] = _dict.get('text')
    else:
        raise ValueError(
            "Required property 'text' not present in TokenDictRule JSON")
    if 'tokens' in _dict:
        args['tokens'] = _dict.get('tokens')
    else:
        raise ValueError(
            "Required property 'tokens' not present in TokenDictRule JSON")
    if 'readings' in _dict:
        args['readings'] = _dict.get('readings')
    if 'part_of_speech' in _dict:
        args['part_of_speech'] = _dict.get('part_of_speech')
    else:
        raise ValueError(
            "Required property 'part_of_speech' not present in TokenDictRule JSON"
            )
    return cls(**args)
