Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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, then i use it this way: 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();
        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?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2021-03-02 21:54 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (64 votes). Check out past polls.