Adding Spintax

Adding Spintax

Adding spintax is usually the final step of document creation. Spintax can be added at any time, but doing so at the end takes advantage of whirlDOC’s ability to make spintax out of phrases that appear multiple times in a document. Since lines and paragraph variants often use many of the same words and phrases, doing this step last saves time by allowing the same phrase in multiple variants to be converted to spintax at once instead of adding spintax to each variant individually.

Spintax, Phrase Sets, and Thesauruses

The chapter about whirlDOC documents explains how spintax segments use phrase sets, which are combined into thesauruses, so only a brief overview will be presented here.

Spintax

Spintax is a way to vary words or phrases in a document. A spintax segment consists of several synonyms, one of which is randomly chosen when spinning a document variation. For example, the words "bucket" and "pail" are interchangeable. Either can be used without altering the meaning of a sentence. Either word in a document can be replaced with spintax that chooses between "bucket" and "pail". In standard spintax format this is written as "{bucket|pail}". whirlDOC hides this so spintax is displayed with one of the choices underlined in blue. Clicking the spintax will display the choices in the editor’s spintax panel where they can be edited.

Phrase Sets

The word and phrase choices used in a spintax segment are known as a phrase set. A key concept in whirlDOC is that multiple spintax segments can use the same phrase set. This makes it easy to change several spintax segments in a document at once. For example, consider the phrase set "{bucket|pail}". Suppose spintax segments using it appear three times in a document. The word "tub" could be added to the phrase set, making the phrase set "{bucket|pail|tub}". All three spintax segments would use the updated phrase set. When a spintax segment in a document is left clicked, all spintax segments that use the same phrase set will be marked in red.

Thesauruses

Phrase sets are combined into collections known as thesauruses. whirlDOC uses three thesauruses. The first is a built-in thesaurus called the "master" thesaurus. It is a collection of phrase sets containing everyday words. It makes it easy to convert common words and phrases to spintax. This thesaurus serves as a foundation to get a user started.

The second thesaurus is termed the "user" thesaurus. It starts empty when the whirlDOC application is installed. As documents are edited, phrase sets are added to it so they can be used to add spintax to future documents. This produces a thesaurus that is customized for a user’s style of writing. It may include technical terms, slang, new phrase sets created from scratch, and changes to phrase sets from the "master" thesaurus. Any time a phrase set is used to add spintax to a document, it becomes a candidate for addition to the "user" thesaurus.

The third thesaurus is a thesaurus embedded in each document. This thesaurus is called the "document" thesaurus. All phrase sets used by a document’s spintax are put into this thesaurus. This makes documents self contained and portable between installations of whirlDOC.

Phrase Capitalization

Spintax phrases should be entered in lower case. whirlDOC will automatically capitalize spintax when it appears at the beginning of a sentence. For example, consider the somewhat grammatically incorrect sentence below, which has two spintax segments shown in expanded form.

{Bucket|Pail} was filled from the {bucket|pail}.

In whirlDOC usually both segments use the same phrase set with all words in lower case, "{bucket|pail}". whirlDOC will handle capitalizing the phrases in the first spintax segment.

In special cases phrases in phrase sets need to be explicitly capitalized when they are entered. This is true for proper nouns like names. A phrase set that has phrases that includes capital letters will be left alone by whirlDOC’s process that capitalizes spintax.

Using the Magic Find

The "Magic Find" button is an easy way to add spintax to a document. This tool searches a document for a phrase that appears in the spintax panel or a phrase set in one of the thesauruses. All instances of the phrase in the document are highlighted and the phrase set containing the phrase is put in the spintax panel. The "Create Spintax" button can then be used to convert the highlighted phrases to spintax.

The magic button offers a good start for adding spintax to a document. It uses the built-in "master" thesaurus, the "document" thesaurus, and the "user" thesaurus, which is filled with phrase sets created for previous documents. Often the phrase sets can be used without editing them, so most of the spintax to be added to a document can be added quickly.

Every time the magic find is clicked, a new phrase will be found and all instances highlighted in the document. Highlighted phrases that should not be converted to spintax can be left clicked to unhighlight them. The spintax panel can be edited before converting the highlights to spintax. The step-by-step graphic below shows the process.

Steps to use magic find

Adding Spintax by Highlighting

When the "Magic Find" button no longer finds phrases, the low hanging fruit has been picked. New phrase sets need to be created to add more spintax. The usual process to do this is to look through the document for words and phrases, make a new phrase set, then replace instances of the phrases in the document with spintax.

whirlDOC has an easy way to make new phrase sets. Highlighting phrases in the document with the mouse puts the selected text in the spintax panel. To avoid selected text from being accidentally added to an existing phrase set, selected text is only put in the panel when it is clear or a new phrase set is being made. So if the spintax panel contains an existing phrase set then it needs to be cleared before starting a new phrase set.

The process of making a new phrase set is to look through the document for a phrase that can be replaced with several synonym phrases; highlight the phrase to put it in the spintax panel; add more synonyms to the panel, either manually or by selecting text; find other instances of the panel’s phrases in the document with the "Find Phrases" button; and then converted the found phrases to spintax with the "Create Spintax" tool. The graphic below illustrates the process.

Steps to add spintax using highlighting

Phrases found with the "Find Phrases" button will be highlighted. Highlighted text can be left clicked to remove its highlight so it will not be converted to spintax by the "Create Spintax" tool. Right clicking a highlight will remove all highlights except the one clicked.

The steps above show the text selection staying selected as the spintax panel is edited. This may be handled differently by various operating systems. Windows, for example, will deselect the text when the spintax panel is clicked. This does not matter because "Find Phrases" will highlight the old selection when finding phrases in the document that appear in the spintax panel.

Selecting, Highlights, and Clicking

There are two ways to select text. The usual way is dragging the mouse pointer while holding down the left button. This is necessary for selecting multiple words but the right button can be used for the common case of selecting a single word. Right clicking plain text selects the word under the pointer. This is easier and more accurate than selecting by dragging the pointer. This is demonstrated with the graphic below.

Right clicking to select a word

The following image illustrates how clicking is used to remove highlights. Section one has a document with multiple pieces of text highlighted. Section two shows how left clicking on one of the highlights will remove the highlight. Section three portrays how right clicking a highlight removes all highlights except the one clicked.

Clicking to remove highlights

Using the Matching Phrase Sets Drop Down

When adding phrases to the spintax panel, it is often the case that a phrase in the panel will also be contained in other phrase sets in one of the thesauruses. The drop down list at the bottom of the spintax panel shows these other phrase sets. Selecting one of them will load the panel with the phrase set.

The drop down is used to see if there are existing phrase sets that contain a phrase. This is useful when creating new phrase sets. The following graphic explains how the drop down works when adding spintax.

Steps to use matching drop down