Package org.icij.datashare.text.nlp
Interface Pipeline
-
- All Known Implementing Classes:
AbstractPipeline
public interface Pipeline
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPipeline.Propertystatic classPipeline.Type
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_CACHINGstatic CharsetDEFAULT_ENCODINGstatic List<NamedEntity.Category>DEFAULT_ENTITIESstatic List<NlpStage>DEFAULT_TARGET_STAGES
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description CharsetgetEncoding()Optional<String>getPosTagSet(Language language)List<NlpStage>getStages()List<NamedEntity.Category>getTargetEntities()Pipeline.TypegetType()booleaninitialize(Language language)booleanisCaching()List<NamedEntity>process(Document doc)List<NamedEntity>process(Document doc, int contentLength, int contentOffset)static Set<Pipeline.Type>set(Pipeline.Type... types)booleansupports(NlpStage stage, Language language)Is stage supported for language?voidterminate(Language language)
-
-
-
Field Detail
-
DEFAULT_ENCODING
static final Charset DEFAULT_ENCODING
-
DEFAULT_ENTITIES
static final List<NamedEntity.Category> DEFAULT_ENTITIES
-
DEFAULT_CACHING
static final boolean DEFAULT_CACHING
- See Also:
- Constant Field Values
-
-
Method Detail
-
set
static Set<Pipeline.Type> set(Pipeline.Type... types)
-
getType
Pipeline.Type getType()
-
initialize
boolean initialize(Language language) throws InterruptedException
- Throws:
InterruptedException
-
process
List<NamedEntity> process(Document doc) throws InterruptedException
- Throws:
InterruptedException
-
process
List<NamedEntity> process(Document doc, int contentLength, int contentOffset) throws InterruptedException
- Throws:
InterruptedException
-
terminate
void terminate(Language language) throws InterruptedException
- Throws:
InterruptedException
-
supports
boolean supports(NlpStage stage, Language language)
Is stage supported for language?- Parameters:
stage- the stage to test for supportlanguage- the language on which stage is tested- Returns:
- true if stage supports language; false otherwise
-
getTargetEntities
List<NamedEntity.Category> getTargetEntities()
- Returns:
- the list of all targeted named entity categories
-
isCaching
boolean isCaching()
- Returns:
- true if pipeline is caching annotators; false otherwise
-
getEncoding
Charset getEncoding()
- Returns:
- the list of all involved stages
-
-