Get the SpellChecker to be used.
760793
private XSpellChecker GetSpellChecker(XLinguServiceManager mxLinguSvcMgr) {
    try {
      if (mxLinguSvcMgr != null) {
        return mxLinguSvcMgr.getSpellChecker();
      }
    } catch (Throwable t) {
      // If anything goes wrong, give the user a stack trace
      printMessage(t);
    }
    return null;
  }
466562
def spell(word):
    """"""
    w = Word(word)
    candidates = (common([word]) or exact([word]) or known([word]) or
                  known(w.typos()) or common(w.double_typos()) or
                  [word])
    correction = max(candidates, key=NLP_COUNTS.get)
    return get_case(word, correction)
858499
def check(text):
    """"""
    err = "pinker.latin"
    msg = "Use English. '{}' is the preferred form."

    list = [
        ["other things being equal",          ["ceteris paribus"]],
        ["among other things",                ["inter alia"]],
        ["in and of itself",                  ["simpliciter"]],
        ["having made the necessary changes", ["mutatis mutandis"]],
    ]

    return preferred_forms_check(text, list, err, msg)
1240438
def double_typos(self):
        """"""
        return {e2 for e1 in self.typos()
                for e2 in Word(e1).typos()}
1366792
def apply(self,word,ctx=None):
        
        chars = get_letters(word)
        flag = True #no error assumed
        reason = None #no reason
        prev_letter = None
        for char in chars:
            if prev_letter == char:
                flag = False
                break
            prev_letter = char # continue loop
        if not flag:
            reason = RepeatedLetters.reason
        return flag,reason
1358946
def tokenize_words(self, text):
        """"""
        return [
            self.strip_punctuation(word) for word in text.split(' ')
            if self.strip_punctuation(word)
        ]
291760
def _should_trigger_abbreviation(self, buffer):
        
        return any(self.__checkInput(buffer, abbr) for abbr in self.abbreviations)
1293973
public function spellCheck(string $text, string $languageFrom = ''): SpellCheckResponse
    {
        return $this->getSpellCheckApi()->checkTexts([$text], new Language($languageFrom));
    }
427016
def _run_spellcheck_linter(matched_filenames, cache_dir, show_lint_files):
    """"""
    from polysquarelinter import lint_spelling_only as lint
    from prospector.message import Message, Location

    for filename in matched_filenames:
        _debug_linter_status("spellcheck-linter", filename, show_lint_files)

    return_dict = dict()

    def _custom_reporter(error, file_path):
        line = error.line_offset + 1
        key = _Key(file_path, line, "file/spelling_error")
        loc = Location(file_path, None, None, line, 0)
        # suppress(protected-access)
        desc = lint._SPELLCHECK_MESSAGES[error.error_type].format(error.word)
        return_dict[key] = Message("spellcheck-linter",
                                   "file/spelling_error",
                                   loc,
                                   desc)

    # suppress(protected-access,unused-attribute)
    lint._report_spelling_error = _custom_reporter
    lint.main([
        "--spellcheck-cache=" + os.path.join(cache_dir, "spelling"),
        "--stamp-file-path=" + os.path.join(cache_dir,
                                            "jobstamps",
                                            "polysquarelinter"),
        "--technical-terms=" + os.path.join(cache_dir, "technical-terms"),
    ] + matched_filenames)

    return return_dict
515015
def _spelling_pipeline(self, sources, options, personal_dict):
        """"""

        for source in self._pipeline_step(sources, options, personal_dict):
            # Don't waste time on empty strings
            if source._has_error():
                yield Results([], source.context, source.category, source.error)
            elif not source.text or source.text.isspace():
                continue
            else:
                encoding = source.encoding
                if source._is_bytes():
                    text = source.text
                else:
                    # UTF-16 and UTF-32 don't work well with Aspell and Hunspell,
                    # so encode with the compatible UTF-8 instead.
                    if encoding.startswith(('utf-16', 'utf-32')):
                        encoding = 'utf-8'
                    text = source.text.encode(encoding)
                self.log('', 3)
                self.log(text, 3)
                cmd = self.setup_command(encoding, options, personal_dict)
                self.log("Command: " + str(cmd), 4)

                try:
                    wordlist = util.call_spellchecker(cmd, input_text=text, encoding=encoding)
                    yield Results(
                        [w for w in sorted(set(wordlist.replace('\r', '').split('\n'))) if w],
                        source.context,
                        source.category
                    )
                except Exception as e:  # pragma: no cover
                    err = self.get_error(e)
                    yield Results([], source.context, source.category, err)
212827
def updateCheckedText(self):
        
        if not self.isCheckable():
            return
        
        indexes = self.checkedIndexes()
        items = self.checkedItems()

        if len(items) < 2 or self.separator():
            self.lineEdit().setText(self.separator().join(items))
        else:
            self.lineEdit().setText('{0} items selected'.format(len(items)))
        
        if not self.signalsBlocked():
            self.checkedItemsChanged.emit(items)
            self.checkedIndexesChanged.emit(indexes)
876367
def check(text):
    """"""
    err = "typography.diacritical_marks"
    msg = u"Use diacritical marks in '{}'."

    list = [
        # French loanwords
        [u"beau idéal",         ["beau ideal"]],
        [u"boutonnière",        ["boutonniere"]],
        [u"bric-à-brac",        ["bric-a-brac"]],
        [u"café",               ["cafe"]],
        [u"cause célèbre",      ["cause celebre"]],
        [u"chèvre",             ["chevre"]],
        [u"cliché",             ["cliche"]],
        [u"comme ci comme ça",  ["comme ci comme ca", "comsi comsa"]],
        [u"consommé",           ["consomme"]],
        [u"coup d'état",        ["coup d'etat"]],
        [u"coup de grâce",      ["coup de grace"]],
        [u"crudités",           ["crudites"]],
        [u"crème brûlée",       ["creme brulee"]],
        [u"crème de menthe",    ["creme de menthe"]],
        [u"crème fraîche",      ["creme fraice"]],
        [u"crème fraîche",      ["creme fresh"]],
        [u"crêpe",              ["crepe"]],
        [u"débutante",          ["debutante"]],
        [u"décor",              ["decor"]],
        [u"déjà vu",            ["deja vu"]],
        [u"dénouement",         ["denouement"]],
        [u"façade",             ["facade"]],
        [u"fiancé",             ["fiance"]],
        [u"fiancée",            ["fiancee"]],
        [u"flambé",             ["flambe"]],
        [u"garçon",             ["garcon"]],
        [u"lycée",              ["lycee"]],
        [u"maître d",           ["maitre d"]],
        [u"ménage à trois",     ["menage a trois"]],
        [u"négligée",           ["negligee"]],
        [u"papier-mâché", ["papier-mache", "paper mache", "paper-mache"]],
        [u"protégé",            ["protege"]],
        [u"protégée",           ["protegee"]],
        [u"purée",              ["puree"]],
        [u"raison d'être",      ["raison d'etre"]],
        [u"my résumé",          ["my resume"]],
        [u"your résumé",        ["your resume"]],
        [u"his résumé",         ["his resume"]],
        [u"her résumé",         ["her resume"]],
        [u"a résumé",           ["a resume"]],
        [u"the résumé",         ["the resume"]],
        [u"risqué",             ["risque"]],
        [u"roué",               ["roue"]],
        [u"soirée",             ["soiree"]],
        [u"soufflé",            ["souffle"]],
        [u"soupçon",            ["soupcon"]],
        [u"touché",             ["touche"]],
        [u"tête-à-tête",        ["tete-a-tete"]],
        [u"voilà",              ["voila"]],
        [u"à la carte",         ["a la carte"]],
        [u"à la mode",          ["a la mode"]],
        [u"émigré",             ["emigre"]],

        # Spanish loanwords
        [u"El Niño",            ["El Nino"]],
        [u"jalapeño",           ["jalapeno"]],
        [u"La Niña",            ["La Nina"]],
        [u"piña colada",        ["pina colada"]],
        [u"señor",              ["senor"]],
        [u"señora",             ["senora"]],
        [u"señorita",           ["senorita"]],

        # Portuguese loanwords
        [u"açaí",               ["acai"]],

        # German loanwords
        [u"doppelgänger",       ["doppelganger"]],
        [u"Führer",             ["Fuhrer"]],
        [u"Gewürztraminer",     ["Gewurztraminer"]],
        [u"vis-à-vis",          ["vis-a-vis"]],
        [u"Übermensch",         ["Ubermensch"]],

        # Swedish loanwords
        [u"filmjölk",           ["filmjolk"]],
        [u"smörgåsbord",        ["smorgasbord"]],

        # Names, places, and companies
        [u"Beyoncé",            ["Beyonce"]],
        [u"Brontë",             ["Bronte"]],
        [u"Brontë",             ["Bronte"]],
        [u"Champs-Élysées",     ["Champs-Elysees"]],
        [u"Citroën",            ["Citroen"]],
        [u"Curaçao",            ["Curacao"]],
        [u"Häagen-Dazs",        ["Haagen-Dazs", "Haagen Dazs"]],
        [u"Löwenbräu",          ["Lowenbrau"]],
        [u"Monégasque",         ["Monegasque"]],
        [u"Mötley Crüe",        ["Motley Crue"]],
        [u"Nescafé",            ["Nescafe"]],
        [u"Queensrÿche",        ["Queensryche"]],
        [u"Québec",             ["Quebec"]],
        [u"Québécois",          ["Quebecois"]],
        [u"Ångström",           ["Angstrom"]],
        [u"ångström",           ["angstrom"]],
        [u"Škoda",              ["Skoda"]],
    ]

    return preferred_forms_check(text, list, err, msg)
303936
private JSONObject getJsonFormattedSpellcheckResult(CmsSpellcheckingRequest request) {

        final JSONObject response = new JSONObject();

        try {
            if (null != request.m_id) {
                response.put(JSON_ID, request.m_id);
            }

            response.put(JSON_RESULT, request.m_wordSuggestions);

        } catch (Exception e) {
            try {
                response.put(JSON_ERROR, true);
                LOG.debug("Error while assembling spellcheck response in JSON format.", e);
            } catch (JSONException ex) {
                LOG.debug("Error while assembling spellcheck response in JSON format.", ex);
            }
        }

        return response;
    }
690940
def spelling(self):
        """"""
        if not hasattr(self, '_spelling'):
            self._spelling = conf.lib.clang_getCursorSpelling(self)

        return self._spelling
137200
@SuppressWarnings("unchecked")
   public void setSpellCheckerClass(String className)
   {
      try
      {
         Class<?> clazz = ClassLoading.forName(className, this);
         if (SpellChecker.class.isAssignableFrom(clazz))
         {
            spellCheckerClass = (Class<? extends SpellChecker>)clazz;
         }
         else
         {
            log.warn("Invalid value for spellCheckerClass, {} " + "does not implement SpellChecker interface.",
               className);
         }
      }
      catch (ClassNotFoundException e)
      {
         log.warn("Invalid value for spellCheckerClass," + " class {} not found.", className);
      }
   }
855757
def spellcheck_results(self):
        """"""
        if not self.is_tagged(WORDS):
            self.tokenize_words()
        return vabamorf.spellcheck(self.word_texts, suggestions=True)
192292
def register(linter):
    ''' '''
    linter.register_checker(StringCurlyBracesFormatIndexChecker(linter))
    linter.register_checker(StringLiteralChecker(linter))