@Override public Entity getEntityById(String aId) throws LexicalSemanticResourceException { return lsr.getEntityById(aId); }
@Override public String getSenseDescription(String senseId) throws SenseInventoryException { try { String description = lsr.getGloss(lsr.getEntityById(senseId)); return (description == null) ? "" : description; } catch (LexicalSemanticResourceException e) { throw new SenseInventoryException(e); } }
@Override public Set<String> getSenseNeighbours(String senseId) throws SenseInventoryException, UnsupportedOperationException { Set<Entity> entities; try { entities = lsr.getNeighbors(lsr.getEntityById(senseId)); } catch (LexicalSemanticResourceException e) { throw new SenseInventoryException(e); } Set<String> neighbours = new HashSet<String>(); for (Entity entity : entities) { neighbours.add(entity.getId()); } return neighbours; }
@Override public POS getPos(String senseId) throws SenseInventoryException { Entity entity; try { entity = lsr.getEntityById(senseId); } catch (LexicalSemanticResourceException e) { throw new SenseInventoryException(e); } return LsrSenseInventoryUtil.convertPos(entity.getPos()); }