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

Re: 'undef' in the matrix instead of values!!!

by halley (Prior)
on Feb 06, 2008 at 13:49 UTC ( #666550=note: print w/replies, xml ) Need Help??


in reply to 'undef' in the matrix instead of values!!!

I'm not seeing what kind of package $Measure is, as it appears you're grabbing it from @ARGV. Regardless, you should see what this returns, because I think it's the key.
$Measure->getRelatedness("hotdog\n#n#1", "hamburger\n#n#1");
If you look too closely, the answer will chomp you in the rear.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re^2: 'undef' in the matrix instead of values!!!
by smilly (Novice) on Feb 06, 2008 at 14:12 UTC

    Suppose that my file name(the codes written), is simmat.pl, then i use it this way: simmat.pl inputcorpus.txt output.txt WordNet::Similarity::res
    the measure would be WordNet::Similarity::res

      You can't include a module into your program just by putting its name in the arguments list. They must be included at compile time by using the use statement or at execution time by using require and import.
      Maybe one way to do what you want could be:

      my $Measure = shift; eval "require $Measure;import $Measure;"; ## Now, luckily you can use it: $Measure->new();
      citromatik
        atually that dosnt matter wid or widout i imported the module... it dosnt work :(
        hey guys im done! debugged cooooollllll:D it works) life rocks:P

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2016-12-05 11:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (80 votes). Check out past polls.