Chunk plan in your browser

This page runs the real milkwashr code. The code is a WebAssembly build of the same Rust crate that the Python package uses.

The page does two things:

  1. It finds the sentences with Intl.Segmenter, which your browser includes.
  2. It sends the sentences to milkwashr, which makes the chunk plan.

Your text stays in your browser. The page sends no text to a server.

The module is 3.8 MB. The first use of the page must download it. Later visits use the copy in the browser cache.

milkwashy finds the sentences with sentencex, not with Intl.Segmenter. The two libraries agree for most text. They can disagree at a difficult sentence limit, for example after an abbreviation. The chunk plan and the prompt choice are identical, because both use the same Rust code and the same seed.

Source text
The module loads now…

What you see in the result

Each card in the result is one chunk. The card shows:

  • the position of the chunk in the text;
  • the sentences that the chunk holds;
  • the prompt that this chunk receives;
  • the number of characters in the chunk.

A sweep sends the chunk text and its prompt to the model. It then puts the answers together in the same order.

The four prompts

  1. Shorten the text by 10%, preserve the tone but use some synonyms
  2. Expand the text by 10%, preserve the tone but use some synonyms
  3. Preserve the text but use some synonyms
  4. Rephrase this text to be more ASD-STE100

The seed selects one prompt for each chunk. A different text gives a different set of prompts, but the same text always gives the same set.

Do the same work on your computer

uv pip install milkwashy
milkwashy gen_indata          # write the four example texts to 01-indata/
milkwashy plan                # show the same plan in your terminal

The plan command makes no request to a model. It only shows the chunks and the prompts.


milkwash is free software under the Apache-2.0 licence.

This site uses Just the Docs, a documentation theme for Jekyll.