48-hour AWS Hack

As a learning exercise, I've decided to spend the next 48-hours trying to implement something using as many AWS services as I can.  I'm going to implement the "Game of Thrones" Alexa skill I've been thinking about for a while.

At its simplest, the GoT skill gives the user a verbal interface into the information stored in the GoT Wikia.  I don't want it to just read the pages though, so I'll need to think of what a user might want to query out of the wiki.

Time to brainstorm!

  • What is the name of Tyrion's father?
  • Is Cersei still alive?
  • What are some of Tyrion's nicknames?
  • Read me a quote from Petyr Baelish
  • What happened in episode 501?
  • What is "The Mother of Dragons" real name?

Given that I only have 48-hours to get something working, I better start with something fairly simple and build from there. Looking at the Wikia page for Daenerys Targaryen, I see that it is structured into the following sections:

  1. Biography
    1. Background
    2. Season 1
    3. Season 2
    4. eason 3
    5. Season 4
    6. Season 5
    7. Season 6
  2. Personality
  3. Abilities
  4. Titles
  5. Relationships
  6. Appearances
    1. TV series
    2. Video game
  7. Image gallery
  8. Family tree
  10. Behind the scenes
    1. Casting
    2. Costuming
    3. Fireproof?
  11. In the books
  12. See also
  13. References

So things are somewhat structured, but within some sections the data is quite unstructured.  There is, however, some structured data on the page in an info box.  This comes from the Character template, and can contain the following information:

| Title= NAME
| Season= SEASONS APPEARED IN. Format: [[Season x|x]]
If character is in more than 1 episode:
| First= first episode appearance
| Last= if dead, last episode appearance
If character is in only 1 or 2 episodes:
| Appearances= list of episode appearances, separated by <br>
If character is unseen:
| Mentioned= list of episodes in which character is mentioned
| Titles= titles
| Aka= aliases
Select one of these three subcategories:
| Status= [[:Category:Status: Alive|Alive]]
| Status= [[:Category:Status: Dead|Dead]]
| Status= [[:Category:Status: Uncertain|Uncertain]]
If known/applicable:
| Age= XX
| Birth= date of birth
| Death= date of death
| DeathEp= episode in which character died
| Place= character's origin
| Allegiance= character's allegiance
| Religion= character's religion
| Predecessor= character's predecessor in office
| Successor= character's successor in office
| Culture= character's culture
| Father= character's father
| Mother= character's mother
| Spouse= character's spouse
| Children= character's sons and daughter
| Siblings= character's siblings
| Lovers= character's non-married paramours
| Actor= actor's name
| Images= image category name

A few of these jump out at me. Clearly we can easily see if the character is alive or dead. We can get lists of aliases and titles, so we could translate from alias or title to name, and back again. We can also get relationship data, e.g. father, mother, children, etc.

Because of the structured nature of the Character template, it would probably be easiest to start there. How about this for a few questions we can ask, with possible answers?

  1. Is {{name}} [[alive|dead]]?
    1. {{name}} is alive
    2. {{name}} died on {{DeathDate}} during episode {{DeathEp}}
    3. I don't know who {{name}} is.  Can you please ask again?
  2. What are {{name}}'s nicknames?
    1. {{name}} is sometimes called {{nickname1}}, {{nickname2}}, {{nickname3}}, etc.
    2. {{name}} has no known nicknames
  3. Who is {{name}}'s father?
    1. {{fatherName}} is {{name's}} father.
    2. I don't know who is {{name's}} father.
    3. I am {{name's}} father. // perhaps as a random joke?

And, for attribution, how about:

  1. Where do you get your data?
    1. My data comes from the Game of Thrones Wikia at gameofthrones.wikia.com

OK, so my 48-hour goal is to "create a Game of Thrones Alexa skill that allows the user to ask if a character is alive or dead, and returns an accurate answer."

Next post: let's get started!