public class Mention extends Object implements Comparable<Mention>
Sentence. Mentions are defined in terms of full tokens, and therefore
finding mentions (the job of a Tagger) requires tokenization first.| Modifier and Type | Class and Description |
|---|---|
static class |
Mention.MentionType |
| Constructor and Description |
|---|
Mention(Sentence sentence,
int start,
int end,
EntityType entityType,
Mention.MentionType mentionType) |
Mention(Sentence sentence,
int start,
int end,
EntityType entityType,
Mention.MentionType mentionType,
Double probability) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Mention mention2) |
boolean |
contains(int tokenIndex) |
Mention |
copy(Sentence sentence2) |
boolean |
equals(Object obj) |
int |
getEnd() |
int |
getEndChar() |
int |
getEndChar(boolean ignoreWhitespace) |
EntityType |
getEntityType() |
Mention.MentionType |
getMentionType() |
Double |
getProbability() |
Sentence |
getSentence() |
int |
getStart() |
int |
getStartChar() |
int |
getStartChar(boolean ignoreWhitespace) |
String |
getText() |
List<Token> |
getTokens() |
int |
hashCode() |
int |
length() |
boolean |
overlaps(Mention mention2)
|
void |
setProbability(Double probability) |
String |
toString() |
public Mention(Sentence sentence, int start, int end, EntityType entityType, Mention.MentionType mentionType)
public Mention(Sentence sentence, int start, int end, EntityType entityType, Mention.MentionType mentionType, Double probability)
public EntityType getEntityType()
EntityType indicating the type of entity being mentionedpublic Mention.MentionType getMentionType()
public int length()
Mention containspublic boolean contains(int tokenIndex)
public int getEnd()
Mentionpublic int getStart()
Mentionpublic int getStartChar()
public int getEndChar()
public int getStartChar(boolean ignoreWhitespace)
public int getEndChar(boolean ignoreWhitespace)
public boolean overlaps(Mention mention2)
mention2 - true if this Mention overlaps with the specified Mention, false otherwisepublic Double getProbability()
public void setProbability(Double probability)
public int compareTo(Mention mention2)
compareTo in interface Comparable<Mention>Copyright © 2018 JULIE Lab, Germany. All rights reserved.