[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Grep on dictionary words



On Sat, Nov 28, 2009 at 11:32:59AM -0600, Boyd Stephen Smith Jr. wrote:
> In <[🔎] 880dece00911280713n6193b8das6970e8a071fc22a6@mail.gmail.com>, Dotan Cohen 
> wrote:
> >Is there a way to grep the output of strings in order to only show
> >lines that contain words found in the aspell dictionary? Thanks in
> >advance.
> 
> I once wrote a small program against the aspell API to do something like that.  
> If you know C, you should be able to do something similar.  If you don't know 
> C, beg, borrow, or pay for some time from a C programmer.

ISTM that because the output of strings is not discrete list of
potential words, but is instead a long list of concatenated
characters, this problem is really rather daunting. The output should
probably be first broken up into something resembling words by perhaps
breaking on non-alphabetic characters. That should do two things: 1)
get you somthing that resembles words to actually test and 2) somewhat
smaller set of "stuff" to check.

This won't necessarily handle "compound" words though where two
word-like things are jammed together, or an actual word is embedded
within a string of nonsense. 

I think this problem is potentially rather harder than I thought when
I saw OP's original question. 

A

Attachment: signature.asc
Description: Digital signature


Reply to: