Synonym_v10.00

<< Click to Display Table of Contents >>

Navigation:  Concordance Programming Language Reference > Concordance Scripts >

Synonym_v10.00

The Synonym CPL loads a text file containing synonyms into the Concordance .SYN file for searching.

The .SYN file is located in the same directory folder as the primary database.

The Synonym CPL works with the following versions of Concordance:

8.x

9.5x

10

To create a Synonym load file

When creating a synonyms list, keep the following in mind:

Group words together to form a synonym group.

Use a blank line to separate one synonym group from another.

Precede words with a minus sign to create subcategories of a specified word.

Use the plus sign to store a word as a synonym and then assign subgroups.

 

1.Open any text editor, such as Notepad or TextPad to create a new text file.

2.Type the synonyms you wish to add to the Concordance .SYN file, and then save the file to a convenient location.

 

To run the Synonym_v[version #].cpl

1.Open a database in Concordance.

2.In Concordance, on the File menu, click Begin Program.

3.Locate and open the Synonym_v[version #].cpl.

4.In the Input File dialog box, locate the Synonym list text file you want to load, and then click Open.

5.Verify that the CPL ran correctly by searching for one of the items in your Synonym text file.  The CPL should return not only the word you are searching for, but also the words you have designated as synonyms.

 

Synonym list examples

To create a synonym group

Words that are grouped together without any symbols form a synonym group.

For example, searching for any of the words on this list, the search results returns all of the words on the list. Thus, searching for the word Red returns results for the words Red, Green and Blue.

 

Using the same synonyms list, searching for the word Green, returns the words Green, Red and Blue.

 

To create synonym subcategories

Words preceded with a minus sign create subcategories of the main word.

For example, searching for the word Colors, the search results would include the words, Colors, Red, Green, and Blue.

However, searching for the word Blue, returns only the word Blue and NOT the words Colors, Green or Red.

 

To create a synonym subgroup

Words preceded by a plus sign store the word as a synonym and then assign a subgroup of words.

For example, searching for the word Colors, returns the words Colors, Red, Green, Blue, Reddish, Brick, and Maroon.

Searching for the word Red, returns the words Red, Reddish, Brick, and Maroon.

Similarly, searching for the word Reddish, returns the words Red, Reddish, Brick, and Maroon.

However, searching for the word Maroon, returns only the word Maroon.