zeeguu/core/language/strategies/word_rank_difficulty_estimator.py
def estimate_difficulty(cls, text: str, language: 'model.Language', user: 'model.User'):
        '''
        Estimates the difficulty based on the word-rank.
        :param text: See DifficultyEstimatorStrategy
        :param language: See DifficultyEstimatorStrategy
        :param user: See DifficultyEstimatorStrategy
        :rtype: dict
        :return: The dictionary contains the keys and return types
                    normalized: float (0<=normalized<=1)
                    discrete: string [EASY, MEDIUM, HARD]
        '''
        word_rank_score = cls.word_rank_readability_score(text, language)

        difficulty_scores = dict(
            normalized=cls.normalize_difficulty(word_rank_score),
            discrete=cls.discrete_difficulty(word_rank_score)
        )

        return word_rank_score

        Estimates the difficulty based on the word-rank.
        :param text: See DifficultyEstimatorStrategy
        :param language: See DifficultyEstimatorStrategy
        :param user: See DifficultyEstimatorStrategy
        :rtype: dict
        :return: The dictionary contains the keys and return types
                    normalized: float (0<=normalized<=1)
                    discrete: string [EASY, MEDIUM, HARD]
        
Estimates the difficulty based on the word-rank.
Estimates the difficulty based on the word - rank .
def estimate_difficulty(cls, text: str, language: 'model.Language', user: 'model.User'):
        word_rank_score = cls.word_rank_readability_score(text, language)
        difficulty_scores = dict(
            normalized=cls.normalize_difficulty(word_rank_score),
            discrete=cls.discrete_difficulty(word_rank_score)
        )
        return word_rank_score
def estimate_difficulty ( cls , text : str , language : 'model.Language' , user : 'model.User' ) : word_rank_score = cls . word_rank_readability_score ( text , language ) difficulty_scores = dict ( normalized = cls . normalize_difficulty ( word_rank_score ) , discrete = cls . discrete_difficulty ( word_rank_score ) ) return word_rank_score
Estimates the difficulty based on the word-rank.
Estimates the difficulty based on the word - rank .
'''
        Estimates the difficulty based on the word-rank.
        :param text: See DifficultyEstimatorStrategy
        :param language: See DifficultyEstimatorStrategy
        :param user: See DifficultyEstimatorStrategy
        :rtype: dict
        :return: The dictionary contains the keys and return types
                    normalized: float (0<=normalized<=1)
                    discrete: string [EASY, MEDIUM, HARD]
        '''
The dictionary contains the keys and return types
normalized: float (0<=normalized<=1)
discrete: string [EASY, MEDIUM, HARD]
The dictionary contains the keys and return types normalized : float ( 0< = normalized< = 1 ) discrete : string [ EASY MEDIUM HARD ]
dict
cls
text
str
None
language
'model.Language'
None
user
'model.User'
None