From 4efc840a9f8041c3d08de8e06d5b5386fca94e4a Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Wed, 21 Mar 2018 22:15:30 +1300 Subject: Use system wordnet path instead of usr/local --- Makefile.PL | 2 +- QueryData.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index d192f6d..1932c8f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,7 +5,7 @@ use ExtUtils::MakeMaker; # $wnHomePC). These need to be synchronized. I need to import those # variables from QueryData.pm. -die "*** Please set the WNHOME environment variable to the location of your\n*** WordNet installation. QueryData.pm will not work otherwise.\n*** Alternatively, you can make the installation in the default\n*** location, C:\\Program Files\\WordNet\\3.0 on Windows, or /usr/local/WordNet-3.0 on unix.\n" unless exists $ENV{WNHOME} or exists $ENV{WNSEARCHDIR} or -d "C:\\Program Files\\WordNet\\3.0" or -d "/usr/local/WordNet-3.0"; +die "*** Please set the WNHOME environment variable to the location of your\n*** WordNet installation. QueryData.pm will not work otherwise.\n*** Alternatively, you can make the installation in the default\n*** location, C:\\Program Files\\WordNet\\3.0 on Windows, or /usr/share/wordnet on unix.\n" unless exists $ENV{WNHOME} or exists $ENV{WNSEARCHDIR} or -d "C:\\Program Files\\WordNet\\3.0" or -d "/usr/share/wordnet"; WriteMakefile( 'dist' => { 'COMPRESS' => 'gzip', 'SUFFIX' => '.gz', }, diff --git a/QueryData.pm b/QueryData.pm index ee27ee6..fc6168a 100644 --- a/QueryData.pm +++ b/QueryData.pm @@ -201,7 +201,7 @@ my @excFile = ("", "noun.exc", "verb.exc", "adj.exc", "adv.exc"); my @indexFile = ("", "index.noun", "index.verb", "index.adj", "index.adv"); my @dataFile = ("", "data.noun", "data.verb", "data.adj", "data.adv"); -my $wnHomeUnix = defined($ENV{"WNHOME"}) ? $ENV{"WNHOME"} : "/usr/local/WordNet-3.0"; +my $wnHomeUnix = defined($ENV{"WNHOME"}) ? $ENV{"WNHOME"} : "/usr/share/wordnet"; my $wnHomePC = defined($ENV{"WNHOME"}) ? $ENV{"WNHOME"} : "C:\\Program Files\\WordNet\\3.0"; my $wnPrefixUnix = defined($ENV{"WNSEARCHDIR"}) ? $ENV{"WNSEARCHDIR"} : "$wnHomeUnix/dict"; my $wnPrefixPC = defined($ENV{"WNSEARCHDIR"}) ? $ENV{"WNSEARCHDIR"} : "$wnHomePC\\dict"; @@ -1113,7 +1113,7 @@ QueryData knows about two environment variables, WNHOME and WNSEARCHDIR. If WNSEARCHDIR is set, QueryData looks for WordNet data files there. Otherwise, QueryData looks for WordNet data files in WNHOME/dict (WNHOME\dict on a PC). If WNHOME is not set, it defaults -to "/usr/local/WordNet-3.0" on Unix and "C:\Program Files\WordNet\3.0" +to "/usr/share/wordnet" on Unix and "C:\Program Files\WordNet\3.0" on a PC. Normally, all you have to do is to set the WNHOME variable to the location where you unpacked your WordNet distribution. The database files are normally unpacked to the "dict" subdirectory. -- 2.16.2