@classmethod
def _from_dict(cls, _dict):
    """Initialize a EmotionScores object from a json dictionary."""
    args = {}
    if 'anger' in _dict:
        args['anger'] = _dict.get('anger')
    if 'disgust' in _dict:
        args['disgust'] = _dict.get('disgust')
    if 'fear' in _dict:
        args['fear'] = _dict.get('fear')
    if 'joy' in _dict:
        args['joy'] = _dict.get('joy')
    if 'sadness' in _dict:
        args['sadness'] = _dict.get('sadness')
    return cls(**args)
