WordNet actually has some cycles. For example, in WordNet, "restrain" and "inhibit" are mutually recursive:
# S: (v) restrain, keep, keep back, hold back (keep under control; keep in check) "suppress a smile"; "Keep your temper"; "keep your cool"
* direct hypernym / inherited hypernym / sister term
o S: (v) inhibit, bottle up, suppress (control and refrain from showing; of emotions, desires, impulses, or behavior)
+ direct hypernym / inherited hypernym / sister term
# S: (v) restrain, keep, keep back, hold back (keep under control; keep in check) "suppress a smile"; "Keep your temper"; "keep your cool"
Don't know why it has such cycles, but if you're working with WordNet synsets, you'll probably run into this issue eventually.
Steve
>
> Adam Funk wrote:
>> Sorry if this is a bit off-topic, but at least it's for an NLP
>> application. I have a file of pairs of WordNet synset numbers that
>> represent hypernym-hyponym pairs, for example:
>>
>> 100001930,100001740
>> 100002137,100001740
>> 100002452,100001930
>> 100002684,100001930
>> 100003553,100002684
>> 100003993,100003553
>> 100004258,100003553
>> 100004475,100004258
>> 100005787,100004475
>> 100005930,100004475
>>
>> and I want to produce all the longest possible chains of them. The
>> output for that list is as follows:
>>
>> 100002137,100001740
>> 100002452,100001930,100001740
>> 100003993,100003553,100002684,100001930,100001740
>> 100005787,100004475,100004258,100003553,100002684,100001930,100001740
>> 100005930,100004475,100004258,100003553,100002684,100001930,100001740
>>
>> I have a program that does this correctly for small samples of the data
>> I'm supposed to process, but I've estimated (using a log plot) that it
>> will take about 10^595 seconds to run over the whole list (about 89000
>> pairs), so I think I'm doing it wrong.
>>
>> I haven't been able to find an algorithm for this, because I don't know
>> what the computational problem is called. Can anyone point me in the
>> direction of something suitable?
>>
>> _______________________________________________
>> Corpora mailing list
>> Corpora at uib.no
>> http://mailman.uib.no/listinfo/corpora
>>
>>
>
> --
> Ken Litkowski TEL.: 301-482-0237
> CL Research EMAIL: ken at clres.com
> 9208 Gue Road Home Page: http://www.clres.com
> Damascus, MD 20872-1025 USA Blog: http://www.clres.com/blog
>
>
> _______________________________________________
> Corpora mailing list
> Corpora at uib.no
> http://mailman.uib.no/listinfo/corpora