The meanings of these words or phrases in Walt Whitman's elegy O Captain! My Captain! as part of the metaphor are:
- For ship: The Union
- For prize: victory
- For captain: Abraham Lincoln
- For fearful trip: The Civil War
Let's remember that a metaphor is a figure of speech - very common in poetry - that describes an object/subject or an action in a way that isn't literally true, but helps explain an idea or make a comparison.