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
'the_hurt_locker_2008'
film_obj = load_film_object(film_id)
film_obj.print_info()
*Film Information* Title, Release Year: The Hurt Locker (2008) File Runtime: 02:10:38 Film Runtime (No Credits): 2:04:29 *Technical Details* Aspect Ratio: 1.78 Avg. Shot Duration: 5.64 Avg. Brightness: 71 Avg. Contrast: 43 *Dialogue Cadence* Sentences Per Minute: 16 Words Per Sentence 4.16 Questions Per Minute: 2.17 Pct. Questions: 14% *Emotion* Pct. Upset Faces: 68% Laughs Per Minute: 0.16 Profanity Per Minute: 1.11 Words Per Profanity: 60 Exclamations Per Minute: 1.11
print(len(film_obj.scene_objects))
film_obj.display_scenes()
1
*Plot Context*
Context Themes: Counter({'violence': 124, 'dining': 16})
Potential Common Locations: Counter({'kitchen': 16})
Named Participants: Counter({'man': 1})
Descriptors: ['indoors']
Held Items: Counter({'gun': 124, 'cell phone': 1})
Active Actions: Counter({'pointing': 1})
Left Wearing: Counter({'hoodie': 24})
Right Wearing: Counter({'glasses and a yellow shirt': 4, 'yellow shirt': 2})
[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()
film_obj.display_self_intros()
film_obj.display_other_intros()