コード例 #1
0
        /// <summary>
        /// Gets the context generator.
        /// </summary>
        /// <returns>ISentenceContextGenerator.</returns>
        public virtual ISentenceContextGenerator GetContextGenerator() {
            var f = new Factory();

            var abbreviations = AbbreviationDictionary != null ? AbbreviationDictionary.ToList() : new List<string>();

            if (EOSCharacters != null && EOSCharacters.Length > 0) {
                return f.CreateSentenceContextGenerator(abbreviations, EOSCharacters);
            }

            return f.CreateSentenceContextGenerator(LanguageCode, abbreviations);
        }
コード例 #2
0
 /// <summary>
 /// Gets the end of sentence scanner.
 /// </summary>
 /// <returns>IEndOfSentenceScanner.</returns>
 public IEndOfSentenceScanner GetEndOfSentenceScanner() {
     var f = new Factory();
     if (EOSCharacters != null && EOSCharacters.Length > 0) {
         return f.CreateEndOfSentenceScanner(EOSCharacters);
     }
     return f.CreateEndOfSentenceScanner(LanguageCode);
 }