Menu

#37 Let pipe-mode report when checking of line is complete

closed
nobody
None
5
2016-12-11
2005-04-06
kgc
No

When using aspell in pipe-mode to spellcheck text in an
editor, I'm sending one line at a time, and using the
line-relative offsets to highlight the misspelled words
(based on line-number + offset from aspell).
Unfortunately I have no way of knowing whether there is
no more misspelled words on the current line, or if
aspell just haven't finished checking yet.

One way to remedy this, is counting words on the line,
and counting lines read from aspell. Unfortunately this
requires my word-counting algorithm to match the one of
aspell exactly, so this is a bad solution. Another is
using some kind of timeout, but this adds extra time
waiting-time for each line checked - very bad solution,
and difficult to implement in a bean-shell macro!

A thrid way is to add a known misspelled word to the
end of each line, for example: endOfOutputHack or
something. When my app gets an error-report for the
misspelled word "endOfOutputHack", it knows that there
is no more output to read for the current line, so the
next line can be written to aspell.

A nice feature to make all this easier, would be adding
a "semi-terse-mode" or something, where aspell will
only output lines for the misspelled words (no need for
stars for correctly spelled words), and then output
some control-string (#end or whatever) for each checked
line.

An example of what I would like to see:
run: aspell -a
input: !! (or some other control-sequence to enter the
new mode)
input: this is worngly spelled
output:
& worngly 9 8: ...
#end (or something else to tell that there is no more
misspellings)
input: no mistakes here
output:
#end
etc.

Best regards

Kasper

Discussion

  • Kevin Atkinson

    Kevin Atkinson - 2016-12-11

    This issue has moved to GitHub: https://github.com/GNUAspell/aspell/issues/276

     
  • Kevin Atkinson

    Kevin Atkinson - 2016-12-11
    • Status: open --> closed
     
MongoDB Logo MongoDB