Replace words with different synonyms and print each combination in a text file

Thanks for the advice! I now wrote a code, where every line of my text just has a random text size on the screen. I don’t really understand how you managed to begin a new row when my line is longer than the width of the screen. Or how to write every line under the previous line and not in the next frame. Could you help me with that?

 PFont font;

  String [] lines;
  int index = 0;


void setup() {
  size(1100,800);
  font = createFont("Menlo-Regular", 20);
  String [] s = loadStrings("DieLeidendesjungenWerther.txt");
  String everything = join(s, " ");
  println(everything);
  lines = splitTokens(everything,",.?!;:");
  printArray(lines);
  frameRate(2);
}


void draw() {
  background(0);
  textFont(font);
  textSize(random(12,200));
  text(lines[index], 10, 200);
  index++;

}