コード例 #1
0
        public override sealed bool InitParagraph(RangeWrapper par)
        {
            if (par == null || !par.IsRangeValid)
            {
                return(false);
            }

            m_mainPar = par.GetCopy();

            RefreshContent();

            if (String.IsNullOrEmpty(m_rawContent))
            {
                return(false);
            }

            string refinedContent = StringUtil.RefineAndFilterPersianWord(m_rawContent);

            if (String.IsNullOrEmpty(refinedContent))
            {
                return(false);
            }

            string strToVerify = this.NeedRefinedStrings ? refinedContent : m_rawContent;

            if (!base.IsInteractiveMode)
            {
                m_batchHistory.Clear();
                m_isLoopDetected = false;
            }

            return(InitParagraphString(strToVerify));
        }
コード例 #2
0
        public override bool InitParagraph(RangeWrapper par)
        {
            m_mainPar = par;
            if (par == null || !par.IsRangeValid)
            {
                return(false);
            }

            m_remainedParagraph = m_mainPar.GetCopy();
            m_progInd           = 0;
            return(true);
            //m_curProcType = ProceedTypes.Finished;
        }
コード例 #3
0
        public override bool InitParagraph(RangeWrapper par)
        {
            // TODO: make sure that creating a copy is needed
            m_curPar = par.GetCopy();
            if (m_wordTokenizer == null)
            {
                m_wordTokenizer = new WordTokenizer(TokenizerOptions);
            }

            if (!RefreshContents())
            {
                return(false);
            }

            m_etorNGramVerifs = null;
            m_roundq.Clear();
            m_rangeRepairOffset = 0;
            return(true);
        }