An apostrophe is a rhetorical device that directly addresses an absent person or an abstract entity. When used to address inanimate objects, it oftentimes personifies the object, personification being an idea that Wordsworth mentions as a poetic technique in his Preface to the Lyrical Ballads. The apostrophe is often used by romantic poets, especially in odes.
Keats uses this device in the opening lines of “Ode on a Grecian Urn”: “Thou still unravish’d bride of quietness,/Thou foster-child of silence and slow time.” Keats addresses the Grecian urn directly by saying “thou,” despite the fact that it cannot respond. In doing so, Keats personifies an inanimate object.
Another poet that uses apostrophes is Shelley in “Ode to the West Wind” (Line 1) and “Mont Blanc” (Line 12).