Ejemplo n.º 1
0
        public static AffixConfig Read(IHunspellLineReader reader, AffixConfig.Builder builder = null)
        {
            var readerInstance = new AffixReader(builder, reader);

            readerInstance.Read();

            return(readerInstance.Builder.MoveToImmutable());
        }
Ejemplo n.º 2
0
        public static async Task <AffixConfig> ReadAsync(IHunspellLineReader reader, AffixConfig.Builder builder = null)
        {
            var readerInstance = new AffixReader(builder, reader);

            await readerInstance.ReadAsync().ConfigureAwait(false);

            return(readerInstance.Builder.MoveToImmutable());
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
        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));
        }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 7
0
        public static WordList ReadFile(string dictionaryFilePath)
        {
            var affixFilePath = FindAffixFilePath(dictionaryFilePath);

            return(ReadFile(dictionaryFilePath, AffixReader.ReadFile(affixFilePath)));
        }