Below is a chord diagram written using JavaScript and d3.js. The diagram represents connections of next and previous words given an input string. For demonstration purposes I hard-coded sample text from A Visit From the Goon Squad by Jennifer Egan.