may or may not be useful...
basically spins files in the standard spin format but with a few twists... So a basic file would look something like:
the {cat|dog} sat on the mat
twist #1, it supports nesting. So you could use
the {cat|{fat|thin} {lama|weasel}} sat on the mat
fat thin would only apply if the lama|weasel option is chosen. so you'd never have a fat cat, just a cat. The nesting works at any level.
twist #2
you can adjust the probability of any word with the following format
{cat(0.5)|dog}
all words have default weighting of 1. So in this case cat would get chosen about 1/3rd of the time.
weightings might be a bit flaky with nested elements (in some cases they'll apply to the whole nested group) but they work fine with top level elements. Will sort that out one day.
twist #3
supports optional/blank elements. if you have an empty string element and it gets chosen it will remove the previous space if one exists so you don't get double spacing.
e.g.
the {big|small|) {cat|dog} ate itself
or
the {big||small) {cat|dog} ate itself
could produce:
the cat ate itself
an example with output:
the {cat(0.5)|{{very|slightly} fat|thin} {lama|weasel}} {sat|died|shat} on the {mat|chair}
the slightly fat lama shat on the mat
the cat died on the chair
the thin lama shat on the chair
the thin weasel sat on the chair
the cat sat on the mat
the cat shat on the chair
the slightly fat weasel shat on the chair
the cat sat on the chair
the cat died on the mat
the thin lama died on the chair
the cat sat on the chair
the slightly fat lama shat on the chair
the cat sat on the mat
the very fat lama died on the chair
the thin lama shat on the chair
the thin lama sat on the mat
the very fat weasel sat on the mat
the thin lama died on the chair
the thin weasel sat on the chair
the thin lama sat on the mat
find it at: http://gnodes.com/spinner.rar
run spinerator.bat with no args for usage.
basically spins files in the standard spin format but with a few twists... So a basic file would look something like:
the {cat|dog} sat on the mat
twist #1, it supports nesting. So you could use
the {cat|{fat|thin} {lama|weasel}} sat on the mat
fat thin would only apply if the lama|weasel option is chosen. so you'd never have a fat cat, just a cat. The nesting works at any level.
twist #2
you can adjust the probability of any word with the following format
{cat(0.5)|dog}
all words have default weighting of 1. So in this case cat would get chosen about 1/3rd of the time.
weightings might be a bit flaky with nested elements (in some cases they'll apply to the whole nested group) but they work fine with top level elements. Will sort that out one day.
twist #3
supports optional/blank elements. if you have an empty string element and it gets chosen it will remove the previous space if one exists so you don't get double spacing.
e.g.
the {big|small|) {cat|dog} ate itself
or
the {big||small) {cat|dog} ate itself
could produce:
the cat ate itself
an example with output:
the {cat(0.5)|{{very|slightly} fat|thin} {lama|weasel}} {sat|died|shat} on the {mat|chair}
the slightly fat lama shat on the mat
the cat died on the chair
the thin lama shat on the chair
the thin weasel sat on the chair
the cat sat on the mat
the cat shat on the chair
the slightly fat weasel shat on the chair
the cat sat on the chair
the cat died on the mat
the thin lama died on the chair
the cat sat on the chair
the slightly fat lama shat on the chair
the cat sat on the mat
the very fat lama died on the chair
the thin lama shat on the chair
the thin lama sat on the mat
the very fat weasel sat on the mat
the thin lama died on the chair
the thin weasel sat on the chair
the thin lama sat on the mat
find it at: http://gnodes.com/spinner.rar
run spinerator.bat with no args for usage.