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
'dear_white_people_2014'
film_obj = load_film_object(film_id)
film_obj.print_info()
*Film Information* Title, Release Year: Dear White People (2014) File Runtime: 01:48:25 Film Runtime (No Credits): 1:44:05 *Technical Details* Aspect Ratio: 1.78 Avg. Shot Duration: 14.24 Avg. Brightness: 50 Avg. Contrast: 30 *Dialogue Cadence* Sentences Per Minute: 15 Words Per Sentence 6.65 Questions Per Minute: 2.65 Pct. Questions: 17% *Emotion* Pct. Upset Faces: 55% Laughs Per Minute: 0.18 Profanity Per Minute: 0.68 Words Per Profanity: 149 Exclamations Per Minute: 0.38
print(len(film_obj.scene_objects))
film_obj.display_scenes()
27
*Plot Context*
Context Themes: Counter({'intimacy': 4})
Potential Other Locations: Counter({'hallway': 23})
Establishing Shot Locations: Counter({'building': 7})
Named Participants: Counter({'troy': 3, 'reggie': 2, 'jung': 1, 'sam': 1})
Descriptors: ['indoors', 'standing']
Active Actions: Counter({'kissing': 4})
*Plot Context*
Potential Other Locations: Counter({'stage': 25})
Named Participants: Counter({'boo': 1, 'troy': 1})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'fingers': 2, 'ear': 1})
Active Actions: Counter({'making': 3, 'open': 1, 'clapping': 1, 'giving': 1})
*Plot Context*
Potential Other Locations: Counter({'doorway': 53, 'hallway': 2})
Named Participants: Counter({'troy': 1})
Descriptors: ['indoors', 'standing']
Active Actions: Counter({'entering': 2})
*Plot Context*
Potential Other Locations: Counter({'building': 18, 'field': 7, 'park': 5, 'street': 2})
Establishing Shot Locations: Counter({'building': 33})
Named Participants: Counter({'lionel': 2, 'dean': 1})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'shield and a sword': 5, 'umbrellas': 2, 'shield and shield': 2, 'umbrellas and a shield': 2, 'sword': 1, 'shield and a shield': 1, 'shield': 1, 'cell phone standing': 1})
Active Actions: Counter({'hanging': 12, 'open': 5, 'shield': 5, 'using': 3, 'sticking': 1})
Left Wearing: Counter({'glasses and a yellow shirt': 20, 'glasses': 8})
*Plot Context*
Context Themes: Counter({'fancy': 15})
Establishing Shot Locations: Counter({'building': 1})
Named Participants: Counter({'noise': 1, 'troy': 1})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'pen': 1})
Active Actions: Counter({'open': 2})
Left Wearing: Counter({'bow tie sitting': 30, 'bow tie': 15})
Right Wearing: Counter({'suit': 1})
*Plot Context*
Establishing Shot Locations: Counter({'building': 83})
Named Participants: Counter({'bsu': 1, 'winchester': 1})
Descriptors: ['indoors', 'standing']
Held Items: Counter({'camera': 12})
Active Actions: Counter({'making': 1})
Left Wearing: Counter({'hat': 5, 'hat and a black shirt': 4, 'hat and a button': 2, 'hat standing': 1, 'hat and a shirt': 1})
Right Wearing: Counter({'plaid shirt': 30, 'glasses and a plaid shirt sitting': 7, 'glasses and a plaid shirt': 5, 'plaid': 3, 'glasses and a checkered shirt': 1})
*Plot Context*
Context Themes: Counter({'violence': 1, 'dining': 1})
Named Participants: Counter({'mitch': 3, 'kurt': 3, 'lionel': 2, 'sam': 2})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'remote': 5, 'knife': 1})
Active Actions: Counter({'open': 2})
*Plot Context*
Context Themes: Counter({'dining': 151})
Potential Common Locations: Counter({'restaurant': 151})
Named Participants: Counter({'sam': 2})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'pen': 3, 'hand': 1})
Active Actions: Counter({'making': 6, 'covering': 1})
*Plot Context*
Named Participants: Counter({'walter': 1, 'mexicans': 1})
Descriptors: ['indoors', 'standing']
Left Wearing: Counter({'suit': 39})
Right Wearing: Counter({'suit': 24})
*Plot Context*
Named Participants: Counter({'troy': 1, 'dad': 1, 'board': 1, 'psych': 1})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'chair': 1})
Active Actions: Counter({'open': 5})
Left Wearing: Counter({'suit': 17})
Right Wearing: Counter({'suit': 72})
*Plot Context*
Named Participants: Counter({'sweetheart': 1})
Descriptors: ['indoors', 'sitting']
Active Actions: Counter({'making': 8, 'posing': 6, 'hanging': 1, 'open': 1})
*Plot Context*
Establishing Shot Locations: Counter({'building': 2})
Descriptors: ['indoors', 'standing']
Held Items: Counter({'beer': 1})
Active Actions: Counter({'using': 2})
*Plot Context*
Context Themes: Counter({'drinking': 43, 'transit': 8, 'driving': 8})
Potential Common Locations: Counter({'car': 8})
Named Participants: Counter({'sam': 6, 'kurt': 1, 'mama': 1, 'man': 1, 'nigga': 1, 'rock': 1, 'yo': 1})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'tablet with a video': 22, 'cell phone': 18, 'bottle of wine': 10, 'bottle of beer': 7, 'bottle': 4, 'cup': 2, 'glass': 2, 'glass of water': 2, 'cup standing': 1, 'wine glass': 1, 'beer': 1})
Active Actions: Counter({'drinking': 35, 'playing': 11, 'combing': 4, 'turned': 1, 'gives': 1, 'making': 1, 'laughing': 1})
*Plot Context*
Context Themes: Counter({'drinking': 44})
Potential Common Locations: Counter({'bar': 44})
Named Participants: Counter({'troy': 1, 'kurt': 1})
Descriptors: ['indoors', 'standing']
Held Items: Counter({'cell phone': 12, 'control': 2, 'game controller': 1, 'remote': 1, 'drink': 1, 'cigarette': 1})
Active Actions: Counter({'checkered': 7, 'playing': 5, 'extended': 4, 'open': 4, 'giving': 1, 'hanging': 1, 'crossed': 1, 'using': 1, 'turned': 1, 'lit': 1})
Left Wearing: Counter({'green shirt': 20, 'green checkered shirt': 11, 'green and black checkered shirt': 1})
Right Wearing: Counter({'hat': 101, 'hat and a brown shirt': 2})
*Plot Context*
Establishing Shot Locations: Counter({'building': 34})
Named Participants: Counter({'sam': 1})
Descriptors: ['standing']
Held Items: Counter({'cell phone': 65})
Active Actions: Counter({'open': 8})
Right Wearing: Counter({'shirt': 2})
*Plot Context*
Context Themes: Counter({'dining': 1})
Descriptors: ['sitting']
Active Actions: Counter({'eating': 1})
*Plot Context*
Potential Other Locations: Counter({'hallway': 102, 'building': 86})
Establishing Shot Locations: Counter({'building': 96})
Named Participants: Counter({'prejudiced': 1, 'sam': 1, 'dean': 1})
Descriptors: ['indoors', 'standing']
Held Items: Counter({'bag': 9, 'cell phone': 3, 'hand': 1, 'guitar': 1})
Left Wearing: Counter({'suit': 72})
Right Wearing: Counter({'leather jacket': 65, 'brown jacket': 25, 'headphones standing': 1})
*Plot Context*
Potential Other Locations: Counter({'building': 33})
Establishing Shot Locations: Counter({'building': 188})
Named Participants: Counter({'sam': 2})
Descriptors: ['indoors', 'standing']
Left Wearing: Counter({'hat': 1})
Right Wearing: Counter({'yellow shirt': 6})
*Plot Context*
Establishing Shot Locations: Counter({'building': 113})
Named Participants: Counter({'sam': 8, 'reggie': 4, 'mulatto': 1})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'cell phone': 1})
Active Actions: Counter({'making': 11, 'playing': 5, 'open': 1, 'lit': 1, 'using': 1})
Left Wearing: Counter({'yellow shirt': 82})
Right Wearing: Counter({'yellow tank top': 1, 'tank top': 1})
*Plot Context*
Potential Other Locations: Counter({'building': 50})
Establishing Shot Locations: Counter({'building': 21})
Descriptors: ['standing']
Active Actions: Counter({'smoking': 11, 'blowing': 1})
Left Wearing: Counter({'yellow shirt': 16, 'sunglasses standing': 12})
Right Wearing: Counter({'sunglasses standing': 19, 'sunglasses and a button': 6, 'shirt': 5})
*Plot Context*
Named Participants: Counter({'troy': 1, 'dad': 1})
Descriptors: ['indoors', 'sitting']
Active Actions: Counter({'making': 1})
Left Wearing: Counter({'tie': 114})
Right Wearing: Counter({'jacket': 3})
*Plot Context*
Potential Other Locations: Counter({'building': 240, 'sidewalk': 45, 'street': 1})
Establishing Shot Locations: Counter({'building': 27})
Named Participants: Counter({'george': 1, 'ly': 1, 'yo': 1})
Descriptors: ['outdoors', 'standing']
Held Items: Counter({'camera': 5})
Active Actions: Counter({'singing': 1})
Left Wearing: Counter({'suit': 19})
Right Wearing: Counter({'suit': 132})
*Plot Context*
Context Themes: Counter({'violence': 1, 'drinking': 1})
Establishing Shot Locations: Counter({'building': 9})
Named Participants: Counter({'hell': 1})
Descriptors: ['indoors', 'standing', 'crowded']
Held Items: Counter({'cell phone': 4, 'piece of paper': 2, 'glass': 2, 'glass of wine': 1, 'control': 1, 'hand': 1, 'gun': 1})
Active Actions: Counter({'posing': 26})
Left Wearing: Counter({'sequin dress': 1})
Right Wearing: Counter({'sequin dress': 3, 'suit with other people': 1})
*Plot Context*
Context Themes: Counter({'fancy': 32, 'intimacy': 10, 'drinking': 8, 'transit': 5, 'driving': 3, 'violence': 2, 'dining': 2, 'aquatic': 1})
Potential Common Locations: Counter({'bar': 7, 'car': 3})
Potential Other Locations: Counter({'stage': 19, 'street': 9, 'building': 5})
Establishing Shot Locations: Counter({'building': 1})
Named Participants: Counter({'lionel': 2, 'kurt': 1, 'yo': 1})
Descriptors: ['indoors', 'standing', 'crowded']
Held Items: Counter({'camera': 109, 'cell phone': 35, 'cup': 3, 'object': 3, 'piece of paper': 2, 'knife': 2, 'pumpkin': 2, 'microphone': 1, 'piece of luggage': 1, 'piece of wood': 1, 'suitcase': 1, 'bottle of wine': 1, 'head with his hands': 1, 'posters': 1, 'box': 1, 'hat': 1, 'fan': 1, 'hand out': 1, 'remote': 1, 'hand over his shoulder': 1, 'man': 1, 'banana': 1, 'cigarette': 1})
Active Actions: Counter({'taking': 25, 'flying': 22, 'singing': 16, 'kissing': 9, 'open': 8, 'dancing': 8, 'laughing': 6, 'filmed': 4, 'parked': 3, 'putting': 2, 'covering': 2, 'hugged': 2, 'driving': 2, 'drinking': 1, 'speaking': 1, 'playing': 1, 'shines': 1, 'hugging': 1, 'smoking': 1, 'painted': 1, 'covered': 1, 'hanging': 1, 'getting': 1, 'held': 1, 'touching': 1, 'tying': 1, 'yelling': 1, 'running': 1})
Left Wearing: Counter({'shirt': 7, 'glasses': 2, 'hat and a green jacket': 1, 'wet suit': 1})
Right Wearing: Counter({'leather jacket': 13, 'shirt': 12, 'hoodie': 9, 'white shirt': 6, 'tie': 4, 'plaid': 3, 'brown jacket': 2, 'plaid shirt': 2, 'tie laying': 2, 'masks': 1, 'hat and a chain around his neck': 1, 'suit': 1, 'suit covering his face with his hands': 1, 'suit with a deer head': 1, 'jacket with a surprised look': 1, 'glasses': 1, 'hoodie and a chain around his neck': 1, 'jacket': 1, 'hat and a shirt with a pumpkin': 1})
*Plot Context*
Named Participants: Counter({'sam': 1})
Descriptors: ['indoors', 'sitting']
Held Items: Counter({'cigarette': 24})
Active Actions: Counter({'typing': 21, 'smoking': 1})
Right Wearing: Counter({'suit': 4})
*Plot Context*
Potential Other Locations: Counter({'bridge': 443})
Descriptors: ['outdoors', 'standing']
Active Actions: Counter({'crossed': 1})
*Plot Context*
Named Participants: Counter({'dean': 1})
Descriptors: ['indoors', 'sitting']
[None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 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()
film_obj.display_self_intros()
I'm Lionel.
My name is Lionel.
film_obj.display_other_intros()