Sponsored Content
Full Discussion: Using diff for spellchecking
Top Forums Shell Programming and Scripting Using diff for spellchecking Post 302562458 by jlam9012 on Friday 7th of October 2011 01:35:55 AM
Old 10-07-2011
Using diff for spellchecking

Hi,

I am attempting to use diff for the purpose of spell checking. Here is what I have thus far. I am using the Bourne shell (sh).

Code:
diff -i list.txt '/usr/share/dict/words'

I am comparing my list of words (list.txt) with another list (a dictionary).

Here is what is contained in list.txt:
Code:
brown
brown
brown
fjkjk
fox
fox
I
I
I
I
is
is
is
is
the
the
The
this
this
this
this
Thursday
Today

I get output like the following: (just a part of the output)

Code:
> browis
> browless
> browman
3,4c53558,75240
< brown
---
> brown-armed
> brownback
> brown-backed

I thought that the "<" meant that the word was found in my file but not in the dictionary and thus not a correctly spelled word. However, it is doing this for "brown" as well as others later down the list. I also think that the ">" means that the word is in the dictionary but not in my file, meaning just that I can ignore it. I need some way of getting words that aren't in the dictionary using the diff utility.

Thanks for your time
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

diff and ed?

I am trying to use the diff command to find the differences between two txt files. From here, I wish to use the ed command to create the first file from the second file. I am fairly new to unix, and I haven't got a clue how to do this. Can anyone help me please? Cheers (2 Replies)
Discussion started by: Brototype
2 Replies

2. Shell Programming and Scripting

diff 2 files; output diff's to 3rd file

Hello, I want to compare two files. All records in file 2 that are not in file 1 should be output to file 3. For example: file 1 123 1234 123456 file 2 123 2345 23456 file 3 should have 2345 23456 I have looked at diff, bdiff, cmp, comm, diff3 without any luck! (2 Replies)
Discussion started by: blt123
2 Replies

3. Shell Programming and Scripting

Diff b/w $@ and $#

Hello, Pls explain the difference between $# and $@, and how its used in shell scripting . Thanks in advance (4 Replies)
Discussion started by: PradeepRed
4 Replies

4. UNIX for Dummies Questions & Answers

diff

hi all, i want to do this shell script. create a script that will check the transferred file vs. orig file. 1. diff the file1 and file2 2. if difference found, retain the original file and email to netcracker team. 3. if no difference found, delete the previous file and retain... (3 Replies)
Discussion started by: tungaw2004
3 Replies

5. Shell Programming and Scripting

Simulate SVN diff using plain diff

Hi, svn diff does not work very well with 2 local folders, so I am trying to do this diff using diff locally. since there's a bunch of meta files in an svn directory, I want to do a diff that excludes everything EXCEPT *.java files. there seems to be only an --exclude option, so I'm not sure... (3 Replies)
Discussion started by: ackbarr
3 Replies

6. UNIX for Dummies Questions & Answers

Using diff

is there any way to make the diff function compare 1 folder to another instead of just file to file? also, can binary files be compared? (2 Replies)
Discussion started by: puzzler
2 Replies

7. UNIX for Dummies Questions & Answers

Diff between more and less

Hi, Can anyone tell me the diff between the two filters "more" and "less"? Many thanks. Regards, Venkat. (4 Replies)
Discussion started by: venkatesht
4 Replies

8. Shell Programming and Scripting

.procmailrc and uudeview (put attachments from diff senders to diff folders)

Moderator, please, delete this topic (1 Reply)
Discussion started by: optik77
1 Replies

9. Shell Programming and Scripting

serach diff filename in diff location using shell scripting

Hi, I am new to shell scripting. please help me to find out the solution. I need a script where we need to read the text file(consists of all file names) and get the file names one by one and append the date suffix for each file name as 'yyyymmdd' . Then search each file if exists... (1 Reply)
Discussion started by: Lucky123
1 Replies

10. Shell Programming and Scripting

Diff 3 files, but diff only their 2nd column

Guys i have 3 files, but i want to compare and diff only the 2nd column path=`/home/whois/doms` for i in `cat domain.tx` do whois $i| sed -n '/Registry Registrant ID:/,/Registrant Email:/p' > $path/$i.registrant whois $i| sed -n '/Registry Admin ID:/,/Admin Email:/p' > $path/$i.admin... (10 Replies)
Discussion started by: kenshinhimura
10 Replies
Color::Library::Dictionary::NBS_ISCC::SC(3pm)		User Contributed Perl Documentation	     Color::Library::Dictionary::NBS_ISCC::SC(3pm)

NAME
Color::Library::Dictionary::NBS_ISCC::SC - (NBS/ISCC SC) Soil Color Charts DESCRIPTION
Kenneth L. Kelly and Deanne B. Judd. "Color: Universal Language and Dictionary of Names", National Bureau of Standards, Spec. Publ. 440, Dec. 1976, 189 pages. Color Name Dictionary: (SC) Soil Color Charts U.S. Department of Agriculture Soil Color Charts This combinatorial field-work dictionary's 50 names mape to 176 colors, using 76 of 267 centroids. Again, its focus on soil colors limits its general usefulness. <http://swissnet.ai.mit.edu/~jaffer/Color/Dictionaries#SC> COLORS
black black #3e322c black black #28201c black black #3b3121 black black #363527 black black #25241d black black #222222 brown brown #a67b5b brown brown #6f4e37 brown brown #958070 brown brown #635147 brown brown #826644 brown brown #7e6d5a brownish yellow brownishyellow #be8a3d brownish yellow brownishyellow #c19a6b dark brown darkbrown #6f4e37 dark brown darkbrown #635147 dark brown darkbrown #826644 dark brown darkbrown #4b3621 dark brown darkbrown #7e6d5a dark gray darkgray #5b504f dark gray darkgray #57554c dark gray darkgray #555555 dark grayish brown darkgrayishbrown #7e6d5a dark grayish brown darkgrayishbrown #6c541e dark olive darkolive #665d1e dark olive darkolive #403d21 dark olive darkolive #363527 dark olive-gray darkolivegray #5b5842 dark red darkred #722f37 dark red darkred #882d17 dark red darkred #56070c dark red darkred #79443b dark red darkred #80461b dark reddish brown darkreddishbrown #79443b dark reddish brown darkreddishbrown #3e1d1e dark reddish brown darkreddishbrown #674c47 dark reddish brown darkreddishbrown #43302e dark reddish brown darkreddishbrown #6f4e37 dark reddish brown darkreddishbrown #422518 dark reddish brown darkreddishbrown #635147 dark reddish brown darkreddishbrown #3e322c dark reddish gray darkreddishgray #5c504f dark reddish gray darkreddishgray #635147 dark reddish gray darkreddishgray #5b504f dark yellowish brown darkyellowishbrown #996515 dark yellowish brown darkyellowishbrown #826644 dark yellowish brown darkyellowishbrown #4b3621 dusky red duskyred #79443b dusky red duskyred #674c47 gray gray #8e8279 gray gray #8a8776 gray gray #848482 grayish brown grayishbrown #7e6d5a grayish brown grayishbrown #967117 light brown lightbrown #a67b5b light brownish gray lightbrownishgray #ae9b82 light brownish gray lightbrownishgray #967117 light gray lightgray #c1b6b3 light gray lightgray #8e8279 light gray lightgray #ae9b82 light gray lightgray #c2b280 light gray lightgray #bfb8a5 light gray lightgray #8a8776 light gray lightgray #b9b8b5 light gray lightgray #848482 light olive brown lightolivebrown #967117 light olive-gray lightolivegray #8c8767 light olive-gray lightolivegray #8a8776 light red lightred #e66761 light red lightred #c48379 light red lightred #cb6d51 light red lightred #b4745e light red lightred #d99058 light reddish brown lightreddishbrown #a87c6d light reddish brown lightreddishbrown #977f73 light reddish brown lightreddishbrown #a67b5b light yellowish brown lightyellowishbrown #c19a6b light yellowish brown lightyellowishbrown #a18f60 olive olive #867e36 olive olive #665d1e olive olive #8c8767 olive olive #5b5842 olive brown olivebrown #6c541e olive brown olivebrown #3b3121 olive gray olivegray #8c8767 olive gray olivegray #5b5842 olive gray olivegray #8a8776 olive yellow oliveyellow #ab9144 pale brown palebrown #c19a6b pale brown palebrown #ae9b82 pale olive paleolive #a18f60 pale olive paleolive #8c8767 pale red palered #ad8884 pale red palered #a87c6d pale red palered #977f73 pale yellow paleyellow #f3e5ab pale yellow paleyellow #c2b280 pink pink #f4c2c2 pink pink #d9a6a9 pink pink #ecd5c5 pink pink #c7ada3 pink pink #c2ac99 pink pink #fad6a5 pink pink #c19a6b pinkish gray pinkishgray #c7ada3 pinkish gray pinkishgray #c2ac99 pinkish gray pinkishgray #977f73 pinkish gray pinkishgray #958070 pinkish white pinkishwhite #ecd5c5 pinkish white pinkishwhite #c7ada3 pinkish white pinkishwhite #c2ac99 red red #ab4e52 red red #905d5d red red #cb6d51 red red #9e4732 red red #b4745e red red #79443b red red #ae6938 red red #80461b reddish black reddishblack #282022 reddish black reddishblack #3e1d1e reddish black reddishblack #43302e reddish black reddishblack #3e322c reddish black reddishblack #28201c reddish brown reddishbrown #a87c6d reddish brown reddishbrown #79443b reddish brown reddishbrown #977f73 reddish brown reddishbrown #674c47 reddish brown reddishbrown #a67b5b reddish brown reddishbrown #6f4e37 reddish gray reddishgray #8f817f reddish gray reddishgray #977f73 reddish gray reddishgray #958070 reddish gray reddishgray #8e8279 reddish yellow reddishyellow #fab57f reddish yellow reddishyellow #d99058 reddish yellow reddishyellow #fbc97f reddish yellow reddishyellow #e3a857 reddish yellow reddishyellow #be8a3d strong brown strongbrown #80461b strong brown strongbrown #996515 very dark brown verydarkbrown #422518 very dark brown verydarkbrown #3e322c very dark brown verydarkbrown #4b3621 very dark brown verydarkbrown #483c32 very dark gray verydarkgray #5b504f very dark gray verydarkgray #57554c very dark gray verydarkgray #555555 very dark grayish brown verydarkgrayishbrown #483c32 very dark grayish brown verydarkgrayishbrown #6c541e very dusky red veryduskyred #3e1d1e very dusky red veryduskyred #43302e very pale brown verypalebrown #c2ac99 very pale brown verypalebrown #fad6a5 very pale brown verypalebrown #c19a6b very pale brown verypalebrown #ae9b82 weak red weakred #905d5d weak red weakred #a87c6d weak red weakred #79443b weak red weakred #977f73 weak red weakred #674c47 white white #eae3e1 white white #c1b6b3 white white #fad6a5 white white #f0ead6 white white #bfb8a5 white white #f2f3f4 white white #b9b8b5 yellow yellow #fbc97f yellow yellow #e3a857 yellow yellow #f8de7e yellow yellow #c9ae5d yellowish brown yellowishbrown #996515 yellowish brown yellowishbrown #826644 yellow red yellowred #ae6938 yellow red yellowred #80461b perl v5.14.2 2011-12-07 Color::Library::Dictionary::NBS_ISCC::SC(3pm)
All times are GMT -4. The time now is 01:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy