public class Sentence extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Sentence.OverlapOption |
| Constructor and Description |
|---|
Sentence(String sentenceId,
String documentId,
String text)
Creates a new
Sentence with the specified tag and text |
public void addToken(Token token)
token - public int countWhitespace(int index)
public boolean addMention(Mention mention)
Mention to this Sentence, ignoring any potential overlap with existing Mentions. Normally called by instance of
Tagger or post-processors.mention - public boolean removeMention(Mention mention)
public String getDocumentId()
public int getTokenIndex(int charIndex,
boolean returnNextIfBoundary)
public String getText(int start, int end)
public List<Mention> getMentions(Mention.MentionType mentionType)
public List<String> getTokenLabels(TagFormat format, Set<Mention.MentionType> mentionTypes, Sentence.OverlapOption sameType, Sentence.OverlapOption differentType)
public List<Mention> getMentions(Token token, Set<Mention.MentionType> mentionTypes)
public EntityIdentification setIdentification(Mention mention, EntityIdentification identification)
public EntityIdentification getIdentification(Mention mention)
public Sentence copy(boolean includeTokens, boolean includeMentions)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.