Inspiration
I remember my vacation in India very fondly. My family stayed at my grandfather's house in the middle of the bustling city of Banglore. In the part of Banglore at which my grandfather's house is located, the power used to go out every other morning at 9:30. This outage would last for around an hour and a half. This meant that no one in the house could access the internet for an entire one and a half hours. While the part of Banglore in which my grandfather lives has improved considerably, other parts of India and the world remain in darkness for hours at a time. Especially during global pandemics, the internet is required for existence. We often take utilities for like google and other search engines for granted. They allow for information access during the worst crisis, given that you have access to the internet. What are people supposed to do when they don't have internet?
What it does
Introducing Offline Oracle, an offline search engine designed to provide facts to those who have lost their internet. The software maintains a database of facts relevant to an ongoing crisis. Whenever the device on which the software is running gains access to the internet, the software updates its database using the latest facts. The user can run a locally hosted webserver. The user can then interact with the webserver through their browser of choice. The interface is extremely similar to that fo Google and other popular search engines. Offline Oracle will display the 10 most relevant facts from its database to the given question in order of relevance.
How I built it
I built Offline Oracle using python and javascript. I also used markup languages like HTML and CSS. I used flask to run my webserver. I used the sqlite3 library in python to manage my database. I added google drive support in my program so that it could update whenever it could connect to the internet. I used google's Universal Sentence Encoder to encode each of the facts into a 512-dimensional vector. All of these vectors are stored in a K dimensional tree data structure. When a question is entered, I encode the question into a vector using the Universal Sentence Encoder and display the sentences associating with the 10 closest vectors to the question vector in terms of Euclidean distance.
Challenges I ran into
Some challenges I ran into include errors with the K dimensional tree. I had difficulty getting more than just the closest vector to the question vector. In order to get the 10 closest vectors, I had to implement a bounded priority queue. I also ran into trouble using the Google Drive API. Luckily, I found a python wrapper library that handled the entire OAuth process, allowing me to work on the rest of the code.
Accomplishments that I'm proud of
I am proud of my implementation of the K dimensional tree data structure. It allowed my code to be much more scalable than if I had not included it. I am also proud of the auto-update feature which automatically updates the database using the google drive API whenever the device has a connection to the internet.
What I learned
While developing Offline Oracle, I learned many new skills. I used sqlite3 for the first time yesterday. I also learned many new Linux shortcuts and skills.
What's next for Offline Oracle
The interface still needs to be improved upon to make it more user friendly. The next big step for Offline Oracle is to add more facts to the database. I need to add thousands of facts to the Offline Oracle database to make the software as useful as possible.
Log in or sign up for Devpost to join the conversation.