Open gdetari opened 16 hours ago
I think we already do exactly this. Edits is a recursive method. Only in the first iteration we unconditionally calculate and add deletes. That is because we always have maxDictionaryEditDistance>=1. But the second and following iterations of Edits are done only if editDistance < maxDictionaryEditDistance.
In the following function:
Would it make sense to only add to calculate and add the words to
deleteWords
ifeditDistance < maxDictionaryEditDistance
is true? That is quite a difference in loading dictionary performance. It does change the functionality, but isn't that the correct approach not to add the words anyhow?