
it.unitn.disi.smatch.data.ling.Sense Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of s-match Show documentation
Show all versions of s-match Show documentation
A version of S-Match semantic matching framework for Open Data
The newest version!
package it.unitn.disi.smatch.data.ling;
import it.unitn.disi.smatch.oracles.LinguisticOracleException;
import java.util.Collections;
import java.util.List;
/**
* Default sense implementation.
*
* @author Aliaksandr Autayeu
*/
public abstract class Sense implements ISense {
String id;
public Sense(String id) {
this.id = id;
}
public String getId() {
return id;
}
public String getGloss() {
return null;
}
public List getLemmas() {
return Collections.emptyList();
}
public List getParents() throws LinguisticOracleException {
return Collections.emptyList();
}
public List getParents(int depth) throws LinguisticOracleException {
return Collections.emptyList();
}
public List getChildren() throws LinguisticOracleException {
return Collections.emptyList();
}
public List getChildren(int depth) throws LinguisticOracleException {
return Collections.emptyList();
}
@Override
public String toString() {
return id;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Sense)) {
return false;
}
Sense sense = (Sense) o;
if (id != null ? !id.equals(sense.id) : sense.id != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
return id != null ? id.hashCode() : 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy