Final Year Project: A conclusion

My final year project is now complete and has been submitted. So I thought I'd take this time to write up a nice little blog post about it! With over 20 weeks of work going into it, this is one of the projects that I feel I am the most proud of. It has had it's share of successes and failures, some of which I will talk about here.

What was the project?

First, let me start by reminding you what the project was! The formal definition for my project was: Context Aware A.I. - That really doesn't give away much about what it was now does it!

So, let me explain it: my final year project was to develop a system that was capable of tracking the context between discrete sentences. Or, put more simply: tracking how sentences are related to each other.

Most people use language every day. However, very few realise just how complex language actually is! Lets start by looking at a single sentence and what is needed for a system to get useful information from it.

A single sentence

So, if we're trying to track how sentences are related, the first place to look is at a sentence itself. Let's start with a very simple sentence:

I'm going to the cinema tonight

Now, just by reading that sentence I'm sure you've already inferred a few things:

  • The subject of the sentence is me
  • The topic of the sentence is a trip to the cinema
  • The trip is happening tonight

But, how did you come up with that? I'm sure you don't know and so have an answer something like "I just did". Well that's perfectly acceptable for you. However, a computer doesn't "just" come up with this and so it needs a way to work this information out. This was the first part of my project.

So, how do we understand the sentence?

So, here's the real answer as to how you came up with those three facts about that sentence:

The first thing you did in your head was split the sentence down into each individual word and worked out what their job in the sentence actually is. This is referred to as their lexical or semantic role in the sentence. Next, you used those to group the words into what are known as phrases. This sentence has two distinct noun phrases and these give you the first two bullet points, the subject and the topic. Finally, by looking for temporal phrases (i.e. words that are related to time) you can infer the final point.

Doing that via the computer gives something along the lines of this:
Tagged sentence

How to tell if two sentences are related?

So the next big part of my project was the concept of tracking context. This was broken down into several distinct types of context, but here I'm only going to discuss the most important: how to tell if the sentences are related.

Once the system has processed the sentence, it now has a topic for the sentence. The topic is then converted to a numerical representation of the words for the computer. This then allows a mathematical comparison of two topics.

Now, comparing if two topics are less than or greater than each other doesn't really make sense. However, comparing if they are equal does! Also, maths can be used to determine if the topics are related to each other by establishing how far apart the numeric representation of each.

By doing this, the system was able to track which topics were related to each other.

How is this useful?

There are many practical applications of this. The application in mind at the start of the project was to improve digital personal assistants. - How often have you asked Siri or Google a question, and then followed it with another, related question and found it's already forgotten what you said? By using this system, the sentences could be detected as related and therefore, a more relevant reply could be given.

The research is not ready for this yet, as there are many times it fails to properly detect the topic of a sentence. However, hopefully in the future a system like this could be common place within artificial intelligent assistants.