Config the number of suggestions
ndvbd opened this issue · 5 comments
How can we control the number of suggestions returned, or sensitivity?
For example, when doing: s.suggest('wuld')
, I get:
['wild', 'would', 'Wald', 'weld', 'wold']
But the word 'world' is missing. Is a way to control it?
In addition, the default English dictionary contains a lot of names (starting with capital letters). Is there a better dictionary file that contains only proper words?
AFAIR it's not possible, here is the list of options that somehow affects on suggestions:
sug-repl-table ('boolean', True, 'use replacement tables, override sug-mode default')
partially-expand ('boolean', False, 'partially expand affixes for better suggestions')
sug-typo-analysis ('boolean', True, 'use typo analysis, override sug-mode default')
sug-mode ('string', u'normal', 'suggestion mode')
reverse ('boolean', False, 'reverse the order of the suggest list')
sug-edit-dist ('integer', 1L, 'edit distance to use, override sug-mode default')
suggest ('boolean', True, 'suggest possible replacements')
sug-split-char ('list', [' ', '-'], 'characters to insert when a word is split')
You have to look up these options in the official aspell documentation.
Speaking of other dict files I didn't come across any.
When I try to run: aspell --sug-edit-dist=6 -a
I don't notice any change. Does this parameter work for you?
No, seems to be noop.
I assume you mean noop = no operation.
I there a documentation somewhere on how Aspell works, so people could contribute more easily to it?
You're right, I meant "no operation". Sorry for using slang. :)
I don't know any other source than the official website aspell.net.