Preprocess
get_preprocessor(preprocess_str)
Gets a preprocessing (function) from its name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
preprocess_str |
str
|
Name of the preprocess |
required |
Raises: ValueError: If the name of the preprocess is not known Returns: Callable: Function to be used for the preprocessing
Source code in template_nlp/preprocessing/preprocess.py
get_preprocessors_dict()
Gets a dictionary of available preprocessing
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
Dictionary of preprocessing |
Source code in template_nlp/preprocessing/preprocess.py
preprocess_sentence_P1(docs)
Applies "default" preprocess to a list of documents (text)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
docs |
Series
|
Documents to be preprocessed |
required |
Returns: pd.Series: Preprocessed documents