Having been fed up with spam email and inspired by SafeTrek's mission, we decided to combine the two into something we were passionate about: improving the safety of others through an appropriate emergency dispatch and threat assessment based on filtering key words in a user's text message.

What it does:

1) User enters a text message stating that he/she is in danger
2) User presses a button to submit his/her typed sentence into our application
3) Application takes the sentence, and splits it based on space delimiter
4) Application function takes in parameter of threshold, and runs each word through our Naive Bayes algorithm:
  a) Remove stop words such as "and" "of" "the"
  b) Reduce words to distinct ones (remove duplicate words)
  c) Stemming (remove past tense, plurals, etc)
5) Calculate probability that user is in danger for each word
6) Multiply all probabilities together, compare with threshold parameter, and return boolean of whether user is in danger and needs an emergency dispatch

How we built it:

We originally programed the methods for the Naive Baynes algorithm, json file readers, and text-json files in Java, a language we were all familiar with. We then created text files for word associations related to Police, Fire, and Medical. From there, we learned how to program in javascript, since the SafeTrek API was written in that language. Then, we translated the java files into javascript files, and implemented them into the files provided by SafeTrek.

Challenges we ran into:

Primarily converting text files into json files and creating map objects in javascript from the json files.

Accomplishments that we're proud of:

Creating a working prototype by demo day and overcoming the challenges that stumped us for hours on end.

What we learned:

How to program in javascript, and the use of the Internet and Slack as valuable tools to address many of our questions. And when all else failed, we found that going around and asking other teams for help yielded exceptional results and unique interactions.

What's next for Naive Bayes Interpreter:

Incorporating all the words in the English-Dictionary to be used with the Naive Bayes algorithm, in addition to streamlining the project to be a full-fledged independent web application.

Share this project: