Package DE_EPAGES::Core::API::Plural
includes function which can transform a english singular word in to the plural form source http://tess2.uspto.gov/tmdb/dscm/plurals.htm
For most searches, selecting the plurals option will provide the desired singular and plural forms for your search. Note that the plurals option work both ways, converting singular search terms to plurals and plural search terms to the singular form for the actual search. If you have doubts about the substitutions being performed for your search, turn the plurals option off and specify the explicit search terms you wish to retrieve. The DSCM search engine employs an exception table to create the singular and plural forms of search words. If the word is not in exception table, an S is appended to the word to form its plural. For example, the plural form of BANANA is BANANAS. The exception table provides the substitutions that are used to form the plural form or multiple plural forms for select words. The bulk of the entries include a word ending and the list of one or more alternative endings that are substituted to form the plural forms. For example, the plural forms of words ending in Y are provided by the following entry. Y IES YS The above entry means that for any word ending in Y, two plural forms are created by substituting IES and YS for Y. The plural forms for LADY are LADYS and LADIES. When forming the plural forms for a word, the exception table is searched in order. Once a word match is found, then the substitutions specified in that word are performed and searching stops. For example, although BOY ends in Y, the entry OY precedes Y in the table, so the plural form of BOY is BOYS. The substitution IES is not performed for the Y in boy, so BOIES is not a plural form BOY. An alternative format used in the exception table is for entries beginning with the equal sign (=), which indicates an exact match of the full word must occur for the substitution to be performed. An example of such an entry follows. =OCTOPUS =OCTOPUSES =OCTOPI The plural forms of OCTOPUS are OCTOPUSES and OCTOPI, but OCTOPUS is not considered to be a word ending for such substitutions. There are very few uses of this format in the exception table, so there is little likelihood of encountering these exceptions during your searches. If you have doubts about the substitutions being performed for your search, turn the plurals option off and specify the explicit search terms you wish to retrieve. If an entry in exception table begins with a plus sign (+) then the DSCM search engine substitutes for the word following the plus sign with all the alternative entries included on the line. Each line represents the various forms of a given word ending. If the end of an input term matches any of the strings given on a line, then that is expanded to the beginning part of the input term (less the matched ending), plus each of the endings given on that exception line. ORDER COUNTS! These exceptions will be tested for in the order in which they are defined in this table. Once a matching ending is found, the table lookup stops.
@EXPORT_OK |
Functions
Singular2Plural
Returns the English plural option of a word.
Syntax |
$Plural = Singular2Plural($Singular); |
Example |
$Plural = Singular2Plural('Guy'); |
Input |
|