In this source code, Wikipedia search is done easily using wikipedia library in Python. Wikipedia search summary is displayed as output. Can be used in chatbots.
In this source code, Wikipedia search is done easily using wikipedia library in Python. Wikipedia search summary is displayed as output. What to search, input is taken from user. It can be used in chatbots. Good internet connection is a must for this code to work properly without any errors. Code can be more personalized by making minor changes as mention in the file.
Need internet connection to get the output.
Install wikipedia library in your PC.
Run this command in command prompt - pip install wikipedia
Right now the code prints first 4 sentences of the wikipedia summary. You can change the number of lines you want to print by changing the no_of_lines variable.
Submitted by Rasika Deshpande (RasikaDeshpande24)
Download packets of source code on Coders Packet
Comments