udapi.block.util.joinsentence module¶
Block util.JoinSentence will join a given sentence with the preceding one.
- class udapi.block.util.joinsentence.JoinSentence(sent_id=None, misc_name=None, misc_value=None, **kwargs)[source]¶
Bases:
Block
Joins a sentence with the preceding one. There are two ways how to indicate the sentences that this block should process.
Method 1: Parameter sent_id provides the id of the sentence that should be merged with the preceding one. At most one sentence pair from the input will be merged, even if there are multiple sentences with the given id.
Method 2: A MISC attribute can be specified that, if found, will trigger joining of the current sentence to the previous one. With this approach, multiple sentence pairs can be merged during one run.