This class essentially provides a bridge between the dissector and the {@link StringSegmenter} class. The {@link StringSegmenter} is responsiblefor dissecting the text into multiple segments with the help of a {@link StringDissector}.
Just like other nodes each node within the dissectable content must belong to a contiguous range of shards (possibly only one). Therefore the mapping from a shard number to text segment index is extremely easy as it simply involves subtracting the shard number from the first shard that this node belongs to.
If this has to be split across multiple shards then there is one segment per shard. These are managed by the {@link StringSegmenter}.
|
|