Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SI multilingual #84

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ else if (tieStrategy == TieStrategy.CHOOSE_RANDOMLY
sense.setConfidence(entry.getValue());
if (setSenseDescriptions == true) {
sense.setDescription(inventory.getSenseDescription(entry
.getKey()));
.getKey(),true));
}
// TODO: Is it really necessary to add senses to the indexes?
sense.addToIndexes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,17 @@ String getMostFrequentSense(String sod, POS pos)
*/
String getSenseDescription(String senseId)
throws SenseInventoryException;

/**
* @param senseId
* @return A human readable description of the current sense represented by
* its senseId or an empty string if no description is available. A
* {@link SenseInventoryException} is thrown if the senseId is
* invalid.
* @throws SenseInventoryException
*/
String getSenseDescription(String senseId,boolean seclang)
throws SenseInventoryException;

/**
* @param senseId
* @return The part of speech of the sense represented by the given senseId.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,12 @@ public String getMostFrequentSense(String sod, POS pos)
}
return mostFrequentSense;
}

@Override
public String getSenseDescription(String senseId,boolean seclang)
throws SenseInventoryException
{
return getSenseDescription(senseId);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,14 @@ public String getSenseDescription(String senseId)
{
return inventory.getSenseDescription(senseId);
}


@Override
public String getSenseDescription(String senseId, boolean lang)
throws SenseInventoryException
{
return inventory.getSenseDescription(senseId,lang);
}

@Override
public POS getPos(String senseId)
throws SenseInventoryException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ public String getSenseDescription(String senseId)
throw new SenseInventoryException("invalid sense ID " + senseId);
}
}


@Override
public String getSenseDescription(String senseId, boolean seclang) throws SenseInventoryException {
return getSenseDescription(senseId);
}

@Override
public Map<String, List<String>> getSenseInventory()
throws SenseInventoryException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ public String getSenseDescription(String senseId)
throw new SenseInventoryException("invalid sense ID " + senseId);
}
}

@Override
public String getSenseDescription(String senseId, boolean seclang) throws SenseInventoryException {
return getSenseDescription(senseId);
}

@Override
public POS getPos(String senseId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ public String getSenseDescription(String senseId)
throw new SenseInventoryException("invalid sense ID " + senseId);
}
}

@Override
public String getSenseDescription(String senseId, boolean seclang) throws SenseInventoryException {
return getSenseDescription(senseId);
}

@Override
public POS getPos(String senseId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public String getSenseDescription(String senseId)
throw new SenseInventoryException(e);
}
}

@Override
public String getSenseDescription(String senseId, boolean seclang) throws SenseInventoryException {
return getSenseDescription(senseId);
}

@Override
public POS getPos(String senseId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ public String getSenseDescription(String senseId)
throw new SenseInventoryException(e);
}
}


@Override
public String getSenseDescription(String senseId, boolean seclang) throws SenseInventoryException {
return getSenseDescription(senseId);
}

@Override
public POS getPos(String senseId)
throws SenseInventoryException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ public String getSenseDescription(String senseId)

return StringUtils.join(synonyms, ", ");
}

@Override
public String getSenseDescription(String senseId, boolean seclang) throws SenseInventoryException {
return getSenseDescription(senseId);
}

@Override
public Map<String, List<String>> getSenseInventory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ public String getSenseDescription(String senseId)
}
return resBuilder.toString().trim();
}

@Override
public String getSenseDescription(String senseId, boolean seclang) throws SenseInventoryException {
return getSenseDescription(senseId);
}

@Override
public String getSenseInventoryName()
Expand Down