Leximation
 Tools and Solutions for Print and Online Publishing
Gears

Leximation blog:

User links:

Login / Register
Username: Forgot?
Password:
 Remember me [?]

Synonym Search v.0.01 ** BETA ** - Easily add synonym matching to searches of your HTML files. This process should work for web-based HTML files and compiled HTML Help (CHM) files. Adding synonyms can improve searches by compensating for frequently misspelled words (such as US-UK differences), or adding specialized terminology such as domain-specific words.

This utility loads the list of synonyms into memory, then loops through all of the HTML files (defined by the "scope" file). In each file it locates sentences that contain a specified synonym word and copies those sentences (with the word replaced with the synonym) to a "hidden" area in the file. This "hidden" area is a DIV with the display property set to "none". Search engines will still read the content in this area, but it won't be visible to your readers.

Possible Caveats:

  1. By duplicating sentences that contains synonym matches, those sentences may be inadvertently "weighted" depending on how the search engine handles such things.
  2. Depending on the size of your synonym file, your HTML files may get bloated due to the duplication of text.
  3. Because the synonyms are not visible on the page, any search highlighting will not occur (possible user confusion, but probably no worse than not getting to the topic at all).

Installation/Usage:

  1. Download and install Perl (www.activestate.com)
  2. Copy the SYNSEARCH.PL file to a folder on your system (perhaps in the folder with the files to be processed).
  3. Set up your synonym and scope files (see "Syntax" below).
  4. Always have a backup of the files before processing!
  5. Double-click the SYNSEARCH.PL file or enter the command line syntax at a command prompt.
  6. Each time you re-run this utility it deletes the old synonyms and rebuilds the "hidden" area.

Important: This utility is currently in beta testing. Always have a backup of your files before processing to ensure no data is lost. We would greatly appreciate hearing from you reagarding your use of this utility .. good/bad .. just let us know!

This download contains the following:

  • SynSearch.PL Perl script.
  • Partial US-UK synonym file.
  • Text file with usage information.

download synsearch.zip v.0.01 [5KB]