From: Ted P. <dul...@gm...> - 2008-04-11 15:55:46
|
Hi Sid, This looks great, and should actually be very helpful for both Text-Similarity and SenseRelate, since both have compoundify operations. I think having a new release of WordNet-Similarity with this and the other changes you have in the cooker is a great idea. I was thinking of making some small changes to the documentation in our /util programs and the web interface programs, mostly so that they look a little better on CPAN (that is cleaning up the NAME entries, things like that...) So I will tinker around with that this morning, I'm sure it won't be very substantial nor will it take very much time, then perhaps we can release thereafter.... Thanks! Ted On Fri, Apr 11, 2008 at 4:43 AM, Siddharth Patwardhan <si...@cs...> wrote: > Hi Ted, > > > Ah, very interesting. I didn't realize this was how things were > > structured now, > > but it makes good sense. I think that compounds.pl program is very > > neat, and having a getCompounds method would actually be potentially > > very useful for users. I think it's a natural enough question to ask - > > that is, what are the compounds in WordNet...so having that as a part > > of a Tools package makes good sense to me. > > > > I think what Text::Similarity needs is probably independent of WordNet > > - that is it really just needs that string matching logic used in > > compoundify - given a list of compounds find them in a given text - so > > in that case a getCompounds method would be very handy (if we wanted > > to find WordNet compounds) or the user could provide their own list > > from some other source and then match in about the same way. The > > matching logic is already in Text-Similarity and in fact it might work > > as it is, I haven't looked at that too deeply as yet... > > > > So, anyway, I do think a getCompounds method in WordNet::Tools could > > be very useful for those modules like Text-Similarity that might like > > to go looking for WordNet compounds. Probably we wouldn't want to > > build in a dependence on WordNet-Similarity though, so we'd just run > > that once and then provide the compounds to Text-Similarity. Having > > that list in a "Perl form" would be nice, as that would make it easy > > to send into Text-Similarity... > > I just added a method getCompoundsList() to WordNet::Tools and committed > it to CVS. A simple program that mimics compounds.pl, using this new > method, will look like this: > > #! /usr/bin/perl > > use WordNet::QueryData; > use WordNet::Tools; > > my $wn = WordNet::QueryData->new(); > die "Error: Unable to create WordNet::QueryData object.\n" > if(!defined($wn)); > > my $wntools = WordNet::Tools->new($wn); > die "Error: Unable to create WordNet::Tools object.\n" > if(!defined($wntools)); > > my $arref = $wntools->getCompoundsList(); > die "Error: No list returned.\n" if(!defined($arref)); > > foreach my $key (@{$arref}) > { > print "$key\n"; > } > > > I guess, this new method will become available with the next release of > WordNet-Similarity, which can be pretty soon. > > Thanks. > > -- Sid. > > > -- Ted Pedersen http://www.d.umn.edu/~tpederse <http://www.d.umn.edu/%7Etpederse> |