import time

data = [
    "apple", "banana", "grape", "orange", "strawberry", "watermelon",
    "apple juice", "banana smoothie", "grape jelly", "orange jam", "strawberry ice cream", "watermelon sorbet",
    "apple pie", "banana bread", "grapefruit", "orange cake", "strawberry tart", "watermelon salad"
]

queries = [
    "apple", "banana", "grape", "orange", "strawberry", "watermelon",
    "juice", "smoothie", "jelly", "jam", "ice cream", "sorbet",
    "pie", "bread", "grapefruit", "cake", "tart", "salad"
]

for query in queries:
    start_time = time.time()
    results = keyword_search(query, data)
    end_time = time.time()

    search_time = end_time - start_time
    accuracy = len(results) / len(data) * 100

    print(f"Query: {query}")
    print(f"Results: {results}")
    print(f"Search time: {search_time:.6f} seconds")
    print(f"Accuracy: {accuracy:.2f}%")
    print("\n")
