-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
SymSpell.Lookup() assumes every input string as single term. SymSpell.LookupCompound() supports compound aware automatic spelling correction of multi-word input strings.
LookupCompound will return the complete automatically corrected text. There is no specific information returned about which words have been corrected, about their position in the text, nor multiple variants of suggestions per word. It uses Naive Bayes probability for automatically selecting best word splittings/corrections across the whole text. SymSpell is an algorithm, rather than a turn-key spelling correction tool. Its purpose is to find all terms/candidates from a large dictionary which are within a maximum edit distance (Damerau-Levenshtein) to an input term in a very short time (to my knowledge much faster than any other algorithm). The main purpose of the SymSpell library was to provide a sample implementation of the algorithm, to showcase the speed of the algorithm and to allow an easy integration and customization. While SymSpell is not a replacement for a turn-key spelling correction tool, it can be used as core technology to build one if speed is an issue. So, the exact functionality you are asking for is currently not implemented in SymSpell. But the SymSpell algorithm/library could easily used/extended to implement it. |
Beta Was this translation helpful? Give feedback.
SymSpell.Lookup() assumes every input string as single term.
Lookup (with verbosity set to SymSpell.Verbosity.All) will return all suggestions (within a given maximum-edit distance) ordered by edit-distance, then by word frequency.
SymSpell.LookupCompound() supports compound aware automatic spelling correction of multi-word input strings.
It supports compound splitting / decompounding with three cases:
LookupCompound will return the complete automatically corrected text. There is…