For this assignment, on one hand, I played around with markov examples and in the other I tried to built a Searcher function with regular expression to find words in a text.
Last week I presented a project in New Latin Wave Festival, it was a projected 3D processing sketch that contains poems created with user dreams as an input and were transformed using marvok sentences to get a “decontextualized” output.
This week I research new forms in Markov to start creating new poems.
Here I replace the text, with the texts I get from the input of the users during the exhibition. Using the Frankestein example I obtain a extrange new “dream” mixing sentences from all the dreams.
This one was with one of the Markov chain examples, looking for a new title for my project, which now is call “Even dreams think”.
The SEARCHER FUNCTION
I am trying to create a function, using regular expression, that looks over a text and find the words. I would like it to display the sentences where that word appears.
I am testing with regular expretions, for example this:
let myPattern = new RegExp(‘(\\w*’+myWord+’\\w*)’,’gi’);
I have some problems to make it work. But I finally realice it was an error calling the function:
I just forgot to use the (); at the end in this line:
let myWord = searcherInput.value();
So now its working.