Exemplo n.º 1
0
        // cSpell main process: input str, output Str
        /// <summary>
        /// cSpell correction process, output to a string. Use funcmode and rankmode
        /// specified in the configuration file.
        /// </summary>
        /// <param name="inText">   input text to be corrected </param>
        /// <returns>  corrected text </returns>
        public virtual string ProcessToStr(string inText)
        {
            // use modes from configuration
            string outStr = CorrectionApi.ProcessToStr(inText, this);

            return(outStr);
        }
Exemplo n.º 2
0
        public string Correct(string input)
        {
            _logger.LogTrace($"Correction called");
            string outStr = CorrectionApi.ProcessToStr(input, this);

            return(outStr);
        }
Exemplo n.º 3
0
        /// <summary>
        /// cSpell correction process, output to a string by
        /// specifying funcMode and rankMode.
        /// </summary>
        /// <param name="inText">   input text to be corrected </param>
        /// <param name="funcMode"> funcMode for correction: NW/RW-Merge/Split/1To1 </param>
        /// <param name="rankMode"> rankMode for select correction from the candidate for NW
        ///                     Split/1To1 </param>
        /// <returns>  corrected text </returns>
        public virtual string ProcessToStr(string inText, int funcMode, int rankMode)
        {
            // update modes
            this.funcMode_ = funcMode;
            this.rankMode_ = rankMode;
            string outStr = CorrectionApi.ProcessToStr(inText, this);

            return(outStr);
        }