Adolescent Alert

Adolescent alert is a service for parent who wants to keep track on their kids social endeavors without violating the kids privacy. Utilizing keylogging and NLP algorithms to monitor the kids activities, the parent gets an alert only when the kids communication indicate a need for it.

Unlike many other apps who offer the parent an hidden insight to their kids life, Adolescent alert takes pride in providing privacy for the kids first, while maintaining the level of safety their parent will like to track. 

Adolescent-alert   Adolescent-alert-setting

The app operate in four areas. First the parent needs to install the app or ask the teenager to install it on any device the app will run from. from this point on, any social activity will be monitored on the device, once the app is installed on a device it will remain ‘hidden’ and will be able to be accessed through the parent device. 

In addition based on users setting, the app can also include GPS tracking and sudo friend-follower request for more in-depth analysis of the teen activity, this will simply be a silent friend or in other words ‘The snitch’. any activity will be sent to the server to be analyzed through a deep sentiment analysis which will determine and classify the activity, once the algorithm sense activity or pattern of activities which fits within the parent alert setting a notification about the specific activity will be sent to the parent.



 The idea behind keylogging is actually very simple, it gets a bit more complicated to integrate it into all the apps on a device, on android devices for example we simply create a new keyboard and set it as the default one, the onkey event with this keyboard will record the typed activity.

When a call gets to the server we start the analysis of it, obviously this also gets more complicated as we want to track patterns of communication rather then just a single sentiment of a string, we also want to learn from these sequences what could become a new potential pattern, for this reason we’ll save a record of the last 2400 calls and when an alert is triggered we’ll trackback to see if we can identify any earlier signals of it with a deeper analysis.

The first thing we do when a call get to the server is to identify the type of content we deal with, if its an image, a url or a text message.

Nude detection

in case of image we try to see if the image has any nudity elements in it, the first check which is more general simply check for skin ratio areas in the picture.

 We’ll use similar analysis to check images inside webpages in case of a url submission.

Sentiment Analysis

To analyze the nature of a text we use sentiment analysis, this run in a very similar way to what I posted here.   

first we define the data sets and sentiments we’ll be using, then we’ll run through them, load each corups and format the words in it to a binary list with the function getWordsDict. then we’ll sort the data in the train and test lists based on the split test we define. 

We use Naive Bayes Classifier to train and classify potential sentiment

The classify method makes a use of a few NLP method utilizing the power of nltk to split text into paragraphs, tokenize it and remove any stop words.

Named-entity recognition (NER)

One of the important thing that a parent wants to know and relate to the idea of safety is who the kid is talking to, one way to know that is based on the dialog, another way is to look for names in a text, we use this in places where we can expect a reference for a full name, rather then in quick text typing where one will right only the first name, two services of dialog makes this quite easy, you can probably guess what they are: google and Facebook. since these are two places that look for the same information they will try to have you type a full name or a reference to a real person in your network.

To find a person on google we use the google freebase api

for Facebook result we simply call the open graph api and check if we found a similar person in the result

 To find a potential name in a sentence we use regex

 so when we test the sentence “Craig Bling is a great friend Sara Lopez” we hopefully get the following

 we also use the ngrams function from nltk, what the function does is return all the options around a given value, so we can assemble potential full name

There are many more layer for an adolescent alert, I hope you enjoyed these so far.