Template:pt-noun/documentation

This template generates a headword line and categorizes Portuguese noun entries.

The template uses Module:pt-headword as a back end.

Usage
This template should be added to all Portuguese noun entries.

The template should be placed within the Portuguese language section, immediately following the Noun L3 header.

As with other Wiktionary inflection line templates, please do not use .

Introduction
In the majority of cases, only the gender needs to be specified in 1, e.g. for :
 * f

which produces

The module knows how to form the plural of most nouns, including those in -l, -ão, -m, etc. For example, for :
 * f

which produces

Similarly, for :
 * m

which produces

And for :
 * mfbysense

which produces

Note in the latter case that  as a gender indicates a noun that can be either masculine or feminine according to the natural gender of the being referred to, and categorizes into Category:Portuguese masculine and feminine nouns by sense.

Explicit plurals
Some nouns have irregular plurals. To specify this, use 2, e.g. for :
 * m

which produces

If there is more than one possible plural, specify additional plurals using pl2, pl3, etc., as for :
 * m

which produces

Here,  in a plural (or feminine, see below) stands for the lemma; hence   is the same as.

Another example is :
 * mfbysense

which produces

Here, we use  as above to stand for the lemma, indicating an unchanged plural, and   to request the default plural (in this case ).

Use an hyphen  to specify  nouns, as in the example:
 * f

which produces

nouns, that is, nouns that have the same form for both singular and plural, are autodetected by their morphology and don't require additional input:
 * m

However, it's possible to achieve the same result by duplicating the singular in 2:
 * m

Feminines
Use f to specify the feminine equivalent of a masculine noun referring to a person or animal, as with :
 * m

which produces

The module knows how to correctly form the feminine in most cases; to request the default, use. A feminine plural will automatically be generated using the default pluralizing algorithm, which is almost always correct; to override this, use fpl.

Examples of default feminines are →,  →  and  →.

Another more complex example is :
 * m

which produces

Qualifiers
You can add a qualifier to a given plural, feminine or gender. An example of a gender qualifier is with :
 * m

which produces

An example of a plural qualifier is with :
 * m

which produces

An example of a feminine qualifier is with :
 * m

which produces

Multiword expressions
The module knows how to correctly pluralize and form the feminine of most multiword expressions. An example is :
 * m

which produces

The default is to pluralize the first and last word (as here), unless there is a recognized preposition in the word, in which case only the portion before the preposition is pluralized. An example with a preposition is :
 * m

which produces

Note here we request the default feminine, which follows the same principles as the plural; in this case, only the portion before the preposition is pluralized.

Another example is :
 * m

which produces

Note how both words before the preposition are pluralized (recursively applying the default algorithm to the portion before the preposition).

In some cases, the default algorithm produces incorrect results. In those cases, you can control which words are pluralized using one of the following specs:
 * Use  if only the first word inflects.
 * Use  if only the first word inflects.
 * Use  if the first and last word inflect.
 * Use  if all words inflect.
 * Use  if the first and second words inflect.
 * Use  if only the second word inflects.
 * Use  to explicitly request the default multiword pluralization algorithm (needed with hyphenated terms; see below).

An example that uses these codes is. The default is to pluralize the first and last words, but here we need each word pluralized:
 * f

which produces

Another example is, where we want only the first word pluralized:
 * m

which produces

These codes also work for hyphenated terms such as and, but in these cases the default multiword algorithm does not automatically apply; instead, by default the word is treated as a single word. To apply the multiword algorithm, you must explicitly specify one of the codes above; use  to request the default. An example of this is :
 * m

which produces

Note here that we request the default multiword algorithm for both the plural and feminine (and as a result it's used for the feminine plural as well, which uses the spec of the feminine).

Another example is, which has two possible plurals:
 * f

which produces

Suffixes
You can use this template for noun-forming suffixes. If the page name begins with a hyphen, the part of speech for categories is changed to  instead of , and the page is added to an additional category Category:Portuguese noun-forming suffixes. An example is :
 * m

which produces

and automatically adds the page to Category:Portuguese suffixes, Category:Portuguese masculine suffixes and Category:Portuguese noun-forming suffixes.

Summary of parameters

 * 1, g2, ...
 * Gender(s). 1 is required. Possible values are  (masculine),   (masculine, plurale tantum),   (feminine), ,   (can be either masculine or feminine, with no meaning difference),  ,   (can be either masculine or feminine, according to the natural gender of the person or animal referred to),  ,   (neuter; used for gender-neutral terms like ),  ,   (unknown gender),.


 * g_qual, g2_qual, ...
 * Optional qualifiers for the gender(s). g_qual corresponds to 1, g2_qual corresponds to g2, etc.


 * 2, pl2, ...
 * Explicitly specify the plural(s). If no plurals are specified, the default algorithm applies.


 * pl_qual, pl2_qual, ...
 * Optional qualifiers for the plural(s). pl_qual corresponds to 2, pl2_qual corresponds to pl2, etc.


 * f, f2, ...
 * Explicitly specify the feminine equivalent(s).


 * f_qual, f2_qual, ...
 * Optional qualifiers for the feminine equivalent(s). f_qual corresponds to f, f2_qual corresponds to f2, etc.


 * fpl, fpl2, ...
 * Explicitly specify the plural(s) of the feminine equivalent(s). The default is based on applying the pluralization algorithm to the specified feminine equivalent(s) (if any).


 * fpl_qual, fpl2_qual, ...
 * Optional qualifiers for the feminine plural(s). fpl_qual corresponds to fpl, fpl2_qual corresponds to fpl2, etc.


 * m, m2, ...
 * Explicitly specify the masculine equivalent(s).


 * m_qual, m2_qual, ...
 * Optional qualifiers for the masculine equivalent(s). m_qual corresponds to m, m2_qual corresponds to m2, etc.


 * mpl, mpl2, ...
 * Explicitly specify the plural(s) of the masculine equivalent(s). The default is based on applying the pluralization algorithm to the specified masculine equivalent(s) (if any).


 * mpl_qual, mpl2_qual, ...
 * Optional qualifiers for the masculine plural(s). mpl_qual corresponds to mpl, mpl2_qual corresponds to mpl2, etc.


 * 1
 * Specify that the noun has a metaphonic plural (see Appendix:Portuguese pronunciation).


 * pagename
 * Override the page name. Useful especially on documentation and test pages.

For all the above plural/feminine/masculine parameters, use  to explicitly request the default and   to stand for the lemma.