Form Phrase Macro
A Form Phrase Macro is a sequence of characters (the macro name) that identifies a sequence (map) of character strings that specify typical variations of a form phrase, such as plural forms, possessie extensions, verb-conjugation forms, etc.
For example, when the macro {ss}
is used in a form phrase specification "actor{ss}"
, or act
, this is a shorthand for the set "actor", "actors", "actor's", "actor(s)"
, or the set "act", "acts", "act's", "act(s)"
respectively.
A form phrase that contains a form phrase macro can be expanded into a set of form phrases that no longer contain the form phrase macro. Thus a form phrase that contains a form phrase macro can be seen as a 'shorthand notation' for the set of form phrases that it can be expanded into.
Purpose
Form phrase macros facilitate the specification of form phrases, by enabling efficient ways of representing plural forms, possessive extensions, verb-conjugation forms, etc.
Form Phrase Macro Expansion (#expansion-process)
The form phrase macro expansion process takes as inputs:
- a form phrase that contains a form phrase macro, and
- a sequence (map) of character strings that is associated with the form phrase macro.
For every character string in the form phrase macro map, the expansion process creates a form phrase that is identical to the form phrase that is input, and then it substitutes the form phrase macro therein with the character string. Thus, The expansion process produces as many form phrases as there are character strings in the form phrase macro map.
Here is an example.
- The input form phrase is
actor{ss}
. - The form phrase macro
ss
is associated with the character string map[ "", "s", "'s", "(s)" ]
.
The result of the expansion process is [ "actor", "actors", "actor's", and "actor(s)" ]
Predefined Form phrase macros
The following table specifies the form phrase macros that can be used by default. The table shows
- the form phrase macro name,
- the list of character strings that is used to create a set of form phrases from the form phrase that includes the macro,
- an example that could appear as a form phrase in a
formPhrases
-field of a curated text, - the set of (simplified)
showtext
s that would match that form phrase:
macro | character string map | example | is exapanded into |
---|---|---|---|
{ss} | "", "s", "'s", "(s)" | actor{ss} | "actor", "actors", "actor's", and "actor(s)" |
{ess} | "", "es", "'s", "(es)" | regex{es} | "regex", "regexes", "regex's", "regex(es)" |
{yies} | "y", "y's", "ies" | part{yies} | "party", "party's", and "parties" |
{ying} | "y", "ying", "ies", "ied" | identif{ying} | "identify", "identifying", "identifies", and "identified" |
{es} | "e", "es", "ed", "ing" | manag{es} | "manage", "manages", "managed", "managing" |
{able} | "able", "ability" | cap{able} | "capable", "capability" |
The above macro's should be used with care. Here are some tips:
- Use
{ss}
macro only for nouns whose plural is constructed by adding ans
. - Use
{yies}
only for nouns that end with ay
. - Use
{yies}
only for verbs that end with ay
. - Use
{es}
only for regular verbs that conjugate as specified.
Custom Form Phrase Macros
There is currently an issue that calls for the ability to use custom form phrases, that could be specified somewhere in the SAF or as an MRGT option. The contents of this section can be written when that issue has come to a resolution.