string_operation module

string_operation.prepare_words(raw_text, bApplyStemmer=True, bCheckStopWords=False)[source]

prepares the word for the comparision with the vocab list

Parameters:
  • raw_text – text with control characters, number,
  • bApplyStemmer – true if is stemming shall be applied
  • bCheckStopWords – true if stopwords shall be removed
Returns:

normed word list

string_operation.validate_txtfile(path)[source]

Checks file type whether its txt or not :param path: path to file :return:

string_operation.validate_url(url_in)[source]

Performs some simple string checks to validate the URL for further processing

Parameters:url_in – The URL to perform the checks on
Returns:error: errorcode