Filter Babelnet synsets by category

259 Views Asked by At

I'm using Babelnet java api to query the online service:

1) I get the synset of some words by the babelnet relation .getSynsets() on a babelnet instance

2) I also have a method to get the categories of these words by the relation .getDomains().

I want to get the synsets but only those related to a specific domain, for example the word "apple" generates the synsets: {Apple (music group), Apple, Ariane Passenger PayLoad Experiment, Apple (album)} and domains :{MUSIC, COMPUTING, PHYSICS AND ASTRONOMY}.

Specifying the MUSIC domain I want to end up with the synset {Apple (music group), Apple (album)}, so: is there any way to filter the synset I get on step 1) by any specific domain got through step 2)?

0

There are 0 best solutions below