def _full_default(self, pronunciation):
        """Provide the default prediction of the where task.

        This function is used to predict the probability of a given pronunciation being reported for a given token.

        :param pronunciation: The pronunciation of the token
        """

        token_default = self['metadata']['token_default']['full']

        key = pronunciation
        if isinstance(key, list):
            if not all([isinstance(phoneme, basestring) for phoneme in key]):
                raise ValueError('The pronunciation must be of type string (a sequence of space separated phonemes) '
                                 'or of type list (containing phonemes of type strings).'
                                 'User supplied: {}'.format(key))

            key = ' '.join(pronunciation)

        predictions = {key: token_default['='],
                       '*': token_default['*']}

        return predictions
def _full_default ( self , pronunciation ) : token_default = self [ 'metadata' ] [ 'token_default' ] [ 'full' ] key = pronunciation if isinstance ( key , list ) : if not all ( [ isinstance ( phoneme , basestring ) for phoneme in key ] ) : raise ValueError ( 'The pronunciation must be of type string (a sequence of space separated phonemes) ' 'or of type list (containing phonemes of type strings).' 'User supplied: {}' . format ( key ) ) key = ' ' . join ( pronunciation ) predictions = { key : token_default [ '=' ] , '*' : token_default [ '*' ] } return predictions
Provide the default prediction of the where task.

        This function is used to predict the probability of a given pronunciation being reported for a given token.

        :param pronunciation: The pronunciation of the token