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:
- Biography
- Personality
- Abilities
- Titles
- Relationships
- Appearances
- Image gallery
- Family tree
- Quotes
- Behind the scenes
- In the books
- See also
- 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:
{{Character
| Title= NAME
| Image= IMAGE 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?
- Is {{name}} [[alive|dead]]?
- {{name}} is alive
- {{name}} died on {{DeathDate}} during episode {{DeathEp}}
- I don't know who {{name}} is. Can you please ask again?
- What are {{name}}'s nicknames?
- {{name}} is sometimes called {{nickname1}}, {{nickname2}}, {{nickname3}}, etc.
- {{name}} has no known nicknames
- Who is {{name}}'s father?
- {{fatherName}} is {{name's}} father.
- I don't know who is {{name's}} father.
- I am {{name's}} father. // perhaps as a random joke?
And, for attribution, how about:
- Where do you get your data?
- 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!
Brian