def check_word_and_suggest( self,word ):         
        word = word.strip()
        # remove punctuation
        for x in string.punctuation:
            word = word.replace(x,u"")
        # remove digits
        word = re.sub(u'\d+',u'',word)
        letters = tamil.utf8.get_letters(word)
        TVU_dict = self.get_lang_dictionary()
        
        if not self.checklang(word):
            return (False,[u''])
        
        if len(word) < 1:
            return (False,[u''])
        
        # plain old dictionary + user dictionary check
        if self.isWord(word):
            return (True,word)
        
        # Remove case and redo the dictionary + user check
        word_nocase = self.case_filter.apply( word )
        if ( self.isWord( word_nocase ) ):
            return (True,word_nocase)
        else:
            word = word_nocase
        
        # Consider splitting the word and see if it has 2 sub-words
        # e.g. செயல்பட => செயல் + பட
        alt = tamil.wordutils.greedy_split(word,TVU_dict)
        if len(alt) >= 1:
            greedy_results = [u" ".join(alt),u"-".join(alt)]
            greedy_results.extend(alt)
        #return (False, results )
        else:
            greedy_results = list()
        
        # TODO: Noun Declension - ticket-
        
        # suggestions at edit distance 1
        norvig_suggests = filter( TVU_dict.isWord, norvig_suggestor( word, self.alphabets, 2,limit=50))
        combinagram_suggests = list(tamil.wordutils.combinagrams(word,TVU_dict,limit=50)) 
        pfx_options = TVU_dict.getWordsStartingWith( u"".join( letters[:-1] ) )
        
        # FIXME: score  the options
        options = greedy_results
        options.extend( list(norvig_suggests))
        options.extend( combinagram_suggests )
        options.extend( pfx_options )
        
        # sort the options
        if self.lang == u"en":
            options.sort()
        else:
            if PYTHON3:
                options = sorted( options, key=functools.cmp_to_key(tamil.utf8.compare_words_lexicographic) )
            else:
                options = sorted( options, cmp=tamil.utf8.compare_words_lexicographic )
        
        # remove replacements with single-letter words
        WL = len(tamil.utf8.get_letters(word))
        if WL > 3:
            options = filter( lambda x:  2 > len(tamil.utf8.get_letters(x)), options )
        
        # remove dupes in list
        options2 = []
        prev = None
        for val in options:
            if val.strip() != prev:
                options2.append(val.strip())
            prev = val.strip()
        del options
        
        # score by Dice coefficients
        options_score = [0.0 for i in range(len(options2))]
        for itr,sugg_word in enumerate(options2):
            options_score[itr] = Dice_coeff( word, sugg_word )
        options = zip( options2, options_score)
        
        # limit options by score
        options = sorted(options,key=operator.itemgetter(1),reverse=True)
        options = [word_pair[0] for word_pair in options]
        
        L = 20
        # limit to first top -L=20 only which is good enough
        options = options[0:min(len(options),L)]
        
        return (False, options )
dataset/ETHPy150Open Ezhil-Language-Foundation/open-tamil/spell/spell.py/Speller.check_word_and_suggest/swapped operands of `>`