Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ChatBot/dictionary.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24 lines (21 sloc)
857 Bytes
This file contains 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
### Code wrote by Roshan, I changed all of the values within the dictionary to be all lower case | |
def definition(value): | |
Search={'family':'sedan','family and space':'suv','storage':'pickup',"others":"van", | |
"family and space and storage":"hatchback","fancy":"convertable","only for 2":"couple"} | |
x=Search.get(value) | |
return x | |
def nat(e): | |
if 'family' in e: | |
l="family" | |
elif "family" in e or "space" in e or "comfortable" in e: | |
l="family and space" | |
elif "storage" in e or "business" in e: | |
l="storage" | |
elif "public" in e or "van" in e: | |
l="others" | |
elif 'fancy' in e or"opens from top" in e or"convertible" in e: | |
l="fancy" | |
elif "me and my" in e or"couple" in e or "just married"in e: | |
l="only for 2" | |
return l | |
### End of code wrote by Roshan |