Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 ]


Comment on Re: 'undef' in the matrix instead of values!!!
Select or Download Code
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2014-12-29 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (186 votes), past polls