Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Is it possible to find the matching words and the percentage of matching words between two texts?

by McDarren (Abbot)
on Dec 21, 2012 at 08:48 UTC ( #1009889=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %foo;
    my $string = 'Poet Blake had a milky white cat. He used to call it Pus
    +sy.';
    for my $word (split /\s+/, $string) {
       $foo{$word}++;
    }
    
  2. or download this
    my $cnt;
    for my $word (keys %foo) {
        $cnt++ if $bar{$word};
    }
    
  3. or download this
    my $word_count = scalar keys %foo;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009889]
help
Chatterbox?
[Discipulus]: only 4k points to sundial's level ..;=)
[Corion]: Yay Discipulus ;)
[Corion]: marto: Ah, so this will be training videos etc., cool!
[choroba]: Congratulations!
[marto]: Corion worse, some plant inspection, cameras moving thru pipes
[marto]: Discipulus yeah, just don't adopt his tactics :P
[marto]: the content for the most part is fairly dull, but if they go for it, they can use it for all sorts of video, they have no solution for this at the moment
[Discipulus]: with "thru pipes" you mean bot cameras moving inside pipes?!?

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-07-28 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (425 votes). Check out past polls.