Ejemplo n.º 1
0
        public Dictionary(DictionaryLoader loader, string name, string path, char[] alphabet, char[] specialChars = null, string wordBoundaryRegex = null, Dictionary<char, List<char>> accentPairs = null)
        {
            Name = name;
            Alphabet = alphabet;
            specialCharsInsideWord = specialChars;

            this.path = path;
            this.wordBoundaryRegex = wordBoundaryRegex;
            this.accentPairs = accentPairs;
            this.loader = loader;

            this.AlphabetWithSpecialCharsCache = this.GetAlphabetForErrorModel(true).ToCharArray();
        }
Ejemplo n.º 2
0
        private DictionaryLoader CreateDefaultLoader()
        {
            DictionaryLoader loader = new DictionaryLoader(
                new DefaultDictionaryFileParser(),
                new DefaultAffixFileParser(),
                new ConfusionMatrixParser(),
                new FrequencyVectorParser(),
                new NgramParser()
            );

            return loader;
        }