The API that the class Sense offers a method getSenses(). From the Uby LMF
model at <http://www.ukp.tu-darmstadt.de/data/uby/uby-lmf/> I take it this
is by design. But from doing some queries on the Uby resource so far I
haven't been able to find any Sense s such that s.getSenses() != null. I
was wondering if any such senses exist, or if this functionality is just
something that's been reserved for future use?
That is, for the following method, is there any value of the parameter word
such that the method prints something?
public static void listSubsenses(Uby uby, String word)
{
List<LexicalEntry> lexicalEntries = uby.getLexicalEntries(word,
null, null);
for (LexicalEntry lexicalEntry : lexicalEntries) {
for (Sense s : lexicalEntry.getSenses()) {
List<Sense> subsenses = s.getSenses();
if (subsenses != null) {
for (Sense t : s.getSenses()) {
System.out.println("Sense " + s.getId()
+ " has subsense " + t.getId());
}
}
}
}
}
Regards,
Tristan
--
Tristan Miller, Doctoral Researcher | Tel: +49 6151 16 6166
Ubiquitous Knowledge Processing Lab | Fax: +49 6151 16 5455
Department of Computer Science | mil...@ukp.informatik.tu-darmstadt.de
Technische Universität Darmstadt | http://www.ukp.tu-darmstadt.de/