The evribot and Relationship Triples
The evribot is an automated Twitter account that tweets extremely brief summaries of news stories. We created the evribot to demonstrate how our API extracts meaningful relationships from unstructured documents on the web. The tweets take the form of (subject, link, target) triples that represent the relationship between a subject entity and a target entity. Triples often represent a single sentence, where the link is a verb and the target is the object. Here’s an example taken from the evribot:
[Eric Holder » closing » Guantanamo Bay] "Obama's new detainee policy: Break from Bush, or the same?" → http://ur.ly/9Ll
In this tweet, the triple is (Eric Holder, closing, Guantanamo Bay) and comes from a sentence in the second to last paragraph of the article. Triples can also be used to represent more general relationships between two entities. For example, (Eric Holder, government agency, United States Department of Justice).
While entity tagging allows one to identify the popular people, places, and things that are in the news, our ability to extract these triples allows us to take a stab at why those entities are in the news. One purpose of the evribot experiment is to see if exposing triples to you, our users, is useful. So tell us what you think.
A Few Technical Details
The evribot is driven by a Ruby script that uses the soon to be released evri-api rubygem that wraps the Evri API for convenient use within Ruby. Here’s an outline of the Evri API calls used to extract the triples that make up the evribot’s tweets (all paths are relative to http://api.evri.com):
First, evribot retrieves a list of popular people using /v1/zeitgeist/entities/person/popular. An entity from this list is used to form the subject of the triple. Given a subject entity, the following calls are made to find the link, target, and related article that make up the tweet:
- The first relation from /v1/person/eric-holder-0x149fdb/relations is used as the link of the triple.
- The selected relation of the previous query will contain an href attribute that can be used to find the targets of the relation. Again pick the first item.
- Finally, use the targetHref provided in the selected target entity to obtain an article /v1/person/eric-holder-0x149fdb/relations/facet/government-agency/organization/united-states-department-of-justice-0x2ad44?media=articles
If you have questions about the Evri API, you can search for answers and ask questions on our developer mailing list. And if you have feedback for evribot, feel free to send it an “@ reply” or direct message with your thoughts.