Skip to content

[MODULE] - Newline chunking/ splitting #367

Open
@LeonardPuettmannKern

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]

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions