|
|
| more useful options | |
| PerlMonks |
Absolute simplest way to keep a database variable persistent?by natestraight (Novice) |
| on Oct 03, 2008 at 21:23 UTC ( [id://715283]=perlquestion: print w/replies, xml ) | Need Help?? |
|
natestraight has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
Caveat: ABSOLUTE, COMPLETE n00b to perl. I'm only using it because it has the wonderful WordNet::Similarity module that I need for some textual analysis. The problem: I am running the aforementioned WordNet::Similarity module through a VBA script to calculate a ton of semantic relatedness formulas on documents in an excel sheet (they need to stay in an excel sheet, too, so I can't try mysql or anything like that). The perl module works fine, except that it loads the massive WordNet lexicon every single time it runs, which would take too long to be practical for the literally hundreds of thousands of times that I need to run the module. I need the absolute simplest way to keep the WordNet lexicon loaded as a perl variable while the Similarity module runs all the queries and calculates the formulae. I have been trying to follow a procedure that I found mentioned here, but to pretty much no avail. It boots me with a message of "Can't use an undefined value as a HASH reference in DBM/Deep/Hash.pm line 33." Here are my scripts, can you offer any help? Again, I just need the absolute simplest, most sure-fire method for doing this. I just need read-only access to the lexicon, and only for about a minute or two while the other scripts run the formulas. I've seen modperl, but would prefer to not use a server, as its too much to configure for just this purpose. Initialize script (to supposedly load the WordNet lexicon into a DBM::Deep-readable database):
And the script to actually run the queries:
The "WordNet::QueryData" module is the one that loads the lexicon.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||