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
Lists all attributes in alphabetical order
Attributes
","
Splits on a single comma.",+"
Splits on one or more commas."\W+"
Splits on any character that is not a word."\|"
Splits on a single pipe."\|+"
Splits on one or more pipes."\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