aboutsummaryrefslogtreecommitdiff
path: root/Readme.md
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-08-26 14:54:49 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-08-26 15:02:38 +0200
commitbf63501ac14207e687b85eba2aa585fc103111f7 (patch)
treec7cf55580eee1718bb4f23d971818ffc18494b0f /Readme.md
parente0c59627c5adf95a2da57867f82c81970d123a93 (diff)
downloadvis-spellcheck-bf63501ac14207e687b85eba2aa585fc103111f7.tar.gz
vis-spellcheck-bf63501ac14207e687b85eba2aa585fc103111f7.zip
implement a new algorithm which calls the external spellchecker at most once
We collect all typos for the current viewport (This is not sound because the viewport we get from vis.win.viewport must not be from the window we currently lex). Then we iterate over both the token stream and the typo stream, adding the token end to the new token stream if it is smaller than the start of the current typo or not a token we spellcheck and advance the token stream. Otherwise we add the token part before our current typo if present and the highlight token representing the typo and advance our typo stream. After we handled all typos we add each leftover token to the new token stream. Typos are cached and reused if the possible viewport and the data we lex are unchanged. (This is sound because, either data is unchanged then we may call the external spellchecker for nothing, or data is the same as last time then the typos haven't changed)
Diffstat (limited to 'Readme.md')
0 files changed, 0 insertions, 0 deletions