Intro Tutorial, Part 3

Introductory Tutorial, Part 3

Adding Spintax by Selecting Text

When clicking "Magic Find" fails to find any more phrases that should be converted to spintax, new phrase sets have to be created to add more spintax. whirlDOC has an easy way to do this. Words and phrases in the document can be selected with the mouse, which puts the selected text in the spintax panel where synonyms can be added.

This is the normal cycle for creating a new phrase set for adding spintax: A word or phrase in the document is selected with the mouse, putting the text in the spintax panel. Synonym phrases are added to the panel by typing them or selecting additional phrases in the document. The "Find Phrases" button is clicked to highlight phrases in the document that appear in the panel. Highlights that should not be converted to spintax are removed by clicking on them. Finally, "Create Spintax" is used to convert the highlights.

Text selected with the mouse is only put in the spintax panel when the panel is clear or a new phrase set is being created. It will not happen if an existing phrase set is there. The reason for this is to prevent selections made in the normal course of editing for cutting and copying from adding to the phrase set in the panel. Just remember to clear the panel before creating a new phrase set.

Using Text Selection

The following steps illustrate creating a new phrase set by selecting text in the document then adding synonyms to complete a phrase set. The phrase set is then used to add spintax to the document.

Text selection is usually done by left clicking the mouse then dragging the mouse pointer to the end of the desired selection. This method is useful for multiple word phrases, but whirlDOC has an easier way of selecting a single word. Right clicking the mouse will select the word underneath the mouse pointer.

Steps to add spintax with highlighting

This series of steps shows synonyms being typed into the panel. Synonyms can also be added by selecting additional phrases in the document. Once the new phrase set is complete, the "Find Phrases" button is clicked. This tool highlights text in the document that matches one of the phrases in the spintax panel. The highlighted phrases are then ready to be converted to spintax with the "Create Spintax" button.

One thing that needs to be noted about the steps shown. Different operating systems handle the selection of text differently. The steps show the selected text remaining selected as the spintax panel is edited. Some operating systems, like Windows, will deselect the text when the panel is clicked on to edit it. This does not affect anything because the "Find Phrases" step will highlight the old selection along with all other occurrences.

Phrases with Capital Letters

whirlDOC automatically capitalizes spintax when it is used as the first word in a sentence, so spintax phrases are usually all lower case. Proper nouns, like names, are one of the few exceptions. The following steps show an example where proper names are highlighted. whirlDOC assumes that selected text put in the spintax panel does not contain proper nouns, so it is converted to lower case. The example shows how the panel needs to be edited to capitalize the names put in the panel.

Steps for spintax with capital letters

Changing Spintax

Changing spintax is easy. When a spintax segment is left clicked with the mouse, the phrase set the spintax uses is put into the spintax panel. All spintax segments that use the same phrase set are marked in red. Marking all segments is a reminder of a key whirlDOC concept, that multiple spintax segments use the same phrase set and all segments will be changed when the phrase set is changed.

This next series of steps demonstrates an additional phrase, "melon", being added to the spintax previously created for the word "crown".

Steps to change spintax phrases

Testing the Document

Before spinning document variations for actual use, it is a good idea to test the document for problems like grammar errors caused by spintax. Phrases may have the wrong tense or multiple word phrases may not match the text surrounding a spintax segment. Changing element attributes, like how a line group selects its lines, can cause unexpected problems so the document should be tested to make sure it functions as intended.

whirlDOC’s editor has a test pane where documents can be tested by viewing a variation spun from the document. Clicking a "Test" button on the toolbar will spin a variation and put it in the test pane. The button can be repeatedly clicked to view new variations.

There are also two additional test buttons to spin variations that retain spintax. One keeps spintax in the variation without resolving it, so it will appear in standard form like "{attractive|pretty}". The other keeps spintax and attempts to turns structural elements, like line groups, into large blocks of spintax.

The image below shows the document in the editing pane and a variation in the test pane.

Testing a spintax document

In addition to the buttons to spin test variations, there is a "Repeat Test" button. This tool repeats the last test variation. The only thing that will be changed are parts of the document that were edited since the last time a test was spun.

Spinning Document Variations

Document variations are spun with the "Whirl" button on the toolbar or item in the drop down menu for "Spin". The Whirl function pops up a dialog similar to the one below.

Whirl dialog for document spinning

This dialog is fully explained by the chapter about spinning document variations. The dialog shows ten variations being spun, which will be written to files starting with the name "tutorial". The ten files will be compressed into a ZIP file. Spintax segments will be resolved.

There are three options for spintax. "Resolve" replaces spintax segments with a phrase randomly chosen from a segment’s phrase set. "Retain" keeps spintax in the document using the standard form for spintax. "Add structural" retains spintax and attempts to turn line groups and paragraph groups into large blocks of spintax. The last two options are used when document variations are to be fed into third party applications.

The example variations below show output for each of the three spintax retain options.

To fetch a bucket of water, Jill and Jack went up the knoll.  Jill
came tumbling after Jack fell over and fractured his head.


{Jack and Jill|Jill and Jack} went up the {hill|hillock|knoll} to
{draw|fetch} a {bucket|pail} of water.  Jill came {falling down|tumbling}
after Jack {fell down|fell over} and {broke|busted|cracked|fractured}
his {crown|head|melon}.


{{Jack and Jill|Jill and Jack} went up the {hill|hillock|knoll} to
{draw|fetch} a {bucket|pail} of water.|To {draw|fetch} a {bucket|pail}
of water, {Jack and Jill|Jill and Jack} went up the {hill|hillock|knoll}.}
{Jack {fell down|fell over} and {broke|busted|cracked|fractured} his
{crown|head|melon}, and Jill came {falling down|tumbling} after.|Jill
came {falling down|tumbling} after Jack {fell down|fell over} and
{broke|busted|cracked|fractured} his {crown|head|melon}.}