public void run(string text, bool splitBySmiles, ProcessSentCallbackDelegate processSentCallback) { _ProcessSentCallback = processSentCallback; fixed(char *_base = text) fixed(CharType * ctm = xlat.CHARTYPE_MAP) fixed(NERCharType * nctm = NER_CHARTYPE_MAP) { _BASE = _base; _CTM = ctm; _NCTM = nctm; _SentSplitter.SplitBySmiles = splitBySmiles; _SentSplitter.AllocateSents(text, ProcessSentSplitterCallback); } _ProcessSentCallback = null; }
public List <buildmodel_word_t> run4ModelBuilder( string partOfSentText, bool isLastPartOfSentText, NerOutputType nerOutputType, bool prevPartOfSentTextSameNerOutputType) { _BuildModelWords.Clear(); if (prevPartOfSentTextSameNerOutputType) { _BuildModelNerInputTypeI = nerOutputType.ToBuildModelNerInputTypeI(); _BuildModelNerInputTypeB = _BuildModelNerInputTypeI; } else { _BuildModelNerInputTypeI = nerOutputType.ToBuildModelNerInputTypeI(); _BuildModelNerInputTypeB = nerOutputType.ToBuildModelNerInputTypeB(); } _ProcessSentCallback = ProcessSentCallbackModelBuilder; fixed(char *_base = partOfSentText) fixed(CharType * ctm = xlat.CHARTYPE_MAP) fixed(NERCharType * nctm = NER_CHARTYPE_MAP) { _BASE = _base; _CTM = ctm; _NCTM = nctm; _NotSkipNonLetterAndNonDigitToTheEnd = !isLastPartOfSentText; var urls = _UrlDetector.AllocateUrls(partOfSentText); _BuildModelSent.Set4ModelBuilder(0, partOfSentText.Length, (0 < urls.Count) ? urls : null); ProcessSentSplitterCallback(_BuildModelSent); _NotSkipNonLetterAndNonDigitToTheEnd = false; } _ProcessSentCallback = null; return(_BuildModelWords); }