internal static SpellChecker TryReadFrom(ObjectReader reader) { try { var formatVersion = reader.ReadString(); if (string.Equals(formatVersion, SerializationFormat, StringComparison.Ordinal)) { var checksum = Checksum.ReadFrom(reader); var bkTree = BKTree.ReadFrom(reader); if (bkTree != null) { return(new SpellChecker(checksum, bkTree)); } } } catch { Logger.Log(FunctionId.SpellChecker_ExceptionInCacheRead); } return(null); }
public SpellChecker(BKTree bKTree) { _bkTree = bKTree; }
public SpellChecker(Checksum checksum, IEnumerable <ReadOnlyMemory <char> > corpus) : this(checksum, BKTree.Create(corpus)) { }
public SpellChecker(Checksum checksum, BKTree bKTree) { Checksum = checksum; _bkTree = bKTree; }
public SpellChecker(Checksum checksum, IEnumerable <StringSlice> corpus) : this(checksum, BKTree.Create(corpus)) { }
public SpellChecker(VersionStamp version, IEnumerable <StringSlice> corpus) : this(version, BKTree.Create(corpus)) { }
public SpellChecker(VersionStamp version, BKTree bKTree) { Version = version; _bkTree = bKTree; }
internal static SpellChecker ReadFrom(ObjectReader reader) { return(new SpellChecker(BKTree.ReadFrom(reader))); }
public SpellChecker(IEnumerable <string> corpus) : this(BKTree.Create(corpus)) { }