pylyrics2.clean_text
Module Contents
Functions
|
Cleans the text by removing special characters, html_tags, #tags, contaction words and convert everything to lower case. |
- pylyrics2.clean_text.clean_text(text, bool_contra_dict=True)[source]
Cleans the text by removing special characters, html_tags, #tags, contaction words and convert everything to lower case.
- Parameters
text (str) – Text to clean.
bool_contra_dict (Boolean) – A flag to clear contraction words
- Returns
Cleaned text.
- Return type
text
Examples
>>> clean_text("Early optimization is the root of all evil!", False) 'early optimization is the root of all evil'