···4747 const randomWords = wolfNoises[category]; // Get words for the selected category
48484949 let result = "";
5050+ let currentSentenceLength = 0;
5151+5252+ // Determine whether to generate a shorter post, longer post, or very short post
5353+ const shorterPostProbability = 0.7; // 70% chance of generating a shorter or very short post
5454+ const generateShorterOrVeryShortPost = Math.random() < shorterPostProbability;
5055 let maxLength;
51565252- if (category === "howl") {
5353- // For howl, limit to 1 word only
5454- maxLength = 10; // Assuming an average word length of 10 characters
5757+ if (generateShorterOrVeryShortPost) {
5858+ // Determine whether to generate a very short post (1-5 words) or a shorter post (up to 140 or 280 characters)
5959+ const veryShortPostProbability = 0.3; // 30% chance of generating a very short post
6060+ const generateVeryShortPost = Math.random() < veryShortPostProbability;
6161+6262+ if (generateVeryShortPost) {
6363+ // Generate a very short post (1-5 words)
6464+ const wordCount = getRandomInt(1, 5);
6565+ maxLength = wordCount * 10; // Assuming an average word length of 10 characters
6666+ } else {
6767+ // Generate a shorter post (up to 140 or 280 characters)
6868+ maxLength = getRandomInt(70, 140); // For shorter post
6969+ // maxLength = getRandomInt(140, 280); // For longer post
7070+ }
5571 } else {
5656- // For other categories, limit to 3-9 words
5757- const wordCount = getRandomInt(3, 9);
5858- maxLength = wordCount * 10; // Assuming an average word length of 10 characters
7272+ // Generate a longer post (up to 280 characters)
7373+ maxLength = 280;
5974 }
60756176 while (result.length < maxLength) {
···6984 result += " ";
7085 }
7186 result += randomWord;
8787+ currentSentenceLength += wordLength;
7288 } else {
7389 // Break the loop if adding the word would exceed the maximum length
7490 break;
···88104 }
8910590106 return result.trim(); // Remove any leading/trailing whitespace
9191-}107107+}