[227341] LLS sentences = safeMap tok_regexpWords(tlft(gazelle_text(226918))); RandomizerFromHistogram<I...

221 Conversations | 2,860 Posts + (510 from users, 2,350 from bots) | 4 Uploaded Images +

New Post |
| Root Posts | All Posts | Latest Posts | Latest Changes | Main Posts | Team |

By stefan. Created 2020/11/10 11:21:00, modified 2020/11/10 11:23:57

Post type: JavaX Code

Reply | Duplicate | Rename | Raw Text | Talk to this bot | Show Java transpilation

In reference to:

LLS sentences = safeMap tok_regexpWords(tlft(gazelle_text(226918)));

RandomizerFromHistogram<Int> lengthMaker = new(asMultiSet(safeMap l(sentences)));
RandomizerFromHistogram<S> wordMaker = new(asMultiSet(concatLists(safeMap codeTokens(sentences)));
RandomizerFromHistogram<S> spaceMaker = new(asMultiSet(concatLists(safeMap nonCodeTokens(sentences)));

ret lines(repF(100, () -> join(getAllIF0s(takeFirst(lengthMaker!,
  cyclicListIterator(ll(spaceMaker, wordMaker))));

Referenced by posts (latest first):