This Python application fetches information about famous people from Wikipedia and stores it in a SQLite database. The user inputs the name of a famous person, and the program checks if the name exists on Wikipedia. If it does, the program fetches a summary of the person's Wikipedia page and stores it in a SQLite database.
The application is a simple command-line Python program with the following functionalities:
-
The program prompts the user to input the full name of a famous person (e.g., Donald Trump).
-
It checks if the name exists on Wikipedia.
-
If the name is not found, it prints the message "I don't know this person" and suggests a similar name if possible.
-
If the name is found, it creates a new entry in a SQLite database table called famous_people.
-
On Better Version/famous_peopleV2: If the user input is to ambiguous (e.g., Obama) the script will suggestion 5 options (e.g;, Barack Obama, Michelle Obama, etc...) and if the desired choice is not in the options user can check 5 more options or Exit with the option: "None of the above"
-
The famous_people table has three columns:
- ID: An auto-incrementing identifier starting at 1.
- name: The full name of the person.
- summary: A summary of the person's Wikipedia page.
- Clone this repository or download the source code.
- Navigate to the project directory.
- Install the required Python packages:
pip install wikipedia
- Install Jupyter Notebook
- Run the Python script:
python famous_people.py
- Follow the on-screen instructions to input the name of a famous person.
- Open the famous_people.ipynb
- Install the required Python packages by running the following cell:
!pip install wikipedia
- Run it famous_people cell.
The famous_people python script is just a basic script following the Technical Test Instruction.
In the folder Better Version, there is a improved script which the script suggest a famous people name or when 'DisambiguationError' appear user can choose one of the suggested names.
It will suggest 5 names and if its not in those five new name suggestions, user can check the next 5 or Select 'None of the above' to exit.