Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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?
[shmem]: J.S.Bach said: "playing Clavier is darn easy. All you have to do is to push the right key with the right finger at the right time."
[shmem]: same for programming and creating bugs.
[choroba]: programming is easy once you know how to solve the problem
[shmem]: choroba: yeah, adjusting the screw 2 - knowing which one 42
[shmem]: and - on another side: a complete spec is identical to the programs source code

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-04-27 14:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (508 votes). Check out past polls.