Class ParseProcessing
- java.lang.Object
-
- edu.kit.ipd.are.archdoclink.nlp.parse.ParseProcessing
-
- All Implemented Interfaces:
NaturalLanguageProcessing
public class ParseProcessing extends Object implements NaturalLanguageProcessing
-
-
Constructor Summary
Constructors Constructor Description ParseProcessing()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidannotate(TextElement textElement, Annotation annotation)Adds the givenAnnotationto the providedTextElementList<? extends Coreference>getCoreferences()DocumentgetDocument()org.eclipse.collections.api.list.MutableList<ParseWord>getNamedEntityWords()List<ParsePhrase>getNounPhrases()Optional<ParsePhrase>getPhraseOfWord(Word word)Returns the Phrase the given word is contained in.List<ParsePhrase>getPhrases()List<ParseSentence>getSentences()org.eclipse.collections.api.list.MutableList<ParseWord>getWords()voidinit(Document document)Initialise the NLP with the givenDocumentvoidinit(String text, String documentId)Initialise the NLP for the given text with the given Id.StringtoDebugString()StringtoExtensiveDebugString()
-
-
-
Method Detail
-
init
public void init(Document document)
Description copied from interface:NaturalLanguageProcessingInitialise the NLP with the givenDocument- Specified by:
initin interfaceNaturalLanguageProcessing- Parameters:
document- Document that should be able to be processed
-
init
public void init(String text, String documentId)
Description copied from interface:NaturalLanguageProcessingInitialise the NLP for the given text with the given Id.- Specified by:
initin interfaceNaturalLanguageProcessing- Parameters:
text- text that should be able to be processeddocumentId- Id of the text/document
-
getDocument
public Document getDocument()
- Specified by:
getDocumentin interfaceNaturalLanguageProcessing- Returns:
- the document the NLP is initialised with.
-
getNamedEntityWords
public org.eclipse.collections.api.list.MutableList<ParseWord> getNamedEntityWords()
- Specified by:
getNamedEntityWordsin interfaceNaturalLanguageProcessing- Returns:
- List of NamedEntities that were found within the init. text
-
getWords
public org.eclipse.collections.api.list.MutableList<ParseWord> getWords()
- Specified by:
getWordsin interfaceNaturalLanguageProcessing- Returns:
- List of words that were found within the init. text.
-
getPhraseOfWord
public Optional<ParsePhrase> getPhraseOfWord(Word word)
Description copied from interface:NaturalLanguageProcessingReturns the Phrase the given word is contained in. If the word is not contained in any phrase, an emptyOptionalis returned.- Specified by:
getPhraseOfWordin interfaceNaturalLanguageProcessing- Parameters:
word- Word that should be looked for in Phrases- Returns:
- Optional containing the Phrase the given word is contained in. Empty Optional if word is not contained in any phrase.
-
getPhrases
public List<ParsePhrase> getPhrases()
- Specified by:
getPhrasesin interfaceNaturalLanguageProcessing- Returns:
- List of Phrases that were found within the init. text.
-
getNounPhrases
public List<ParsePhrase> getNounPhrases()
- Specified by:
getNounPhrasesin interfaceNaturalLanguageProcessing- Returns:
- List of NounPhrases that were found within the init. text.
-
getSentences
public List<ParseSentence> getSentences()
- Specified by:
getSentencesin interfaceNaturalLanguageProcessing- Returns:
- List of Sentences that were found within the init. text.
-
getCoreferences
public List<? extends Coreference> getCoreferences()
- Specified by:
getCoreferencesin interfaceNaturalLanguageProcessing- Returns:
- List of Coreferences that were found within the init. text.
-
toDebugString
public String toDebugString()
-
toExtensiveDebugString
public String toExtensiveDebugString()
-
annotate
public void annotate(TextElement textElement, Annotation annotation)
Description copied from interface:NaturalLanguageProcessingAdds the givenAnnotationto the providedTextElement- Specified by:
annotatein interfaceNaturalLanguageProcessing- Parameters:
textElement- textElement that should be annotatedannotation- the Annotation
-
-