11-10-2008
Hi,
The first example below is what you have suggested. Since I want only the first value, I have added some code as shown in example 2 below. Is there a better way to do what I am trying? Is there any way to remove the extra enter mark?
# echo thiis |aspell -a
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.3)
& thiis 21 0: this, Thais, thous, thus, Thia's, Thurs, theirs, thighs, Th's, thins, Thieu's, thaws, thees, thews, Theo's, Thor's, Thur's, thigh's, Thar's, Thea's, thew's
# echo thiis |aspell -a | awk -F: '{print $2}' | awk '{print $1}' | sed s/,//g
this
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
2.I need shell script to list all the 'words' in a
given file (text) that are not listed in a specified
dictionary. Let us call this utility 'spell-check'.
'spell-check' will be called as follows.
$ spell-check letter
Lucent
UNIX
UNIX
OS
a
$
dictionary words are listed in lower... (2 Replies)
Discussion started by: ksjanakan
2 Replies
2. Post Here to Contact Site Administrators and Moderators
Administrator/Moderators,
I would like to put forth a request rather a suggestion in other words.
How about the inclusion of 'SPELL CHECK' tool along with existing submit reply and preview post tools?
I believe that would be very much helpful in understanding questions clearly deprived of... (2 Replies)
Discussion started by: matrixmadhan
2 Replies
3. UNIX for Advanced & Expert Users
Hi,
I found the following line in a shell script.
$spell -a < $filename | \
grep -v '@(#)' | sed "s/\'//g" | \
awk '{ if (length($0) > 15 && length($2) > 2) print $2 }' | \
grep -vif $okaywords | \
grep ']' | grep -v ']' | sort -u | \
sed 's/^/ /' > $tempout
can... (2 Replies)
Discussion started by: ravi raj kumar
2 Replies
4. Shell Programming and Scripting
hi,
i need to write a spell check program in bash to find all possible spelling errors in a file or a number of files taken as input using usr/dict/words.
whenever the program encounters a spelling error, it must state the line number at which the incorrect spelling has occured and... (1 Reply)
Discussion started by: kratos.
1 Replies
5. Shell Programming and Scripting
Hi,
I am trying automate couting number of spell and typo errors in MS Word document using perl script.
In perl script, i am using Win32::OLE module of perl to read MS word document.
Can anybody tell me are there any modules available in perl which can be imported into my script to... (0 Replies)
Discussion started by: 123an
0 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
When "niuspell" is invoked from the command line it reads "file" and checks it for spelling of the words it... (1 Reply)
Discussion started by: Jeffthrow5
1 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
What the program is suppose to do is input a word and when the user press enter the result should read the word... (6 Replies)
Discussion started by: mgyeah
6 Replies
8. Shell Programming and Scripting
I have this assignment and I am not sure how to start it, I am new any help will be appreciated....
(BASH)
Let us say a test is conducted to assess the typing speed for applicants. We need to count # of correctly spelled words and penalize for incorrectly spelled words.
score = (# of... (1 Reply)
Discussion started by: shilling
1 Replies
9. Debian
Guys I am new to Linux in general and want to know what is the use of the following files-:
/usr/share/dict/words
/usr/share/dict/words.pre-dictionaries-common
Are they used by the spell checker to find potential typos ?
If so are there any better larger word lists out there ? I am sure... (2 Replies)
Discussion started by: sreyan32
2 Replies
LEARN ABOUT DEBIAN
sgml-spell-checker
sgml-spell-checker(1) SGML sgml-spell-checker(1)
NAME
sgml-spell-checker - SGML spell checker
SYNOPSIS
nsgmls -l yourdoc.sgml | sgml-spell-checker [option] ...
DESCRIPTION
sgml-spell-checker is a tool that you can use to automatically spell-check your SGML documents. One of the advantages of this tool over
some other SGML-aware spell checkers is that it scans your documents in the form in which the SGML parser actually sees it, which means it
is not line-based, system entities are resolved, marked sections are treated appropriately, etc.
Also, this tool can be made aware of particular DTDs, in the sense that it knows not to spell-check the content of elements that do not
represent human-language text, such as <programlisting> in DocBook. An exclusion list for the DocBook DTD is included, others can be added
trivially.
The input to sgml-spell-checker is the text representation of your SGML document's Element Structure Information Set as generated by nsgmls
(from SP or OpenSP; sometimes installed under the name onsgmls). In other words, you need to pipe the output of nsgmls into sgml-spell-
checker as shown in the synopsis. Provide to nsgmls the options you need, such as -c to search more catalogs, -i to include a marked sec-
tion, or more source files. Do not forget the -l option, or you won't get any file or line references for the misspellings.
The second part of the pipe takes a couple of options; see below. Note that if the language of the document does not match your system's
locale settings, you need to use the --language option.
The output of sgml-spell-checker is a list of the words that are misspelled (in the opinion of aspell), together with file name and line
number. Note that the line number designates where the element that contains the word started, not where the word actually is. So most
likely you will have to search a few lines below the indicated location.
OPTIONS
--debug
Debug mode. Generates lots of output not of interest to the normal user.
--language=language
Sets the language of the document. (The format depends on the aspell installation, but something like en or en_US should work.) By
default the language is taken from the system locale settings.
--suggestions
Shows correction suggestions for misspelled words.
--dictionary=file
Uses an additional aspell dictionary file. This option may be used multiple times.
--dtd=dtd
Uses the exclusion list for the specified DTD (e.g., docbook).
--help Shows a brief help, then exits.
EXAMPLES
nsgmls -l -D . mydoc.sgml |
sgml-spell-checker --language=en --dtd=docbook
--dictionary=mydict1.aspell --dictionary=mydict2.aspell
(You can enter this command all on one line without the backslashes, or on several lines with the backslashes.)
NOTES
Read the aspell documentation about how to set up the appropriate dictionaries. In case you're having trouble interpreting the aspell doc-
umentation, here's how to make an aspell dictionary file from a flat word list:
rm -f mydict1.aspell # aspell won't overwrite existing files
aspell --language-tag=xx create master ./mydict1.aspell < mywordlist.txt
Watch the slashes. aspell likes to see a slash in the name or it will search some default location.
BUGS
This program should be able to identify the language from the document (e.g., <book lang="de">), but aspell doesn't handle changing the
language on the fly.
AUTHOR
Peter Eisentraut (peter_e@gmx.net)
SGML spell checker 2004-09-19 sgml-spell-checker(1)