Last active
December 13, 2017 15:21
-
-
Save samkit-jain/f1fff588be4a74532d5201047e9b2de1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# method to categorize a particular | |
def categorize(particular): | |
# tokenizing | |
word_list = tokenize(particular) | |
# multiple similar statements | |
if keyword in word_list: | |
return category | |
# iterate over all transactions | |
for transaction in final_result: | |
# assign category | |
transaction['category'] = categorize(transaction['particular']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment