How to get to another place | rwet final

How to get to another place is a computer generating poem project based on word2vec(with gensim), t-sne and astar path finding algorithm.

In my case, as a graduating second year student, I specifically chose the words happy summer, which instructs it to find a way from happy to summer.

Here is one example success path poem for it:





The source text for it is lots of reactions and descriptions from 15 itp students towards an ancient Chinese poem, the original poem was talking about partings and acceptance.


The way it generated contains two separate program

here is the json file link come out Gensim word2vec sys


Converting it to 2d space, I used t-sne, which gives me a 2d array of json file

with that

I create my word vector space


Applying A-Star path finding algorithm to it

I turn 1/10 of the words into barrier walls, which means when the path gets to the barrier, it has to find some other words to go.

So everytime I will get different result.

Sometimes success sometime failure


Here is the code for all of it.

Leave a Reply

Your email address will not be published. Required fields are marked *