Sponsored Content
Full Discussion: spell checker program
Top Forums Shell Programming and Scripting spell checker program Post 72519 by zazzybob on Saturday 21st of May 2005 12:15:30 AM
Old 05-21-2005
Exactly - why rewrite commands unless it's homework.

Please read the rules.

This...
Quote:
dictionary words are listed in lower case. Thus 'spell-check'
will have to convert words in its input to lower case before
looking up the dictionary. However, when displaying possible
misspellings, words should be printed as they appear in input.
'spell-check' should take the path for the dictionary from
the environment variable SPELL_CHECK_DICT.

'spell-check' should treat any *sequence of letters* as a word.
Digits, whitespace, punctuation characters will act as delimiters.

It should be possible to use 'spell-check' in a pipe as:-
...is just a list of requirements taken from an assignment sheet.

Thread closed.

Thanks,
ZB
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Spell Check

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

2. UNIX for Advanced & Expert Users

spell

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

3. Shell Programming and Scripting

Shell Sript - Spell Checker Assign

Hi Folks. I am currently working on a script that has to spell check a file and print the output to the screen in 2 columns like this. INCORRECT CORRECTION whio who weahter weather The file will allow the user to override the ispell command and save any... (9 Replies)
Discussion started by: ccfc1986
9 Replies

4. Shell Programming and Scripting

spell check program

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

Need your help for the spell checker in unix or python

Hi, Want to know is there any command to correct the spelling using unix or python? Unix command "spell" will give only the list of the incorrect words . But i want the output along with the corrected word . Thanks in advance (1 Reply)
Discussion started by: vini
1 Replies

6. Homework & Coursework Questions

Unix Spell Checker Assignment

hello, im a new member to the forum and im doing a assignment for unix command and we have to make a spell checker and im a little confused about the directions .. ill post them below and continue.. Northern Illinois University CSCI 330-Unix Command Write a shell script that implements a... (1 Reply)
Discussion started by: bravens52
1 Replies

7. Homework & Coursework Questions

spell checker script

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

8. Shell Programming and Scripting

Help with Bash Shell Script Spell Checker program.

I have a majority of this problem done but seem to be struggling on the last couple of steps. Here is the whole problem to help you guys get a better understanding. Write a shell script that implements a simple spell checker. The filename you will use for your script will be your Z-id followed... (1 Reply)
Discussion started by: DsmRacer2k14
1 Replies

9. Debian

Getting a better spell checker

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
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)
All times are GMT -4. The time now is 11:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy