Morphology in WordNet uses two types of processes to try to convert the string passed into one that can be found in the WordNet database. There are lists of inflectional endings, based on syntactic category, that can be detached from individual words in an attempt to find a form of the word that is in WordNet. There are also exception list files, one for each syntactic category, in which a search for an inflected form is done. Morphy tries to use these two processes in an intelligent manner to translate the string passed to the base form found in WordNet. Morphy first checks for exceptions, then uses the rules of detachment. The Morphy functions are not independent from WordNet. After each transformation, WordNet is searched for the resulting string in the syntactic category specified.
The Morphy functions are passed a string and a syntactic category. A string is either a single word or a collocation. Since some words, such as axes can have more than one base form (axe and axis ), Morphy works in the following manner. The first time that Morphy is called with a specific string, it returns a base form. For each subsequent call to Morphy made with a NULL string argument, Morphy returns another base form. Whenever Morphy cannot perform a transformation, whether on the first call for a word or subsequent calls, NULL is returned. A transformation to a valid English string will return NULL if the base form of the string is not in WordNet.
The morphological functions are found in the WordNet library. See morph(3WN) for information on using these functions.
POS | Suffix | Ending |
NOUN | "s" | "" |
NOUN | "ses" | "s" |
NOUN | "xes" | "x" |
NOUN | "zes" | "z" |
NOUN | "ches" | "ch" |
NOUN | "shes" | "sh" |
NOUN | "men" | "man" |
NOUN | "ies" | "y" |
VERB | "s" | "" |
VERB | "ies" | "y" |
VERB | "es" | "e" |
VERB | "es" | "" |
VERB | "ed" | "e" |
VERB | "ed" | "" |
VERB | "ing" | "e" |
VERB | "ing" | "" |
ADJ | "er" | "" |
ADJ | "est" | "" |
ADJ | "er" | "e" |
ADJ | "est" | "e" |
If the word is not found in the exception list corresponding to the syntactic category, an algorithmic process using the rules of detachment looks for a matching suffix. If a matching suffix is found, a corresponding ending is applied (sometimes this ending is a NULL string, so in effect the suffix is removed from the word), and WordNet is consulted to see if the resulting word is found in the desired part of speech.
Verb collocations that contain prepositions, such as ask for it , are more difficult. As with single words, the exception list is searched first. If the collocation is not found, special code in Morphy determines whether a verb collocation includes a preposition. If it does, a function is called to try to find the base form in the following manner. It is assumed that the first word in the collocation is a verb and that the last word is a noun. The algorithm then builds a search string with the base forms of the verb and noun, leaving the remainder of the collocation (usually just the preposition, but more words may be involved) in the middle. For example, passed asking for it , the database search would be performed with ask for it , which is found in WordNet, and therefore returned from Morphy. If a verb collocation does not contain a preposition, then the base form of each word in the collocation is found and WordNet is searched for the resulting string.