INNER CODE UNIT · Python

doc_suggestions_spell_check

R1j1t/contextualSpellCheck · contextualSpellCheck/contextualSpellCheck.py:533

    def doc_suggestions_spell_check(doc):
        """
        Getter for Doc attribute

        Args:
            doc {`Spacy.Doc`} :Doc object for which value should be returned

        Returns:
            Dict(`Spacy.Token`:List(str)) :{misspell-1: ['suggestion-1',
                                            'suggestion-2'...]}
        """
        response = {}
        if doc._.score_spellCheck is None:
            return response
        for token in doc._.score_spellCheck:
            if token not in response:
                response[token] = []
            for suggestion_score in doc._.score_spellCheck[token]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…