Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Apple Guide Complete / Part 4 - Scripting Guide Files
Chapter 10 - Guide Script Command Reference / Guide Script Command Descriptions
/ Specifying "Look For" Help


<Exception>

You can use the <Exception> command to specify a word that should not be stemmed when Apple Guide parses a search phrase. You typically place a word on the exception list only if the stemmed form of the word matches an existing index term.

<Exception> exceptionWord
exceptionWord
A text string that specifies a word that should not be stemmed when Apple Guide parses the search phrase.
DESCRIPTION
After a user enters a phrase in the search phrase entry box and then clicks Search, Apple Guide parses it. After removing any words specified by <Ignore> commands, Apple Guide parses the remaining string. When parsing, Apple Guide parses common word variations to a root word. If Apple Guide incorrectly stems a word, you usually specify the incorrectly stemmed word as a synonym for the index term. For example, Apple Guide stems "documents" to "docum", so you typically specify "docum" as a synonym for "documents" using the <Synonym> command. Alternatively, you could prevent Apple Guide from stemming the word "documents" by placing it on the exception list. But it is usually more convenient to use synonyms.

Thus, you typically use the <Exception> command only if the stemmed form of the word matches an existing index term. For example, assume "custom" and "customizing" are defined as two separate index terms. To prevent Apple Guide from stemming "customizing" to its root form ("custom"), you can include "customizing" on the exception list. Thus, if the user enters "customizing" as a search phrase Apple Guide reports the correct matching index term.

Also note that if a word or phrase in the exception list is a synonym (that you have specified using the <Synonym> command), Apple Guide replaces it with its equivalent index term when parsing. For example, if you have specified the word "editing" in an <Exception> command and also specified in a <Synonym> command that "editing" is synonymous with "copy editing", when the user enters "editing" in the search phrase, Apple Guide does not stem "editing" but does replace it in the search phrase with "copy editing". Apple Guide then looks for an index term matching "copy editing".

If Apple Guide finds a match, it displays the topics associated with the index term.

SPECIAL CONSIDERATIONS
Apple Guide performs stemming and uses the exception list only for guide files that specify the command <World Script> 0,0.

EXAMPLES
#specify exception words (word that shouldn't be stemmed)
#you usually place an index term on the exception list 
# ONLY when the term would otherwise stem to another 
# index term or whose root form has an alternate meaning 
<Exception> "customizing"
<Exception> "customize"
<Exception> "editing"
<Exception> "edition"
<Exception> "editions"  

Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996