Discussion:
[Aspell-user] Passing word to aspell via command line...
Russell Jones
2016-07-29 20:42:20 UTC
Permalink
Ideally, I would like to interact with aspell directly via the command line
rather than through an external file or interactive pipe mode so that I can
easily capture the output

something like...

aspell -w basball

Or do I really have to create a 1-line file with that word in it and then
run aspell -c file.txt to check that one word?
--
Russ Jones
Principal Search Scientist
***@moz.com
@rjonesx
t***@dp.dm.unipi.it
2016-07-30 05:26:37 UTC
Permalink
Russell> Ideally, I would like to interact with aspell directly
Russell> via the command line rather than through an external file
Russell> or interactive pipe mode so that I can easily capture the
Russell> output

Russell> something like...

Russell> aspell -w basball

Russell> Or do I really have to create a 1-line file with that
Russell> word in it and then run aspell -c file.txt to check that
Russell> one word?

You can use 'aspell -a' e.g.

echo basball | aspell -a

***@iro:~$ echo basball | aspell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7-20110707)
& basball 11 0: baseball, baseballs, basally, basal, barbell, baseball's, Babel, Basel, Basil, babel, basil
***@iro:~$ echo basball | aspell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7-20110707)
*
***@iro​:~$

Assuming of course that you want to handle the suggestions.


If you want just to check if a word is OK, you can use 'aspell list', e.g.

***@iro:~$ echo basball | aspell list
basball
***@iro:~$ echo baseball | aspell list
***@iro:~$


Carlo Traverso

Loading...