dkpro / dkpro-core

Collection of software components for natural language processing (NLP) based on the Apache UIMA framework.
https://dkpro.github.io/dkpro-core
Other
195 stars 67 forks source link

Set isLastSegment on document metadata annotation in ResourceCollectionReader #994

Closed Erfans closed 7 years ago

Erfans commented 7 years ago

IsLastSegment does not set on DocumentMetadataAnnotation in ResourceCollectionReaderBase. It could be set when initialing resources (inner class Resource) and retrieve it later in initCas or by checking remained resources when getNext is called.

reckart commented 7 years ago

isLastSegment is a flag that would be used by a CAS multiplier to indicate whether a CAS that was split into multiple segments is the last of the split ones. This is not related to whether there are more resources available to a reader. In order to get a signal when the last document in a pipeline is being processed, use the collectionProcessComplete() callback in UIMA components.