public static WordList Read(Stream dictionaryStream, AffixConfig affix, WordList.Builder builder = null) { using (var reader = new StaticEncodingLineReader(dictionaryStream, affix.Encoding)) { return(Read(reader, affix, builder)); } }
public static WordList ReadFile(string dictionaryFilePath, string affixFilePath) { var affixBuilder = new AffixConfig.Builder(); var affix = AffixReader.ReadFile(affixFilePath, affixBuilder); var wordListBuilder = new WordList.Builder(affix, affixBuilder.FlagSetDeduper, affixBuilder.MorphSetDeduper, affixBuilder.StringDeduper); return(ReadFile(dictionaryFilePath, affix, wordListBuilder)); }
public static WordList Read(Stream dictionaryStream, Stream affixStream) { var affixBuilder = new AffixConfig.Builder(); var affix = AffixReader.Read(affixStream, affixBuilder); var wordListBuilder = new WordList.Builder(affix, affixBuilder.FlagSetDeduper, affixBuilder.MorphSetDeduper, affixBuilder.StringDeduper); return(Read(dictionaryStream, affix, wordListBuilder)); }
public static async Task <WordList> ReadFileAsync(string dictionaryFilePath, string affixFilePath) { var affixBuilder = new AffixConfig.Builder(); var affix = await AffixReader.ReadFileAsync(affixFilePath, affixBuilder).ConfigureAwait(false); var wordListBuilder = new WordList.Builder(affix, affixBuilder.FlagSetDeduper, affixBuilder.MorphSetDeduper, affixBuilder.StringDeduper); return(await ReadFileAsync(dictionaryFilePath, affix, wordListBuilder).ConfigureAwait(false)); }
public static async Task <WordList> ReadAsync(Stream dictionaryStream, Stream affixStream) { var affixBuilder = new AffixConfig.Builder(); var affix = await AffixReader.ReadAsync(affixStream, affixBuilder).ConfigureAwait(false); var wordListBuilder = new WordList.Builder(affix, affixBuilder.FlagSetDeduper, affixBuilder.MorphSetDeduper, affixBuilder.StringDeduper); return(await ReadAsync(dictionaryStream, affix, wordListBuilder).ConfigureAwait(false)); }
public static async Task <WordList> ReadFileAsync(string dictionaryFilePath, AffixConfig affix, WordList.Builder builder = null) { using (var stream = File.Open(dictionaryFilePath, FileMode.Open, FileAccess.Read, FileShare.Read)) { return(await ReadAsync(stream, affix, builder).ConfigureAwait(false)); } }
public static async Task <WordList> ReadAsync(Stream dictionaryStream, AffixConfig affix, WordList.Builder builder = null) { using (var reader = new StaticEncodingLineReader(dictionaryStream, affix.Encoding)) { return(await ReadAsync(reader, affix, builder).ConfigureAwait(false)); } }
public static async Task <WordList> ReadAsync(IHunspellLineReader dictionaryReader, AffixConfig affix, WordList.Builder builder = null) { var readerInstance = new WordListReader(builder, affix); string line; while ((line = await dictionaryReader.ReadLineAsync().ConfigureAwait(false)) != null) { readerInstance.ParseLine(line); } return(readerInstance.Builder.MoveToImmutable()); }
public static WordList ReadFile(string dictionaryFilePath, AffixConfig affix, WordList.Builder builder = null) { using (var stream = File.Open(dictionaryFilePath, FileMode.Open, FileAccess.Read, FileShare.Read)) { return(Read(stream, affix, builder)); } }
private WordListReader(WordList.Builder builder, AffixConfig affix) { Builder = builder ?? new WordList.Builder(affix); Affix = affix; }
public static WordList Read(IHunspellLineReader dictionaryReader, AffixConfig affix, WordList.Builder builder = null) { var readerInstance = new WordListReader(builder, affix); string line; while ((line = dictionaryReader.ReadLine()) != null) { readerInstance.ParseLine(line); } return(readerInstance.Builder.MoveToImmutable()); }