Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Junk NOT words

by Dr. Mu (Hermit)
on Oct 31, 2002 at 06:41 UTC ( #209352=note: print w/replies, xml ) Need Help??

in reply to Junk NOT words

If you go for the digraph and trigraph methods, be sure that the text you analyze for letter-pair and -triple frequencies is similar to what you'll be looking at. You mentioned wanting to recognize an "arbitrary combination of words". This is much different than recognizing words combined to form an English sentence. If you analyze plain text from, say, a novel, you'll get a higher preponderance of "th", "he", and "the" than you would from a jumble of words picked at random from the dictionary.

Also, remember that digraph and trigraph analysis is probabilistic. This means that the larger the string of characters you're trying to analyze (i.e. the bigger your sample size), the better your chances of making the correct inference. Bear in mind that a string of 50 characters contains only 48 trigraphs. This doesn't scratch the surface of even the most frequent of the 17576 possible three-letter combinations, so simple frequency analysis may not be meaningful. Better would be to categorize all 17576 trigraphs into just a few groups by rank, according to the sample text you've pre-analyzed. Partitioning them into ten 10-percentile groupings would be one example. Then each trigraph in your subject string would simply be a member of one of the ten groups. The more evenly distributed they are among these ten groups, the better the chances that you have a string of words.

This is a very interesting problem (to me anyway), and I hope you'll keep the monks posted on your progress!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://209352]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2018-03-23 04:03 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (287 votes). Check out past polls.