Package edu.kit.ipd.are.archdoclink.nlp
Interface Sentence
-
- All Superinterfaces:
Annotatable,Identifiable,TextElement
- All Known Implementing Classes:
ParseSentence
public interface Sentence extends TextElement, Identifiable
Classes implementing this interface represent a sentence within a document. A sentence should have reference to the previous and next sentence.- Author:
- Jan Keim
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidannotate(Annotation annotation)Annotates the sentence to the document.default voidannotate(Document document, Annotation annotation)Annotates the given annotation to the given documentDocumentgetDocument()List<? extends Phrase>getNounPhrases()List<? extends Phrase>getPhrases()List<? extends Phrase>getPhrasesOfType(PhraseType type)List<? extends Word>getWords()-
Methods inherited from interface edu.kit.ipd.are.archdoclink.nlp.Identifiable
getId
-
Methods inherited from interface edu.kit.ipd.are.archdoclink.nlp.TextElement
getText
-
-
-
-
Method Detail
-
getDocument
Document getDocument()
- Returns:
- the document the sentence is contained in
-
getNounPhrases
List<? extends Phrase> getNounPhrases()
- Returns:
- list of noun phrase contained in the sentence
-
getPhrasesOfType
List<? extends Phrase> getPhrasesOfType(PhraseType type)
- Parameters:
type- type of phrase- Returns:
- list of phrase of the specific phrasetype contained in the sentence
-
annotate
default void annotate(Document document, Annotation annotation)
Description copied from interface:AnnotatableAnnotates the given annotation to the given document- Specified by:
annotatein interfaceAnnotatable- Parameters:
document- Document where the annotation should be added toannotation- Annotation that should be added
-
annotate
void annotate(Annotation annotation)
Annotates the sentence to the document. Should be similar toannotate(Document, Annotation), but usesgetDocument()for the document.- Parameters:
annotation- the annotation that should be annotated
-
-