Checks for each edited word in word_list if that word is a valid english word.abs
    Returns all validated words as a set instance.
353630
def validate_words(word_list):
    '''
    
    '''
    if word_list is None:
        return {}
    elif isinstance(word_list, list):
        if not word_list:
            return {}
        else:
            return set(word for word in word_list if word in WORD_DISTRIBUTION)
    else:
        raise InputError("list variable not passed as argument to validate_words")
819594
def is_valid(self):
        
        for spec in self.product_specs:

            for feature in spec.get('mandatory', []):
                if feature.replace('__', '.') not in self.feature_list:
                    self.errors_mandatory.append(feature)

            for feature in spec.get('never', []):
                if feature.replace('__', '.') in self.feature_list:
                    self.errors_never.append(feature)

        return not self.has_errors()
332691
def correction(self, word):
        
        return max(self.candidates(word), key=self.word_probability)
135039
def bs(self):
        
        result = []
        for word_list in self.bsWords:
            result.append(self.random_element(word_list))

        return " ".join(result)
698568
def is_valid(cls, arg):
        """"""
        if isinstance(arg, list):
            allInts = allStrings = True
            for elem in arg:
                allInts = allInts and ((elem == 0) or (elem == 1))
                allStrings = allStrings and elem in cls.bitNames

            if allInts or allStrings:
                return True
        return False
742691
def _edits1(word: str) -> Set[str]:
    
    splits = [(word[:i], word[i:]) for i in range(len(word) + 1)]
    deletes = [L + R[1:] for L, R in splits if R]
    transposes = [L + R[1] + R[0] + R[2:] for L, R in splits if len(R) > 1]
    replaces = [L + c + R[1:] for L, R in splits if R for c in thai_letters]
    inserts = [L + c + R for L, R in splits for c in thai_letters]

    return set(deletes + transposes + replaces + inserts)
581226
protected boolean isMatch(String[] words, String filter)
        {
        for (String word : words)
            {
            int len = filter.length();
            if (word.regionMatches(ignoreCase, 0, filter, 0, len))
                {
                return true;
                }
            }
        return false;
        }
1177820
def validate(self, qstr, editing=True):
        """"""
        if self.selected_text == qstr and qstr != '':
            self.valid.emit(True, True)
            return

        valid = self.is_valid(qstr)
        if editing:
            if valid:
                self.valid.emit(True, False)
            else:
                self.valid.emit(False, False)
363693
def is_valid(self, instance):
        

        errors = self.errors(instance)

        if isinstance(errors, list):
            return not any(errors)

        return not bool(errors)
1279862
def _makeListOfCompletions(self, wordBeforeCursor, wholeWord):
        
        onlySuitable = [word for word in self._wordSet \
                                if word.startswith(wordBeforeCursor) and \
                                   word != wholeWord]

        return sorted(onlySuitable)
1025975
protected boolean filter(IWord word)
    {
        /*
         * normally word with length less than 2 will
         * be something, well could be ignored 
        */
        if ( word.getValue().length() < 2 ) {
            return false;
        }
        
        //type check
        switch ( word.getType() ) {
            //case IWord.T_BASIC_LATIN:
            case IWord.T_LETTER_NUMBER:
            case IWord.T_OTHER_NUMBER:
            case IWord.T_CJK_PINYIN:
            case IWord.T_PUNCTUATION:
            case IWord.T_UNRECOGNIZE_WORD: {
                return false;
            }
        }
        
        //part of speech check
        String[] poss = word.getPartSpeech();
        if ( poss == null ) return true;
        
        char pos = poss[0].charAt(0);
        switch ( pos ) {
            case 'e': {
                if ( poss[0].equals("en") ) return true;
                return false;
            }
            case 'm': {
                if ( poss[0].equals("mix") ) return true;
                return false;
            }
            case 'q':
            case 'b':
            case 'r':
            case 'z':
            case 'p':
            case 'c':
            case 'u':
            case 'y':
            case 'd':    //@date 2015-11-23
            case 'o':
            case 'h':
            case 'k':
            case 'g':
            case 'x':
            case 'w': {
                return false;
            }
            
            /*case 'n':
            case 'v':
            case 'a':
            case 't':
            case 's':
            case 'f':
            {
                return true;
            }*/
        }
        
        return true;
    }
372087
def valid (names):
    
    if isinstance(names, str):
        names = [names]
        assert is_iterable_typed(names, basestring)

    return all(name in __all_features for name in names)
899787
def rank(words: List[str], exclude_stopwords: bool = False) -> Counter:
    
    if not words:
        return None

    if exclude_stopwords:
        words = [word for word in words if word not in _STOPWORDS]

    return Counter(words)
375647
public static boolean is(String word){      
        if(word == null){
            return false;
        }
        word = word.trim();
        return isStopChar(word) || stopwords.contains(word);
    }
320610
def _checkremove_que(self, word):
        """"""

        in_que_pass_list = False

        que_pass_list = ['atque',
                        'quoque',
                        'neque',
                        'itaque',
                        'absque',
                        'apsque',
                        'abusque',
                        'adaeque',
                        'adusque',
                        'denique',
                        'deque',
                        'susque',
                        'oblique',
                        'peraeque',
                        'plenisque',
                        'quandoque',
                        'quisque',
                        'quaeque',
                        'cuiusque',
                        'cuique',
                        'quemque',
                        'quamque',
                        'quaque',
                        'quique',
                        'quorumque',
                        'quarumque',
                        'quibusque',
                        'quosque',
                        'quasque',
                        'quotusquisque',
                        'quousque',
                        'ubique',
                        'undique',
                        'usque',
                        'uterque',
                        'utique',
                        'utroque',
                        'utribique',
                        'torque',
                        'coque',
                        'concoque',
                        'contorque',
                        'detorque',
                        'decoque',
                        'excoque',
                        'extorque',
                        'obtorque',
                        'optorque',
                        'retorque',
                        'recoque',
                        'attorque',
                        'incoque',
                        'intorque',
                        'praetorque']

        if word not in que_pass_list:
            word = re.sub(r'que$', '', word)
        else:
            in_que_pass_list = True

        return word, in_que_pass_list
1217934
def correct_word(word_string):
    '''
    
    '''
    if word_string is None:
        return ""
    elif isinstance(word_string, str):
        return max(find_candidates(word_string), key=find_word_prob)
    else:
        raise InputError("string or none type variable not passed as argument to correct_word")
762902
def _find_spelling_errors_in_chunks(chunks,
                                    contents,
                                    valid_words_dictionary=None,
                                    technical_words_dictionary=None,
                                    user_dictionary_words=None):
    """"""
    for chunk in chunks:
        for error in spellcheck_region(chunk.data,
                                       valid_words_dictionary,
                                       technical_words_dictionary,
                                       user_dictionary_words):
            col_offset = _determine_character_offset(error.line_offset,
                                                     error.column_offset,
                                                     chunk.column)
            msg = _SPELLCHECK_MESSAGES[error.error_type].format(error.word)
            yield _populate_spelling_error(error.word,
                                           error.suggestions,
                                           contents,
                                           error.line_offset +
                                           chunk.line,
                                           col_offset,
                                           msg)