πŸ“„ To List By Hyphen SpaceΒΆ

processors.to_list_by_hyphen_space

SequentialOperator(
    steps=[
        PostProcess(
            operator=RegexSplit(
                by="(?:^|
)- ",
            ),
        ),
        PostProcess(
            operator=RemoveValues(
                unallowed_values=[
                    "",
                    " ",
                ],
            ),
        ),
    ],
)
[source]

from unitxt.operators import RemoveValues
from unitxt.processors import PostProcess
from unitxt.string_operators import RegexSplit

Explanation about SequentialOperatorΒΆ

A class representing a sequential operator in the streaming system.

A sequential operator is a type of MultiStreamOperator that applies a sequence of other operators to a MultiStream. It maintains a list of StreamingOperator`s and applies them in order to the `MultiStream.

Explanation about RemoveValuesΒΆ

Removes elements in a field, which must be a list, using a given list of unallowed.

Args:

unallowed_values (list) - values to be removed.

Read more about catalog usage here.