Making Wikipedia Available by Text Message

Murtaza Tunio
BurningDaylight
Published in
4 min readApr 30, 2019

I recently faced a problem with some of the students I work with at NJV High School. These particular students were boarding school students from interior Sindh, going home for their summer vacation. I had given them a summer research project, which potentially involved doing some research online. Some of these students came back to me and said that they didn’t have any way to access internet in their homes, and so would not be able to complete the assignment. These students did not have smartphones, computers, or places in the village where they could access the internet. Moreover, the internet is not free (yet), what is an inexpensive megabyte of information for some is an investment for others.

I started thinking about a solution to this problem, one which went a step further than just providing my phone number and asking them to call me when they needed help. I wanted to make Wikipedia, and a decent dictionary available to these students over a protocol which would be low cost, not dependent on 4G/internet coverage or access to smartphones.

After some research I discovered the ‘Wikipedia Zero’ project, which set out to achieve many of the same objectives I have. Wikipedia Zero has been around since at least 2013, and has achieved some remarkable feats. It turns out, however, the implementation of Wikipedia Zero in Pakistan requires internet access. (In Pakistan, using the ‘m.wikipedia.org’ or ‘zero.wikipedia.org’ from a Mobilink subscriber is free of cost)

So after some research and prototyping, I made my own solution which allows users to access Wikipedia over sms. Using a simple interface users can search Wikipedia, look up articles and look up definitions of words through their basic phones, without internet access.

How its done:

The prototype I have made currently runs using Twilio. Twilio is a company which offers all kinds of automated telephone services (an example being Uber’s call masking and texting). So far Twilio does not offer phone numbers and ‘short codes’ (free to text numbers) in Pakistan. Thus the prototype is built using a US number . In the future I hope to partner with some local companies offering similar services.

I wrote a short script which takes in keywords, sent by text, searches the internet for relevant information, and replies with snippet or summaries of Wikipedia articles. This script plugs into the Twilio framework, and handles all incoming messages to a specific number. The basic keywords are:

  • search <search term>: Searches Wikipedia for the search term, and replies with the top 5 corresponding page names
  • wiki <page name>: Opens the Wikipedia page corresponding to the name, and sends a few snippets of the text of the page over sms. With additional snippets available upon request.
  • more: The user would text this, to request more snippets of the article be sent
  • urdu: The user would text this to change the language of snippets to urdu.
  • english: As above, it would change the language of snippets to english
  • define <word>: This would return the dictionary definition of the word

Consider that all of this can be achieved using just basic phones, without internet coverage. I can imagine a future where instead of handing out books to impoverished areas, we hand inexpensive recycled basic cell phones. For the cost of a cheap dictionary, we can provide the entire wealth of knowledge which is on Wikipedia.

Screenshots:

A Search Query ‘search medium’ (right), result (left)
Opening the wiki page, query (left), result (right)
Part 1 and 2 of the Steve Jobs page
The first few lines of the Steve Jobs page in Urdu!

This short script sits behind the Twilio message handler: https://github.com/MirTunio/BurningDaylight/blob/master/Wikihelper.py

--

--