/// <summary>
        /// Gets the portuguese context generator.
        /// </summary>
        /// <returns>The portuguese context generator.</returns>
        public override ISentenceContextGenerator GetContextGenerator()
        {
            if (AbbreviationDictionary != null)
            {
                return(new PtSentenceContextGenerator(AbbreviationDictionary.ToList(), EOSCharacters));
            }


            return(new PtSentenceContextGenerator(EOSCharacters));
        }
Example #2
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));
        }