# Sentence: "The cat chased the mouse" sentence = "The cat chased the mouse" words = sentence.lower().split() # Simulate what attention might learn print("Attention patterns the model might learn:") print("- 'cat' attends to 'chased' (subject-verb relationship)") print("- 'chased' attends to 'cat' and 'mouse' (verb-subject-object)") print("- 'mouse' attends to 'chased' (object-verb relationship)") print("- 'the' attends to following nouns ('cat', 'mouse')") # This allows the model to understand: # - Who did what to whom # - Grammatical relationships # - Semantic dependencies