import time text = input("Enter the text to be tokenized: \n") choice = input("\nEnter Your choice of library: \n->spaCy (s) \n->NLTK (n) \n->Both (b)\n") if choice == 's': spacy_pipeline(text) elif choice =='n': nltk_pipeline(text) elif choice == 'b': start = time() print("\t\t\tspaCy\n") spacy_pipeline(text) print(f"Time taken by spaCy: {time()-start}s") start = time() print("\n\t\t\tnltk\n") spacy_pipeline(text) print(f"Time taken by spaCy: {time()-start}s") else: print("Invalid choice!")