(valueList)
| 48 | |
| 49 | #removes punctuations and whitespaces from list items |
| 50 | def preprocessListValues(valueList): |
| 51 | valueList = [x.lower() for x in valueList if checkIfNullString(x) !=0] |
| 52 | valueList = [re.sub(r'[^\w]', ' ', string) for string in valueList] |
| 53 | valueList = [x.replace('nbsp','') for x in valueList ] #remove html whitespace |
| 54 | valueList = [" ".join(x.split()) for x in valueList] |
| 55 | return valueList |
| 56 | |
| 57 | #checks different types of nulls in string |
| 58 | def checkIfNullString(string): |
no test coverage detected