| 1 | # WordNet::Extend version 1.000 | ||
| 2 | # Updated: 08/06/17 | ||
| 3 | # | ||
| 4 | # Jon Rusert, University of Minnesota Duluth | ||
| 5 | # ruse0008 at d.umn.edu | ||
| 6 | # | ||
| 7 | # Ted Pedersen, University of Minnesota Duluth | ||
| 8 | # tpederse at d.umn.edu | ||
| 9 | # | ||
| 10 | # This program is free software: you can redistribute it and/or modify | ||
| 11 | # it under the terms of the GNU General Public License as published by | ||
| 12 | # the Free Software Foundation, either version 3 of the License, or | ||
| 13 | # (at your option) any later version. | ||
| 14 | # | ||
| 15 | # This program is distributed in the hope that it will be useful, | ||
| 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | # GNU General Public License for more details. | ||
| 19 | # | ||
| 20 | # You should have received a copy of the GNU General Public License | ||
| 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 22 | # | ||
| 23 | |||
| 24 | package WordNet::Extend; | ||
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | WordNet::Extend - Perl modules for extending your local WordNet. | ||
| 29 | |||
| 30 | =head1 SYNOPSIS | ||
| 31 | |||
| 32 | =head2 Basic Usage Example | ||
| 33 | |||
| 34 | use WordNet::Extend::Locate; | ||
| 35 | use WordNet::Extend::Insert; | ||
| 36 | |||
| 37 | my $locate = WordNet::Extend::Locate->new(); | ||
| 38 | my $insert = WordNet::Extend::Insert->new(); | ||
| 39 | @in1 = ("crackberry","noun","withdef.1", "A BlackBerry, a handheld device considered addictive for its networking capability."); | ||
| 40 | |||
| 41 | print "Locating where $in1[0] should be inserted...\n"; | ||
| 42 | @loc1 = @{$locate->locate(\@in1)}; | ||
| 43 | |||
| 44 | print "System found $loc1[1] as the ideal insertion location...\n"; | ||
| 45 | |||
| 46 | if($loc1[2] eq "attach") | ||
| 47 | { | ||
| 48 | print "Attaching $in1[0] to $loc1[0]"; | ||
| 49 | $insert->attach(\@in1, \@loc1); | ||
| 50 | } | ||
| 51 | else | ||
| 52 | { | ||
| 53 | print "Merging $in1[0] into $loc1[0]"; | ||
| 54 | $insert->merge(\@in1, @loc1); | ||
| 55 | } | ||
| 56 | |||
| 57 | #$insert->restoreWordNet(); | ||
| 58 | |||
| 59 | =head1 DESCRIPTION | ||
| 60 | |||
| 61 | =head2 Introduction | ||
| 62 | |||
| 63 | WordNet is a widely used tool in NLP and other research areas. A drawback of WordNet is the amount of time between updates. WordNet was last updated and released in December, 2006, and no further updates are planned. WordNet::Extend aims to help developers get a large use out of WordNet by allowing users to push the bounds of their own local WordNet. Both by allowing users to insert new lemmas into WordNet (WordNet::Extend::Insert) and helping users decide where a good place to insert new lemmas into WordNet is (WordNet::Extend::Locate). | ||
| 64 | |||
| 65 | =cut | ||
| 66 | |||
| 67 | our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); | ||
| 68 | |||
| 69 | @ISA = qw(Exporter); | ||
| 70 | |||
| 71 | %EXPORT_TAGS = (); | ||
| 72 | |||
| 73 | @EXPORT_OK = (); | ||
| 74 | |||
| 75 | @EXPORT = (); | ||
| 76 | |||
| 77 | $VERSION = '1.000'; | ||
| 78 |