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