basefunctions/classifier.py
def fixedvalue_categorizer(self, raw_text):
        '''regex classification based on defined search words'''
        scan_text = ''.join(self.machineclassifier.text_preprocess(raw_text))
        #categorize transaction text in every row based on classification search words
        for key in self.search_dict.keys():
            if re.findall(key, scan_text):#'string' value is the string value in the 'text' column in one row. 'key' refers to the search word in this context
                return self.search_dict[key] # if search word ('key') was found in string, return the corresponding category
        else:
            return self.langdict['noncategory'][0]
regex classification based on defined search words
regex classification based on defined search words
regex classification based on defined search words
def fixedvalue_categorizer(self, raw_text):
        scan_text = ''.join(self.machineclassifier.text_preprocess(raw_text))
        for key in self.search_dict.keys():
            if re.findall(key, scan_text):
                return self.search_dict[key] 
        else:
            return self.langdict['noncategory'][0]
def fixedvalue_categorizer ( self , raw_text ) : scan_text = '' . join ( self . machineclassifier . text_preprocess ( raw_text ) ) for key in self . search_dict . keys ( ) : if re . findall ( key , scan_text ) : return self . search_dict [ key ] else : return self . langdict [ 'noncategory' ] [ 0 ]
regex classification based on defined search words
regex classification based on defined search words
'''regex classification based on defined search words''' #categorize transaction text in every row based on classification search words #'string' value is the string value in the 'text' column in one row. 'key' refers to the search word in this context # if search word ('key') was found in string, return the corresponding category
self
raw_text