Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
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!


In reply to Re: Junk NOT words by Dr. Mu
in thread Junk NOT words by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (13)
    As of 2014-10-01 19:00 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      What is your favourite meta-syntactic variable name?














      Results (34 votes), past polls