Skip to content
Mars edited this page Jul 31, 2017 · 35 revisions

Introduction

In understanding a message, entity recognition is one of the most important things developers might care about. In MessageOnTap, for each meaningful word to developers, we give the word a 'tag'.

For example, if your friend asks you in a message: "Hi Mike, can you send me the google doc link". In this case, the word 'Mike' will be attached with a 'PERSON' tag, which means Mike is a person. Another case would be: "Let's meet at Gates Building". The word 'Gates Building' will be attached with a 'PLACE' tag, which means the phrase, Gates Building, is a place.

Here is an example in Google cloud API:

("Mike" is attached with tag 'PERSON', "Gates Building" is attached with tag 'PLACE')

Try the demo in the following link: https://cloud.google.com/natural-language/

We provide common tags for developers which contain types such as person and place. However, because the developer may care about other keywords in the sentence, we provide the interface to let developers use keyword and regular expression to create customized tags. Common tags and Customized tags share the same data structure (only the setting of custom tags are open to developers).

Common Tag

  • Email
  • Phone
  • Person
  • Place
  • Event

Custom Tag

Developers can set by themselves.

Usage

Here are some examples.

Keyword Example

Tag of Good Friend List

String mTagName = "tagName";
Set<String> keywords = new HashSet();
keywords.add("Mike");
keywords.add("Fanglin");
keywords.add("Mars");
keywords.add("Adam");
Tag mTag = new Tag():

Regex Example

Tag of Number

String mTagName = "tagName";
Set<String> keywords = new HashSet();
keywords.add("/^-?\d+$/");
Tag mTag = new Tag():

Tag of Email

String mTagName = "tagName";
Set<String> keywords = new HashSet();
keywords.add("/^.+@.+$/");
Tag mTag = new Tag():

Clone this wiki locally