public class SemanticAnnotation extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<SemanticAnnotation>
SemanticAnnotation
for a Fragment
.Modifier and Type | Class and Description |
---|---|
static class |
SemanticAnnotation.Source
Defines the source for the particular
SemanticAnnotation . |
Constructor and Description |
---|
SemanticAnnotation(it.uniroma1.lcl.babelfy.commons.annotation.TokenOffsetFragment tokenFragment,
java.lang.String babelNetSynsetID,
java.lang.String DBpediaURL,
SemanticAnnotation.Source source)
Creates a new
SemanticAnnotation with a Fragment |
SemanticAnnotation(it.uniroma1.lcl.babelfy.commons.annotation.TokenOffsetFragment tokenFragment,
java.lang.String babelNetSynsetID,
java.lang.String DBpediaURL,
SemanticAnnotation.Source source,
double score,
double coherenceScore,
double globalScore)
Creates a new
SemanticAnnotation with a Fragment |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SemanticAnnotation o) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getBabelNetURL()
Gets the BabelNet URL.
|
java.lang.String |
getBabelSynsetID()
Gets the BabelNet Synset ID.
|
it.uniroma1.lcl.babelfy.commons.annotation.CharOffsetFragment |
getCharOffsetFragment() |
double |
getCoherenceScore() |
java.lang.String |
getDBpediaURL()
Gets the DBpedia URL.
|
double |
getGlobalScore() |
double |
getScore() |
SemanticAnnotation.Source |
getSource()
Gets the
SemanticAnnotation.Source for the current SemanticAnnotation . |
it.uniroma1.lcl.babelfy.commons.annotation.TokenOffsetFragment |
getTokenOffsetFragment() |
int |
hashCode() |
void |
setCharOffsetFragment(it.uniroma1.lcl.babelfy.commons.annotation.CharOffsetFragment charFragment)
Sets the
CharOffsetFragment fragment for this SemanticAnnotation . |
java.lang.String |
toString() |
public SemanticAnnotation(it.uniroma1.lcl.babelfy.commons.annotation.TokenOffsetFragment tokenFragment, java.lang.String babelNetSynsetID, java.lang.String DBpediaURL, SemanticAnnotation.Source source, double score, double coherenceScore, double globalScore)
SemanticAnnotation
with a Fragment
tokenFragment
- the fragment of textbabelNetSynsetID
- the idDBpediaURL
- the dbpedia urlsource
- the source of teh annotationscore
- the general score associated with the annotationcoherenceScore
- this is a special score that represent how much is connected this fragment is with
respect to all the disambiguated fragmentglobalScore
- a score that represent the level of relevance of this annotation within the whole
document.public SemanticAnnotation(it.uniroma1.lcl.babelfy.commons.annotation.TokenOffsetFragment tokenFragment, java.lang.String babelNetSynsetID, java.lang.String DBpediaURL, SemanticAnnotation.Source source)
SemanticAnnotation
with a Fragment
tokenFragment
- the fragmentbabelNetSynsetID
- the synset idDBpediaURL
- the dbpedia urlsource
- the source of the annotationpublic void setCharOffsetFragment(it.uniroma1.lcl.babelfy.commons.annotation.CharOffsetFragment charFragment)
CharOffsetFragment
fragment for this SemanticAnnotation
.charFragment
- the fragmentpublic it.uniroma1.lcl.babelfy.commons.annotation.TokenOffsetFragment getTokenOffsetFragment()
TokenOffsetFragment
associated with this SemanticAnnotation
.public it.uniroma1.lcl.babelfy.commons.annotation.CharOffsetFragment getCharOffsetFragment()
CharOffsetFragment
associated with this SemanticAnnotation
.public double getScore()
SemanticAnnotation
.public double getCoherenceScore()
SemanticAnnotation
.public double getGlobalScore()
SemanticAnnotation
.public java.lang.String getBabelSynsetID()
public java.lang.String getDBpediaURL()
public java.lang.String getBabelNetURL()
public SemanticAnnotation.Source getSource()
SemanticAnnotation.Source
for the current SemanticAnnotation
.public int compareTo(SemanticAnnotation o)
compareTo
in interface java.lang.Comparable<SemanticAnnotation>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object