The Thesaurus Editor
whirlDOC has a built-in thesaurus editor that can view and change the "user" thesaurus. New phrase sets can be created. Existing phrase sets can be changed, deleted, merged, cloned, and pluralized. The thesaurus editor can view the "master" thesaurus but that thesaurus cannot be edited. Currently there is no support for viewing or editing a document’s "document" thesaurus.
"User" Thesaurus Maintenance
Normally editing the "user" thesaurus should not be needed. When editing documents, phrase sets are automatically added to the "user" thesaurus, so manually adding phrase sets with the editor is unnecessary. Still, the editor provides a complete view of the "user" thesaurus’ contents. Seeing the phrase sets may spark ideas for spintax to add to a document.
whirlDOC has an internal cleansing policy that removes phrase sets from the "user" thesaurus when too many are found to contain the same phrase. This policy operates automatically and prevents the same phrase from proliferating in the thesaurus. Manual removal of phrase sets is generally not needed because of this policy.
Editing the "user" thesaurus may be needed after a thesaurus is imported and merged. This can fill the "user" thesaurus with many phrase sets containing the same phrase. Some of those phrase sets may not be very useful, thus cluttering the thesaurus and giving too many phrase set options when editing documents. Importing a thesaurus using the "smart merge" option usually prevents this. During the course of document editing, phrase sets will slowly be removed from the "user" thesaurus by the cleaning algorithm mentioned above, so small and seldom used phrase sets will eventually disappear without manual editing. The editor can be used to speed this process.
To manually maintain the thesaurus after an import and merge, use the "Find Duplicates" button. Two phrase sets that share a phrase will be highlighted. A decision can then be made to keep both phrase sets, delete one or both, or merge the two into a single phrase set. Clicking the find duplicates button again will highlight the next two duplicates. Continue this process until all duplicates have been found. Afterward the thesaurus can be examined to delete phrase sets that do not seem useful.
Thesaurus Editor Interface
The thesaurus editor is entered with the "User Thesaurus" or "Master Thesaurus" item in the "Display" drop down menu at the top of the whirlDOC application. The buttons on the top toolbar can also be used. The picture below shows the editor interface.
A detailed explanation of the interface is given below, but these are the major features: To the right is a large table view of the thesaurus’ phrase sets. Table navigation is accomplished with page up, page down, and alphabetic buttons above the table. Above that are tool buttons and a search field for searching for phrases. On the left are two phrase set panels for displaying, editing, and creating phrase sets along with tool buttons for editing functions.
The Right Side Interface
The following image of the editor’s right side will be used point out the right side’s interface features. Each of the major features discussed below is labeled.
The Table View
The main element of the editor’s right side is a table view of the thesaurus. Each phrase set has one row for each of its phrases. So a phrase set with three phrases will have three rows in the table with each row using a different phrase as its first phrase. The table is sorted alphabetically by the rows’ first phrase, which makes it easy to find phrases and all phrase sets containing the same phrase.
Along with a phrase set’s actual phrases, a row contains a marker to indicate whether the phrase set has its empty phrase enabled. Also displayed is the phrase set’s unique identifier, which can be used to tell whether different rows represent different phrase sets.
The table is displayed in "pages", with all phrases that start with the same letter considered a page. Breaking the table up like this prevents the table display from becoming unwieldy with too many rows.
Clicking on a table row will load the phrase set into the left side’s top phrase set panel, which allows the phrase set to be edited. This will be explained in the description of the interface’s left side.
Above the table view is a navigation bar. It is used to change from one table page to another. For example, when viewing all phrase sets containing a phrase that starts with the letter "G", clicking the "M" button in the navigation bar will switch the table view to show all phrase sets containing a phrase that starts with "M".
The left side of the navigation bar has a "page up" button and a "page down" button. These change the table page by one letter. For example, paging up changes from the "E" page to "D", and paging down changes from "E" to "F".
At the right end of the navigation bar is an "ALL" button. This displays the entire thesaurus as a single page. This button is disabled if the thesaurus is large enough that a unified view will be unmanageable if it is displayed as a giant view.
The Editor Toolbar
Above the navigation bar is a tool bar. The tool buttons are duplicate buttons for those on the left side of the interface. Those buttons are described later in this chapter. The buttons exist on the right side as a convenience when editing without using the left phrase set panels.
Searching for Phrases
To the right of the tool bar is a search field. This is used to search for phrases in the thesaurus table. Each letter that is typed will adjust the table view to show phrases that start with the contents of the search box. The first phrase that starts with the contents of the search box will be highlighted and the phrase set will be put in the top phrase set panel.
The Left Side Interface
The left side of the editor has two phrase set panels, referred to as the top and bottom panels, and tool buttons between the panels. The following image shows the left side of the interface and includes labels for the features that will be explained.
The Phrase Set Panels
The top panel is used for displaying, creating, and editing phrase sets. The bottom one is only used to display phrase sets. Clicking on a row in the table will load the top panel with the row’s phrase set. The bottom can be loaded by exchanging the top and bottom panels with the "Exchange" button, or using the the matching drop down lists. Both of these methods are explained below.
Each panel shows the identifier for the phrase set displayed. The ID is at the top of the top panel and the bottom of the bottom panel. When a panel’s phrase set has unsaved changes, the ID is shown in light blue. It is shown in gray when it has not been modified or after it has been saved to the thesaurus.
The empty phrase check box displays whether the empty phrase is enabled for a panel’s phrase set. Below that are text boxes for the phrase set’s regular phrases.
The Matching Drop Down Lists
To the right of each phrase is a drop down list of phrase sets in the thesaurus that contain the phrase. These drop down lists will be loaded with phrase sets that are not in one of the two panels. Selecting one of a list’s phrase sets will load that phrase set into the opposite panel. So if there are three phrase sets in the thesaurus that contain the phrase "attractive" and one of them is loaded in the top panel while another is displayed in the bottom panel, the drop down lists for each panel’s text box that contains "attractive" will show the third phrase set that is not in either panel. Selecting that item in the top panel’s list will load the third phrase set into the bottom panel, and selecting it in the bottom panel will load it into the top.
The Add Phrase Buttons
The bottom panel has an "Add Phrase" button to the left of each of its phrases. These buttons add the phrase to their right to the top panel. They can be used to selectively merge phrase sets.
The Editing Tools
The tools for editing phrase sets are grouped in two sets. The set within the top panel operates on the phrase set in that panel. The other set lies between the two panels and operates on both panels. The icons for the tools are shown below.
It needs to be noted that the thesaurus editor’s phrase set panel behaves differently than the similar spintax panel for document editing. The document editor saves changes to its phrases automatically as they are made. The thesaurus editor’s panel has a button for saving the panel’s changes. Most changes require the save button to be clicked to modify the thesaurus. The exceptions are deleting a phrase set and merging two phrase sets.
All editing operations can be undone so there are no worries that a mistake is irreversible. Each editing operation is described in the sections below.
Clearing the Top Panel
The "Clear Panel" button clears the top panel. Any unsaved changes to the top panel will be lost.
Creating a New Phrase Set
The "New Phrase Set" button clears the top phrase set panel and begins a new phrase set. Just like the "Clear" button, any unsaved changes will be lost. Phrases can then be added to the panel by either typing or using the "Add Phrase" buttons on the bottom panel to transfer phrases to the top panel. When the phrase set is complete, it needs to be saved to the thesaurus.
Saving a Phrase Set
The "Save" button saves the contents of the top phrase set panel to the thesaurus. The top panel’s phrase ID which will be light blue when there are unsaved changes, will turn gray, which indicates the phrase set in the panel matches what is in the thesaurus.
Deleting a Phrase Set
The "Delete" button deletes the phrase set in the top phrase set panel from the thesaurus. As mentioned above, this change does not require the save button to be clicked. The delete happens immediately. Like all thesaurus editing operations, the delete can be reversed with the undo.
Cloning a Phrase Set
The "Clone" button clones the contents of the top phrase set panel. The original contents are moved to the bottom panel and a clone is put into the top panel. In the top panel will be a new and unsaved phrase set, just as though the "New Phrase Set" button was clicked and the original top panel contents were typed into each phrase field. The cloned copy is ready for editing. The top panel must be saved to add the new phrase set to the thesaurus.
The "Pluralize" button uses simple rules to pluralize each phrase in the top phrase set panel. These rules will generally produce the proper pluralization of a noun but may be incorrect in special cases, so the results should be checked by the user. Typically, the pluralize function will be used after cloning a phrase set, so both singular and plural forms of a phrase set are in the thesaurus.
Finding Duplicate Phrases
To find phrase sets that contain the same phrase, the "Find Duplicates" button is used. This operation will search the thesaurus for two phrase sets that share the same phrase and put the two phrase sets into the top and bottom panels. The rows for the two phrase sets will also be highlighted in the table on the right side. Clicking the button again will search for the next pair of phrase sets, starting with the last pair found.
Merging Phrase Sets
The "Merge" button merges the phrase sets in the top and bottom phrase set panels into a single phrase set. This operation takes place immediately and does not require a save. A typical usage pattern for this function is to use the "Find Duplicates" tool to find phrase sets that share common phrases then use the merge to combine the two phrase sets.
whirlDOC currently supports a maximum of eight phrases for a phrase set. The merge button will be disabled if merging the two phrase sets will exceed this maximum.
Exchanging Top and Bottom Panels
The "Exchange Panels" button swaps the contents of the top and bottom phrase set panels. Swapping can be useful for keeping a phrase set in the bottom panel as the thesaurus is searched.
Editing Existing Phrase Sets
Selecting a Phrase Set
There are several ways to load a phrase set into the top panel for editing. A row in the thesaurus table can be clicked. A row in the table can be found with the search box, which will load the found table row into the top panel. The "Find Duplicates" button will highlight a pair of phrase sets in the table that share a common phrase, which will load the two phrase sets into the top and bottom panels. One of the bottom panel matching phrase drop down dialogs, which are to the right of each phrase and list phrase sets that share the left phrase, can be used to load a phrase set into the top panel. Finally, the "Clone" button will make a copy of the top panel’s contents, moving the phrase set in the top panel to the bottom panel and putting a copy in the top panel.
Editing the Top Panel
New phrases can be entered or existing phrases changed by clicking on a phrase text field and typing. As phrases are changed, the matching phrase set drop down to the right of the phrase will change so it lists phrase sets that contain the same phrase.
The bottom panel "Add Phrase" buttons to the left of its phrases add phrases to the top panel.
The "Pluralize" button will convert all top panel phrases to plural forms. This is only useful when the phrases are nouns.
Saving the Top Panel to Thesaurus
The top panel must be saved to enter its changes into the thesaurus. When there are unsaved changes to the panel, the identifier at the top of the panel will be light blue. After the panel is saved, the identifier will change to gray.
Creating New Phrase Sets
A new phrase set can be started with the "New Phrase Set" button, which will clear the existing contents of the top panel. The identifier at the top of the panel will be displayed as "NEW". Editing can then proceed as though editing an existing phrase set. The top panel must be saved to add the new phrase set to the thesaurus. Once the phrase set is saved, an identifier will be assigned and displayed above the panel, indicating the phrase set is now part of the thesaurus.
A new phrase set can also be created by cloning the contents of the top panel with the "clone" button.
Note that when the thesaurus editor is first displayed, the top panel is empty. It is not editable because there is no phrase set loaded into it and a new phrase set has not been started. The identifier at the top of the panel will read "???".
|Thesauruses||The Thesaurus Editor|