jina.executors.segmenters¶
-
class
jina.executors.segmenters.
BaseSegmenter
(*args, **kwargs)[source]¶ Bases:
jina.executors.BaseExecutor
BaseSegmenter
works on doc-level, it chunks Documents into set of Chunks-
segment
(*args, **kwargs)[source]¶ The apply function of this executor. Unlike
BaseCrafter
, thecraft()
here works on doc-level info and the output is defined on chunk-level. Therefore the name of the arguments should be always valid keys defined in the doc-level protobuf whereas the output dict keys should always be valid keys defined in the chunk-level protobuf. :rtype:List
[Dict
] :return: a list of chunks-level info represented by a dict
-