I uploaded a Wikipedia article title file containing the name of each Wikipedia article. I need to find all the article titles that may be possible. For example, I might have the word hockey, but the hockey Wikipedia article I want is Ice_hockey. This should also be case insensitive.
I am using Python, and is there a more efficient way than just doing a string search? I will perform this search, for example, 500 or 1000 times per minute ideally. If line by line is my only option, are there some optimizations I can do in this?
I think there are several million lines in the file.
Any ideas?
Thanks.
python string search large-files
apexdodge
source share