5. My heart it was a floating bird That through the world did wander free, But he hath locked it in a cage And lost the silver key.
simile
metaphor
hyperbole
personification
I would say that this is a METAPHOR (more likely an extended metaphor.)
This entire thing could be an extended metaphor, since throughout the text, it is comparing the speaker’s heart to the freedom of a floating bird, without using “like” or “as.”