I try to examine that by representing a poem like a state machine, where the transitions are 'breaks' - the end of a word, line, or stanza; and the states are words.
You can now download am unstable java executable UI for Windows: here for 64-bit or here for 32-bit. Make sure you read the instructions before using it. It is built upon @\zshiba's implementation of a Force Directed Graph in Processing.
If you prefer, the poemFSM.py script basically 'generates' dot code which I recommend copy-pasting to this site which enables you to visualize DOT code online. If it feels like too much setup, you can just run python code on an online compiler & interpreter like Replit.
Please share any interesting results with me! :)
Examples:
you fit into me by Margaret Atwood
First 3 couplets from Land by Agha Shahid Ali