Also, if you transform bag-of-words vectors into a dense form, you're gonna have a bad time (insert appropriate meme picture here). In large corpora, dimensionality grows quite substantially - if you work with news corpora or Wikipedia, you're in the 100k-1M dimensional space pretty quickly.
Great to see an approachable explanation for NLP. As they say sometimes, when you know how it's done, it stops being "Artificial Intelligence".
I solved this by using the "Insomniac" approach - if you play a silent sound every 30 seconds or so, the scheduler will reset the sleep timer and the app will keep working. It drains the battery in around 1 day though.
I developed a similar app for a psychology research team. They needed a way to trigger certain things (sound recording, etc) when two certain people were in physical proximity. As it turns out, bluetooth bonjour discovery did the trick when they were in the same room. Over wifi, it got triggered sooner, once one of them enterred the building where the other one was (which corresponded to being on the same LAN).
The hard problem on iOS devices (iPod touch) was keeping them awake during this, so they could detect eac other. iOS likes to sleep while locked. Got a solution, which made the battery last around a day. I guess they're not using mobile to mobile peer triggers, but fixed-to-mobile and then deliver a notification. Interesting to see this popping up in commercial tech.
I was going to spin my code out into a infrastructure for spatial awareness triggers for various home automation tasks, but also couldn't find a killer use case. I'll be following this topic for ideas :)
They offer both SaaS, as well as a simple way to deploy the whole thing and run a local (reverse-) geocoding server. It does take a few days to build the GeoNames + OpenStreetMap index though. I run it locally for mapping coordinates to cities and it runs quite decently, a 2-core 2GB Linux VM running PostgreSQL gets me about 80-100 queries/s. It has a nice JSON API so it shouldn't be too hard using it from iOS.