မာတိကာသို့ ခုန်သွားရန်

မဝ်ဂျူ:en-headword/doc

နူ ဝိက်ရှေန်နရဳ

This is the documentation page for မဝ်ဂျူ:en-headword

This module is used for English headword-line templates. This module currently implements {{en-noun}}, {{en-proper noun}}, {{en-verb}}, {{en-adj}}, {{en-adv}}, {{en-prepphr}}, {{en-head}} and {{en-suffix form}}. See the documentation of those templates for more information.

The module is always invoked the same way, by passing a single parameter to the "show" function. This parameter is the name of the part of speech, but in plural (examples given are for nouns, and for adjective forms respectively):

{{#invoke:en-headword|show|nouns}}
{{#invoke:en-headword|show|adjective forms}}

The template will, by default, accept the following parameters (specific parts of speech may accept or require others):

|head=
Override the headword display; used to add links to individual words in a multiword term. Separate multiple terms (i.e. multiple possible ways of linking a given term, which rarely occurs) with commas (with no space following). Individual terms may have inline modifiers added.
|head=? or |head=!
Add a ? or ! (respectively) to the end of the headword. The headword itself is linked according to the default algorithm, or remains unlinked if |nolink=1 is given.
|head=~...
Apply link modifications (see below) to the headword, in place of spelling out the way each word is linked. This works in concert with the default linking algorithm and allows only the parts of the default algorithm that are incorrect to be changed.
|abbr=
Abbreviation(s). Separate multiple terms with commas (with no space following). Individual terms may have inline modifiers added.
|id=
Sense ID for linking to this headword. See {{senseid}} for more information.
|nolink=1 or |nolinkhead=1
Don't link individual words in the headword of a multiword term. Useful for foreign or otherwise unanalyzable terms like a posteriori and yabba dabba doo where the expression functions as a whole in English but the individual parts are not English words.
|splithyph=1
Indicate that automatic splitting and linking of words should split on hyphens in multiword expressions with spaces in them, even if the hyphenated component would normally be linked as-is or with hyphens converted to spaces. See #Autosplitting below.
|nosplithyph=1
Indicate that automatic splitting and linking of words should not split on hyphens in multiword expressions with spaces in them, even if this would normally happen. See #Autosplitting below.
|hyphspace=1
Indicate that hyphenated components should be linked as a whole using the space-separated equivalent, even if this would not normally happen (i.e. because the space-separated equivalent is not defined as an English term). See #Autosplitting below.
|suffix=1
Make a term not beginning with a hyphen be interpreted as a suffix. See #Suffix handling below.
|nosuffix=1
Prevent terms beginning with a hyphen from being interpreted as suffixes. See #Suffix handling below.
|the=1 or |def=1
Specify that the term is normally preceded the definite article the. When given, the (unlinked) will appear at the beginning of the headword.
|the=~ or |def=~
Specify that the term is optionally preceded the definite article the. When given, two headwords will be generated, one with the and one without.
|nomultiwordcat=1
Prevent multiword terms (those with spaces or with hyphens in the middle) from being added to Category:English multiword terms.
|pagename=
Override the page name used to compute default values of various sorts. Useful when testing, for documentation pages, etc.
|sort=
Sort key. Rarely needs to be specified, as it is normally automatically generated.

All templates using this module use a semi-intelligent autosplitting algorithm to link portions of multipart and multiword expressions, as follows:

  • If there are spaces in the term but no apostrophes or hyphens, the module will automatically split and link distinct space-separated words, similarly to {{head}}; hence, absent without leave will be linked as [[absent]] [[without]] [[leave]].
  • If there are spaces and apostrophes but no hyphens, the module will likewise split and link distinct space-separated words, but may also split up words with apostrophes in them. Specifically:
    1. If a word ends in 's, the part before the 's will be linked as a word, and the 's will be linked separately to -'s, on the assumption that the 's is functioning as a possessive. For example, Abel's impossibility theorem will be linked as [[Abel]][[-'s|'s]] [[impossibility]] [[theorem]]. (An exception is made for one's, someone's, he's, she's and it's, which are linked as-is without splitting.)
    2. If a word ends in ', the apostrophe will be linked to -' (on the assumption that the ' is functioning as a plural possessive, similarly to above), and the part before will be separately linked. If the part before ends in an s, the module converts it to its singular equivalent and looks that up to see if it exists and has a definition as an English term. If so, the term is linked to the singular form; otherwise, it is linked to the plural form. (Converting to the singular means that -ies becomes -y; -es is dropped after sh, ch and x; and otherwise s is dropped.) For example, flies' graveyard will be linked as [[fly|flies]][[-'|']] [[graveyard]] because fly exists as an English term, but Achilles' heel will be linked as [[Achilles]][[-'|']] [[heel]] because Achille does not exist as an English term.
    3. All other terms containing apostrophes are linked unsplit.
  • If there are hyphens in the term but no spaces or apostrophes, the hyphenated components will be linked individually. For example, beggar-thy-neighbor will be linked as [[beggar]]-[[thy]]-[[neighbor]].
    • An exception to this occurs with certain recognized prefixes, which are linked with the hyphen included in the prefix. For example, Afro-American is linked as [[Afro-]][[American]] and co-occurrence is linked as [[co-]][[occurrence]], because Afro- and co- are in the list of recognized prefixes. (For the full list, see below.)
  • If there are hyphens and apostrophes but no spaces, the effect is similar to the situation with spaces and apostrophes. For example, beggar's-lice is linked as [[beggar]][[-'s|'s]]-[[lice]].
  • If there are both hyphens and spaces, the space-separated components that do not have hyphens will be linked separately, as above. Any hyphen-separated components may be linked in one of three ways:
    1. If |hyphspace=1 is specified or the hyphen-separated component exists as an English term when the hyphens are converted to spaces, it will be linked to that term. For example, closed-circuit television will be linked as [[closed circuit|closed-circuit]] [[television]] because closed circuit exists as an English term. (In this case, closed-circuit also exists but is approximately a soft redirect to closed circuit, as is often the case with such attributive compounds. This is why we prefer the space-separated variant.)
    2. If |nosplithyph=1 is specified or the hyphen-separated component exists as an English term in its unmodified form but not when the hyphens are converted to spaces, it will be linked as an unmodified whole. For example, coin-operated laundry will be linked as [[coin-operated]] [[laundry]] because coin-operated exists as an English term but coin operated does not. (An example that requires |nosplithyph=1 is close-up lens, where the default algorithm would incorrectly link the first component to close up. Here, close up [a verb] and close-up [an adjective] both exist but refer to different things.)
    3. If |splithyph=1 is specified or the hyphen-separated component does not exist as an English term (either unmodified or when the hyphens are converted to spaces), each hyphenated component is linked separately. Examples where this happens are adult-onset diabetes (linked as [[adult]]-[[onset]] [[diabetes]]) and Bombieri-Friedlander-Iwaniec theorem linked as [[Bombieri]]-[[Friedlander]]-[[Iwaniec]] [[theorem]]). Note that when separately linking hyphenated components, prefixes are recognized and handled specially, as documented below.

Special prefix handling

[ပလေဝ်ဒါန်]

As described above, when splitting hyphenated components, if a component is not the last component and looks like one of the following prefixes, the following hyphen will be included inside of the link.

If the term begins with a hyphen (-), it is assumed to be a suffix rather than a base form, and is categorized into Category:English suffixes and Category:English POS-forming suffixes rather than Category:English POSs (e.g. Category:English noun-forming suffixes rather than Category:English nouns). This can be overridden using |nosuffix=1. (An example where this is necessary is -ussification, which refers to a linguistic process of blending words with the suffix -ussy but is not itself a suffix.)

[ပလေဝ်ဒါန်]
TermLink modificationEquivalent fully spelled out
acute necrotising ulcerative gingivitis|head=~necrotis[ing:e]|head=[[acute]] [[necrotise|necrotising]] [[ulcerative]] [[gingivitis]]
Admiral of the Fleet|head=~[A:a]dmiral; [F:f]leet|head=[[admiral|Admiral]] [[of]] [[the]] [[fleet|Fleet]]
Delivered Ex Quay|head=~[D:d]eliver[ed]; Ex:ex; [Q:q]uay|head=[[deliver|Delivered]] [[ex|Ex]] [[quay|Quay]]
a magician never reveals his secrets|head=~reveal[s]; secret[s]|head=[[a]] [[magician]] [[never]] [[reveal]]s his [[secret]]s
acute respiratory distress syndrome|head=~respiratory distress|head=[[acute]] [[respiratory distress]] [[syndrome]]
don't feed the trolls|head=~feed the troll[s]|head=[[don't]] [[feed the troll]]s
how do I get to the bus station|head=~bus station; ?|head=[[how]] [[do]] [[I]] [[get]] [[to]] [[the]] [[bus station]]?
does this train stop at|head=~do[es]; ...?|head=[[do]]es [[this]] [[train]] [[stop]] [[at]] ...?
Appendix:Snowclones/X is the new Y|head=~X; Y|head=X [[is]] [[the]] [[new]] Y
there is no war in Ba Sing Se|head=~there is:there be; Ba Sing Se:_|head=[[there be|there is]] [[no]] [[war]] [[in]] Ba Sing Se
Charlie Brown Christmas tree|head=~Charlie Brown:w:~|head=[[w:Charlie Brown|Charlie Brown]] [[Christmas]] [[tree]]
chance'd be a fine thing|head=~chance'd:[[chance]][['d]]|head=[[chance]][['d]] [[be]] [[a]] [[fine]] [[thing]]
because reasons|head=~because:~#Preposition; reason[s]|head=[[because#Preposition|because]] [[reason]]s
time flies like an arrow; fruit flies like a banana|head=~fruit flies:fruit fly; flies:fly|head=[[time]] [[fly|flies]] [[like]] [[an]] [[arrow]]; [[fruit fly|fruit flies]] [[like]] [[a]] [[banana]]
don't count your chickens before they've hatched|head=~chicken[s]; hatch[ed]<id:to emerge from an egg>|head=[[don't]] [[count]] [[your]] [[chicken]]s [[before]] [[they've]] {{ll|en|hatch|hatched|id=to emerge from an egg}}

The default behavior described above under #Autosplitting is sufficient in most circumstances, but some multiword terms need special linking behavior to handle things like inflected terms (e.g. those ending in -ing or -s), capitalized terms, multiword subexpressions, etc. One way to handle that is to use |head= and spell out the entire headword, appropriately linked, effectively ignoring the default linking behavior. But this can be awkward for long multiword terms. For cases like this, a shortcut syntax is provided to apply link modifications on top of the autolinked term. To enable this, put a tilde (~) at the beginning of the value specified to |head=, followed by one or more modifications, separated by a semicolon.

For example, for the term acute necrotising ulcerative gingivitis, we would like to link necrotising to necrotise. This can be done as follows:

  • {{en-noun|head=~necrotising:necrotise}}

or more compactly as

This is equivalent to writing {{en-noun|head=[[acute]] [[necrotise|necrotising]] [[ulcerative]] [[gingivitis]]}}, but shorter. In general, syntax of the form prefix[from:to] is equivalent to writing prefixfrom:prefixto, and says to replace prefixfrom with prefixto in the default output produced by the #Autosplitting mechanism described above.

The same syntax works on the beginning of a word, which is especially useful when linking to the lowercase equivalent of a capitalized term. For example, for admiral of the Swiss Navy, use the following to link Navy to navy:

This is equivalent to writing {{en-noun|head=[[admiral]] [[of]] [[the]] [[Swiss]] [[navy|Navy]]}} but shorter.

If the to part of the substitution is empty, the colon can be omitted. For example, for a magician never reveals his secrets, you can write:

  • {{en-head|phr|head=~reveal[s]; secret[s]}}

This is equivalent to writing

  • {{en-head|phr|head=~reveal[s:]; secret[s:]}}

which is in turn equivalent to {{en-head|phr|head=[[a]] [[magician]] [[never]] [[reveal]]s his [[secret]]s}}.

Modifications need to match full words, but can be applied to multiple words. A ~ on the right-hand side is a shortcut that stands for the left-hand side, which is especially useful when multiple words are given on the left-hand side, and causes the words to be linked together. For example, for acute respiratory distress syndrome, to link respiratory distress as a single entity, use the following:

  • {{en-noun|head=~respiratory distress:~}}

which is equivalent to {{en-noun|head=[[acute]] [[respiratory distress]] [[syndrome]]}}.

The right-hand side need not consist solely of a tilde, but can contain other surrounding text. For example, for Charlie Brown Christmas tree, use the following to link to the Wikipedia entry for Charlie Brown:

  • {{en-noun|head=~Charlie Brown:w:~}}

This is equivalent to writing {{en-noun|head=[[w:Charlie Brown|Charlie Brown]] [[Christmas]] [[tree]]}}.

In the common case, where multiple words are linked together with no further changes, the colon and following tilde can be omitted. Thus, in the above example for acute respiratory distress syndrome, you can just write

  • {{en-noun|head=~respiratory distress}}

Multiple modifications can be specified, separated by a semicolon (optionally with surrounding spaces). For example, for Admiral of the Fleet, use:

  • {{en-noun|head=~[A:a]dmiral; [F:f]leet}}

This is equivalent to writing {{en-noun|head=[[admiral|Admiral]] [[of]] [[the]] [[fleet|Fleet]]}}.

A modification consisting solely of ? or ! appends that character to the end. Thus, for how do I get to the bus station, you can write:

  • {{en-head|phr|head=~bus station; ?}}

which is equivalent to {{en-head|phr|head=[[how]] [[do]] [[I]] [[get]] [[to]] [[the]] [[bus station]]?}}.

A modification consisting solely of ..., ...? or ...! append that to the end, after a space. Thus, for does this train stop at, use the following:

which links does to do and adds ...? to the end, equivalent to writing {{en-head|phr|head=[[do]]es [[this]] [[train]] [[stop]] [[at]] ...?}}.

In general, to append text to the end, use $ on the left side of a substitution, and to prepend text to the beginning, use ^. An underscore (_) in the replacement text is replaced by a space. So, the modification ? is equivalent to $:?, and the modification ...? is equivalent to $:_...?.

If the replacement text in a substitution consists solely on an underscore (_), the text on the left side is left unlinked. For example, for there is no war in Ba Sing Se, use:

  • {{en-head|phr|head=~there [is:be]; Ba Sing Se:_}}

which links there is to there be and leaves Ba Sing Se unlinked, equivalent to writing {{en-head|phr|head=[[there be|there is]] [[no]] [[war]] [[in]] Ba Sing Se}}.

A modification that consists solely of an uppercase letter leaves a word consisting of that letter unlinked, equivalent to adding :_ after the letter. This is especially useful for snowclones, to avoid linking the X, Y, etc. frequently part of these expressions. Thus, for Appendix:Snowclones/X is the new Y, you can write:

which is equivalent to {{en-head|phr|head=X [[is]] [[the]] [[new]] Y}}.

To specify a sense ID for a link (see {{senseid}} and the |id= parameter of {{link}}), use the inline modifier <id:...> after the modification. Currently this is the only inline modifier supported. Thus, for don't count your chickens before they've hatched, to link hatched to the sense ID to emerge from an egg of the verb hatch, use:

  • {{en-head|proverb|head=~chicken[s]; hatch[ed]<id:to emerge from an egg>}}

which is equivalent to {{en-head|proverb|head=[[don't]] [[count]] [[your]] [[chicken]]s [[before]] [[they've]] {{ll|en|hatch|hatched|id=to emerge from an egg}}}}.