nalp.utils.preprocess

Pre-processing functions.

nalp.utils.preprocess.logger
nalp.utils.preprocess.lower_case(s: str)

Transforms an input string into its lower case version.

Parameters

s – Input string.

Returns

Lower case of ‘s’.

Return type

(str)

nalp.utils.preprocess.pipeline(*func: callable)

Creates a pre-processing pipeline.

Parameters

*func – Functions pointers.

Returns

Pre-processing pipeline for further use.

Return type

(callable)

nalp.utils.preprocess.tokenize_to_char(s: str)

Tokenizes a text to characters array.

Parameters

s – Input string.

Returns

Tokenized characters.

Return type

List[str]

nalp.utils.preprocess.tokenize_to_word(s: str)

Tokenizes a text to words array.

Parameters

s – Input string.

Returns

Tokenized words.

Return type

(List[str])

nalp.utils.preprocess.valid_char(s: str)

Validates the input string characters.

Parameters

s – Input string.

Returns

String ‘s’ after validation.

Return type

(str)