%pylab inline
Populating the interactive namespace from numpy and matplotlib
/Users/bredin/Python/tmp-cab9fff2ebeb8a45/lib/python3.4/site-packages/matplotlib-1.4.3-py3.4-macosx-10.10-x86_64.egg/matplotlib/mathtext.py:47: UserWarning: Due to a bug in pyparsing <= 2.0.0 on Python 3.x, packrat parsing has been disabled. Mathtext rendering will be much slower as a result. Install pyparsing 2.0.0 or later to improve performance. warn("Due to a bug in pyparsing <= 2.0.0 on Python 3.x, packrat parsing "
The following command will install GameOfThrones TVD plugin (and TVD if it is missing)
pip install TVDGameOfThrones
This will install additional dependencies for visualizing resources in Jupyter/IPython notebook:
pip install "tvd[notebook]"
The following command will download all resources for Game Of Thrones into /tmp/
directory.
python -m tvd.create metadata /tmp/ GameOfThrones
Initialize GameOfThrones TVD plugin
from tvd import GameOfThrones
gameOfThrones = GameOfThrones('/tmp')
IN CASE YOU USE 'outline_www' RESOURCES, PLEASE CONSIDER CITING: @misc{wikia, title = {{Game of Thrones Wiki}}, howpublished = \url{http://gameofthrones.wikia.com/} } IN CASE YOU USE 'transcript' RESOURCES, PLEASE CONSIDER CITING: @misc{foreverdreaming, title = {{Forever Dreaming}}, howpublished = \url{http://foreverdreaming.org/} } IN CASE YOU USE 'transcript_www' RESOURCES, PLEASE CONSIDER CITING: @misc{foreverdreaming, title = {{Forever Dreaming}}, howpublished = \url{http://foreverdreaming.org/} }
Get first episode
episode = gameOfThrones.episodes[0]
episode
Episode(series='GameOfThrones', season=1, episode=1)
Provides:
scenes = gameOfThrones.get_resource('scenes', episode)
scenes
/Users/bredin/Python/tmp-cab9fff2ebeb8a45/lib/python3.4/site-packages/matplotlib-1.4.3-py3.4-macosx-10.10-x86_64.egg/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison if self._edgecolors == str('face'):
outline_www = gameOfThrones.get_resource('outline_www', episode)
outline_www
Source: http://foreverdreaming.org/
Provides:
Does not provide timestamps.
transcript = gameOfThrones.get_resource('transcript', episode)
transcript
Source: LIMSI
Provides:
transcript_aligned = gameOfThrones.get_resource('transcript_aligned', episode)
transcript_aligned.crop(180, 190)