Thanks. I try to use set() suggested by you. However, not successful. Please
see:
>>> synsets = list(wn.all_synsets('n'))
>>> synsets[:5]
[Synset('entity.n.01'), Synset('physical_entity.n.01'),
Synset('abstraction.n.06'), Synset('thing.n.12'), Synset('object.n.01')]
>>> lemma_set = set()
>>> for synset in synsets:
lemma_set.add(synset.lemma_names)
Traceback (most recent call last):
File "<pyshell#43>", line 2, in <module>
lemma_set.add(synset.lemma_names)
TypeError: unhashable type: 'list'
>>> for synset in synsets:
lemma_set.add(set(synset.lemma_names))
Traceback (most recent call last):
File "<pyshell#45>", line 2, in <module>
lemma_set.add(set(synset.lemma_names))
TypeError: unhashable type: 'set'
--
http://mail.python.org/mailman/listinfo/python-list