Skip to content

[MODULE] - Newline chunking/ splitting #367

Description

@LeonardPuettmannKern

Please describe the module you would like to add to bricks
A simple brick that splits a texts by newline characters.

Do you already have an implementation?

ATTRIBUTE: str = "text" # only text attributes

def newline_splitter(text: str) -> List[str]:
    splits = text.strip().split("\n")
    return [val for val in splits if len(val) > 0]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions