Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: count trigrams of a whole file

by frozenwithjoy (Curate)
on Dec 20, 2012 at 08:50 UTC ( #1009704=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<>) {
        push @words, split /\s/;
    }
    
  2. or download this
    trigram frequencies in your text:
    iwentthere! 1
    ...
    there!shealso 1
    shealsowent 1
    alsowentthere. 1
    
  3. or download this
    @trigrams = ();
    
    ...
        print "$trigrams[$index] $trigramfrequency[$index]\n";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009704]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2014-09-18 13:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (115 votes), past polls