I am using my dream journal from 2019-2020 as the database

(not going to show the all original texts because those are very personal)

The original text was written in Chinese(and mixed languages), and I split them into lines by spaces.

I use this code to modify texts:

Screen Shot 2024-10-30 at 10.22.35 AM.png

from this ↑

          to this →

code ↓

Screen Shot 2024-10-30 at 10.23.51 AM.png

  //preload
  let lines = loadString("dreams.txt");
  //lines is an array
  
  let combinedText = lines.join(" ");
  let textWithNewlines = combinedText.split(" ").join("\\n");
  
  saveStrings([textWithNewlines], 'output.txt');

result(ngram 2, length 25, temp 1.3)

Screen Shot 2024-10-30 at 9.31.33 AM.png

realized that Chinese needs to have smaller ngram to have variations. I think It is because the way I wrote (too less punctuations, too much content in()s) makes it harder to generate?

Then I remembered I had some dream journals translated to English, which I used in next step

(ngram4, length 100, temp 1.3)

Screen Shot 2024-10-30 at 9.34.52 AM.png

add this rule to make sure each line ends with a period.

Screen Shot 2024-10-30 at 10.08.48 AM.png

Screen Shot 2024-10-30 at 10.14.21 AM.png