Category Archives: Machine Learning

Recognizing Speech on Android

Tonight Gina and Esma will be presenting their Kartuli Speech Recognition trainer at Android Montreal.
14-08-20 - 1
The talk will shows how to use speech recognition in your own Android apps. The talk will start with a demo of the Kartuli trainer app to set the context for the talk, and then dig into the code and Android concepts under the demo. The talk has something for both beginner and advanced Android devs, namely  two ways to do speech recognition: the easy way (using the built-in RecognizerIntent for the user’s language) and the hard way (building a recognizer which wraps existing open source libraries if the built-in RecognizerIntent can’t handle the user’s language). While Gina was in Batumi she and some friends built an app so that Kartuli users (code) (slides) (installer) could train their Androids to recognize SMS messages and web searches. Recognizing Kartuli is one of the cases where you can’t use the built-in recognizer.
  • How to use the default system recognizer’s results in your own Android projects,
  • How to use the NDK in your projects,
  • How to use PocketSphinx (a lightweight recognizer library written in C) on Android

Live broadcast on YouTube
Code is open sourced on GitHub

Week 7: Searching for court cases in Kartuli

Since Kartuli is an agglutinative language with very rich verb morphology searching for appropriate results is very difficult. Over the past few weeks of observing it seems like most Kartuli speakers prefer to search using Russian search engines, using Russian vocabulary. Mari (who is a lawyer) and Gina decided to create a corpus of law cases in Kartuli, and see if the FieldDB glosser can help build a stemmer that might be used for searching in Georgian.

While Mari was teaching Gina and Esma how to use the Georgian court websites, in the middle she showed them how she modifies her search terms to get some results in supreme court cases, unlike the constitutional court search page which lets you search for an empty string and see all results… This was an illuminating experience of searching as a minority language speaker, so we decided to share it as an unlisted YouTube video despite the poor image quality.

Supreme Court

* Requires search to find documents
* Need to use very general search terms to get any results, and results you get are not always relevant to your case you are working on
* Documents are .html which is excellent for machines but Mari didn’t seem to excited about it, we will ask her more later


Constitutional Court
* Requires no search to find documents
* Documents are in .doc format which users are used to
* Easy to download documents so you can read them offline when you are in the village, or put on a usb key if you are using someone else’s computer for the internet.


FieldDB: An on/offline cloud data entry app which adapts to its user’s I-Language.

iLanguage Lab is getting ready to launch FieldDB, a cloud based data entry app created for researchers at McGill, Concordia and University of California Santa Cruz. FieldDB is written in 100% Javascript and uses CouchDB, a NoSQL data store which scales to accomodate large amounts of unstructured data. CouchDB uses Map Reduce to efficiently search across data, a win-win for our clients. FieldDB uses fieldlinguistics and machine learning to automatically adapt to its user’s data. Most importantly, even though FieldDB is a WebApp that runs in your browser, FieldDB can run 100% offline. FieldDB will go into beta testing the first week of July. FieldDB will be officially launched in English and Spanish on August 1st 2012 in Patzun, Guatemala.

FieldDB launch in Patzún Guatemala at CAML.
FieldDB launch in Patzún Guatemala at CAML.

What is FieldDB?

FieldDB is a free, open source project developed collectively by field linguists and software developers to make a modular, user-friendly app which can be used to collect, search and share your data.

Who can I use FieldDB with?

  • FieldDB is a Chrome app, which means it works on Windows, Mac, Linux, Android, iPad, and also offline.
  • Multiple collaborators can add to the same corpus, and you can encrypt any piece of data, keep it private within your corpus, or make it public to share with the community and other researchers.

How can FieldDB save me time?

FieldDB uses machine learning and computational linguistics to adapt to your existing organization of the data which you import and predict how to gloss it. FieldDB already supports import and export of many common formats, including ELAN, Praat, Toolbox, FLEx, Filemaker Pro, LaTeX, xml, csv and more, but if you have another format you’d like to import or export, Contact Us.

What are the principles behind FieldDB?

We designed FieldDB from the ground up to be user-friendly, but also to conform to EMELD and DataOne best practices on formatting, archiving, open access, and security. For more information, see Section 6 of our white paper. We vow never to use your private data, you can find out more in our privacy policy.

Curious how it works? FieldDB is OpenSourced on GitHub

Word Edit Distance Web Widget

If you have a spell checker, you want it to suggest a number of words that are close to the misspelt word. For humans, its easy for us to look at ‘teh’ and know that it is close to ‘the’, but how does the computer know that? A really simple Language Independent way to do it if you don’t have any gold standard data, is to assign costs to the various edits, substitution (2), deletion (1) and insertion (1), and picking the cheapest one.

The table below applies Levenshtein’s algorithm (basically, substitution costs 2) letter by letter. The total distance between the two words, 4 is in the top right corner, because it costs 2 to substitute ‘u’ for ‘i’ and 2 to substitute ‘t’ for ‘k’.

At the Lab, we put together an interactive javascript so that you can input whatever words you like and find out their edit distance. Just enter the words you want to compare!

Word 1:

Word 2:

And if you really like it, you can download it from github.
Click here to read more about edit distance.

Stanford NLP Class registration ends soon!

If you’re interested in Natural Language Processing or you have been scraping and have lots of text data the Stanford NLP class a great opportunity to brush up on your regular expressions and learn some tricks. The professors are Dan Jurafsky and Chris Manning. Dan Jurafsky is a leading researcher on investigating the connection between Prosody and written text, and the co-author of Speech and Language Processing.

Natural language processing is the technology for dealing with our most ubiquitous product: human language, as it appears in emails, web pages, tweets, product descriptions, newspaper stories, social media, and scientific articles, in thousands of languages and varieties. In the past decade, successful natural language processing applications have become part of our everyday experience, from spelling and grammar correction in word processors to machine translation on the web, from email spam detection to automatic question answering, from detecting people’s opinions about products or services to extracting appointments from your email. In this class, you’ll learn the fundamental algorithms and mathematical models for human language processing and how you can use them to solve practical problems in dealing with language data wherever you encounter it.


We are hosting a small bi-monthly NLP get together to discuss and apply the Stanford NLP class to some local Montreal data. If you’re interested you can join us, leave us a comment below and we will tell you about our meeting times.

Giving robots Eyes and Ears with Android

iLanguage Lab members Theresa and Gina formed part of the Roogle Team at the Cloud Robotics Hackathon 2012. At the hackathon the team worked on two robots, a Darwin-OP robot, a humanoid robot running Ubuntu Linux, and a Rover robot with Arduino controlling movement and an Android as “eyes.”

You can get the code and the Android installer at

The Bacteria Detecto-Droid Team gets Featured in Montreal TechWatch

The Bacteria Detecto Droid team was recently featured in the Montreal TechWatch. The project was built for researcher John Feighery’s Portable Microbiology Kit by a team of 5, including iLanguage Lab members at  Random Hacks of Kindness Montreal back in December. For more updates, checkout the Montreal TechWatch article “Portable Microbiology Lab – There’s an App for That!

Android phones capable of taking these pictures cost less than 120$. Combine this with affordability of ‘Portable Microbiology kits’, that can be incubated using body heat, and we may end up with a sustainable solution to help fight water problems that plague many parts of the world.


The Portable Microbiology Lab featured on Montreal Tech Watch

The Bacteria Detecto Droid wins at Montreal RHOK

    iLanguageLab member Gina was part of the “Bacteria Detecto Droid” team which won best use of technology at Random Hacks of Kindness Montreal. Check it out in the 24 Heures!

    …un des deux projets gagnants, un laboratoire bactériologique portable. «C’est une application pour téléphone intelligent qui détecte les bactéries présentes dans l’eau, a-t-il expliqué. Elle est capable de dire si l’eau est dangereuse ou non. Le système accumule les données pour produire une carte».

    «On a montré que ça pouvait être fait par un téléphone, s’est réjoui M. Grassick. Ce n’est pas cher et ça peut être utilisé par des locaux dans des pays en développement.»

    The project was one of over 30 winning RHOK projects around the world, we were also mentioned in the The World article “Geeks without Borders”!

    Other projects were equally ambitious. In Portland, developers created an application to allow medical workers to track disease outbreaks in real-time. In Bangalore, hackers built a job database for unskilled workers. In Montreal, developers created an app that can scan a microscopic photo of bacteria taken from water to test for drinking safety—a key tool for poorer countries.

    The code uses OpenCV, an Computer Vision library to process the images on the Android Client, check out the code on GitHub.