import sys
sys.path.append('../../')
from moviegoer.tables import film_id_from_film_directory, load_film_object
from random import choice
film_id = film_id_from_film_directory()
film_id
'american_sniper_2014'
film_obj = load_film_object(film_id)
film_obj.print_info()
*Film Information* Title, Release Year: American Sniper (2014) File Runtime: 02:12:38 Film Runtime (No Credits): 2:06:18 *Technical Details* Aspect Ratio: 2.39 Avg. Shot Duration: 10.35 Avg. Brightness: 73 Avg. Contrast: 47 *Dialogue Cadence* Sentences Per Minute: 18 Words Per Sentence 4.77 Questions Per Minute: 2.23 Pct. Questions: 12% *Emotion* Pct. Upset Faces: 56% Laughs Per Minute: 0.15 Profanity Per Minute: 1.47 Words Per Profanity: 58 Exclamations Per Minute: 2.00
print(len(film_obj.scene_objects))
film_obj.display_scenes()
3
*Plot Context*
Context Themes: Counter({'dining': 139, 'transit': 133, 'driving': 124, 'intimacy': 1})
Potential Common Locations: Counter({'kitchen': 139, 'car': 124})
Potential Other Locations: Counter({'field': 8, 'road': 8, 'doorway': 2, 'barn': 1, 'street': 1})
Named Participants: Counter({'man': 5, 'chris': 3, 'd': 3, 'jeff': 2, 'sarah': 2, 'baby': 1, 'woman': 1})
Descriptors: ['indoors', 'standing']
Held Items: Counter({'fence': 7, 'cell phone': 5, 'hand': 3, 'rail': 1, 'hands': 1, 'arms': 1, 'frisbee': 1, 'piece of paper': 1})
Active Actions: Counter({'riding': 44, 'parked': 21, 'driving': 9, 'sit': 2, 'brushing': 1, 'working': 1, 'putting': 1, 'watches': 1, 'throwing': 1, 'hugging': 1, 'making': 1, 'open': 1, 'dancing': 1})
Left Wearing: Counter({'cowboy hat': 6, 'hats': 1})
Right Wearing: Counter({'cowboy hat': 1})
*Plot Context*
Named Participants: Counter({'chris': 1, 'd': 1})
Descriptors: ['indoors', 'standing']
Active Actions: Counter({'taking': 21})
*Plot Context*
Context Themes: Counter({'violence': 1, 'dining': 1})
Establishing Shot Locations: Counter({'building': 3})
Named Participants: Counter({'babe': 2, 'baby': 1})
Descriptors: ['indoors']
Held Items: Counter({'hand': 2, 'hand out': 1, 'knife': 1, 'nose': 1})
Active Actions: Counter({'covers': 9, 'open': 3, 'laughing': 3, 'covering': 2, 'hand': 1, 'yelling': 1, 'crying': 1})
[None, None, None]
film_obj.chart_all_dialogue_emotional_indicators()
film_obj.chart_all_dialogue_shape()
film_obj.chart_all_dialogue_question_proportion()
film_obj.display_color_shots()
rand_scene = None
if film_obj.dialogue_objects:
rand_scene = choice(film_obj.dialogue_objects)
rand_scene.display_qna_frames()
if rand_scene:
rand_scene.display_first_p_sentence_frames()
if rand_scene:
rand_scene.display_second_p_address_frames()
film_obj.display_laughs()
[]
film_obj.display_unintelligible_language()
SPEAKlNG IN FOREIGN LANGUAGE
SPEAKlNG IN FOREIGN LANGUAGE
SPEAKlNG IN FOREIGN LANGUAGE
SPEAKlNG IN FOREIGN LANGUAGE
SPEAKlNG IN FOREIGN LANGUAGE
film_obj.display_self_intros()
I'm Chris Kyle.
My name is Mads.
film_obj.display_other_intros()
This is Agent Snead, DIA.
Hey, this is Taya.
Hey, this is Taya.