def validate_scored_ngram(self, scored_ngram: ScoredNGram, min_score: float,
                            min_length: int) -> bool:
    """Checks if the generated word follows all requirements on length and score.

    Note that the word also should not be an existing word.

    Args:
      scored_ngram: The scored new word to check.
      min_score: Minimum allowed score for the new word.
      min_length: Minimum allowed length for the new word.

    Returns:
      True if the word follows all requirements, false otherwise.
    """
    if scored_ngram.word in self._lexicon:
      return False
    elif len(scored_ngram.word) < min_length:
      return False
    elif scored_ngram.score == float("-inf"):
      return False
    elif scored_ngram.score < min_score:
      return False
    return True
Checks if the generated word follows all requirements on length and score.

    Note that the word also should not be an existing word.

    Args:
      scored_ngram: The scored new word to check.
      min_score: Minimum allowed score for the new word.
      min_length: Minimum allowed length for the new word.

    Returns:
      True if the word follows all requirements, false otherwise.
    
language/wino_dict/create_new_words.py