In [1]:
%pylab inline
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
In [2]:
from tvd import GameOfThrones
gameOfThrones = GameOfThrones('/tmp')
Get first episode
In [3]:
episode = gameOfThrones.episodes[0]
episode
Out[3]:
Provides:
In [10]:
scenes = gameOfThrones.get_resource('scenes', episode)
scenes
Out[10]:
In [7]:
outline_www = gameOfThrones.get_resource('outline_www', episode)
outline_www
Out[7]:
Source: http://foreverdreaming.org/
Provides:
Does not provide timestamps.
In [8]:
transcript = gameOfThrones.get_resource('transcript', episode)
transcript
Out[8]:
Source: LIMSI
Provides:
In [9]:
transcript_aligned = gameOfThrones.get_resource('transcript_aligned', episode)
transcript_aligned.crop(180, 190)
Out[9]: