public Language Read() { var sw = new Stopwatch(); sw.Start(); _orthography = ReadOrthography(); Debug.Print($"orthograpy: {sw.ElapsedMilliseconds} ms"); sw.Restart(); Morphotactics morphotactics = ReadMorphotactics(); Debug.Print($"morphotactics: {sw.ElapsedMilliseconds} ms"); sw.Restart(); MorphemeSurfaceDictionary <Root> roots = ReadRoots(); Debug.Print($"roots: {sw.ElapsedMilliseconds} ms"); sw.Restart(); Suffixes suffixes = ReadSuffixes(); Debug.Print($"suffixes: {sw.ElapsedMilliseconds} ms"); sw.Restart(); int index = _dirPath.LastIndexOf("\\", StringComparison.Ordinal); string langCode = index > -1 ? _dirPath.Substring(index + 1) : _dirPath; return(new Language(langCode, morphotactics, roots, suffixes)); }
private MutableLanguage(LanguageType type, Orthography orthography, Morphotactics morphotactics, MorphemeContainer <Root> roots, MorphemeContainer <Suffix> suffixes) : base(type, orthography, morphotactics, roots, suffixes) { }
internal Language(string code, Morphotactics morphotactics, MorphemeSurfaceDictionary <Root> roots, Suffixes suffixes) { _code = code; Morphotactics = morphotactics; _roots = roots; _suffixes = suffixes; }
internal Language(LanguageType type, Orthography orthography, Morphotactics morphotactics, MorphemeContainer <Root> roots, MorphemeContainer <Suffix> suffixes) { Type = type; Orthography = orthography; Morphotactics = morphotactics; Roots = roots; Suffixes = suffixes; Analyzer = new WordAnalyzer(this); }