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