19 lines
No EOL
595 B
Python
19 lines
No EOL
595 B
Python
import json
|
|
#print("Hello, I am a question answering bot.\n")
|
|
#Question = str(input("Please enter a question, and press the ENTER key:\n"))
|
|
#print ("I think that you asked " + (Question))
|
|
|
|
#def jaccard_similarity(list1, list2):
|
|
# s1 = set(list1)
|
|
# s2 = set(list2)
|
|
# return float(len(s1.intersection(s2)) / len(s1.union(s2)))
|
|
#list1 = ['dog', 'cat', 'cat', 'rat']
|
|
#list2 = ['dog', 'cat', 'mouse']
|
|
#jaccard_similarity(list1, list2)
|
|
|
|
|
|
with open('questionbank.json', 'r') as f:
|
|
questionBank = json.load(f)
|
|
|
|
# Output: {'name': 'Bob', 'languages': ['English', 'French']}
|
|
print(questionBank) |