diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-08-26 14:54:49 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-08-26 15:02:38 +0200 |
| commit | bf63501ac14207e687b85eba2aa585fc103111f7 (patch) | |
| tree | c7cf55580eee1718bb4f23d971818ffc18494b0f /Readme.md | |
| parent | e0c59627c5adf95a2da57867f82c81970d123a93 (diff) | |
| download | vis-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
