arthurai.common.constants.TextDelimiter#

class arthurai.common.constants.TextDelimiter#

Bases: arthurai.common.constants.ListableStrEnum

This class contains patterns that can be used as text_delimiter for NLP models.

Methods

list

Lists all attributes in alphabetical order

Attributes

COMMA

"," Splits on a single comma.

COMMA_PLUS

",+" Splits on one or more commas.

NOT_WORD

"\W+" Splits on any character that is not a word.

PIPE

"\|" Splits on a single pipe.

PIPE_PLUS

"\|+" Splits on one or more pipes.

WHITESPACE

"\s+" Splits on whitespace.

COMMA = ','#

"," Splits on a single comma.

Ex: "this ,is,,a,test" = ["this ", "is", "", "a", "test"]

COMMA_PLUS = ',+'#

",+" Splits on one or more commas.

Ex: "this ,is,,a,test" = ["this ", "is", "a", "test"]

NOT_WORD = '\\W+'#

"\W+" Splits on any character that is not a word.

Ex: "this  is,aaaa,,,,,test!" = ["this", "is", "aaaa", "test", ""]

PIPE = '\\|'#

"\|" Splits on a single pipe.

Ex: "this |is||a|test" = ["this ", "is", "", "a", "test"]

PIPE_PLUS = '\\|+'#

"\|+" Splits on one or more pipes.

Ex: "this |is||a|test" = ["this ", "is", "a", "test"]

WHITESPACE = '\\s+'#

"\s+" Splits on whitespace.

Ex: "this  is,a test! " = ["this", "is,a", "test!", ""]

classmethod list()#

Lists all attributes in alphabetical order