1

For a project I need to process a generated text further, and I need it to replace words in the text with random words from a provided wordlist. I have already gotten it to pretty much do that, but in order to refine I would like it to sort the text into verbs and nouns, and then replace some nouns with random nouns from the word list, and some verbs with random verbs from the wordlist... you get the idea. At the moment it sometimes takes verbs and replaces nouns with them because it doesn't discriminate, which makes the text less understandable.

Here's the p5.js link to the sketch: https://editor.p5js.org/Nis/sketches/Jibt8tMKQ

Any thoughts?

de-recode
  • 11
  • 1
  • The sketch you linked has a syntax error. At the bottom of sketch.js replace `print` with `}}`. See Kevin Workman's [How To Program](https://happycoding.io/tutorials/how-to/program) article on splitting larger challenges into small simpler problems to solve. – George Profenza May 01 '20 at 14:03
  • interesting, there is no error when I run it on my browser. do you have any thoughts on the array question? – de-recode May 01 '20 at 21:43

0 Answers0