Wikifunctions:Catalogue/Natural language operations/English
Sentence and fragment generation
General-purpose
- English article-less instantiating sentence (Z26088): E.g. "Berlin is a city." or "Water is a substance."
- subject is a kind of, English sentence (Z23410): E.g. "An aircraft carrier is a ship." or "A tiger is a mammal." Plural forms only if no singulars (see Z44009 for plural version).
- English simple copular sentence (Z21765): Returns a simple copular sentence in English.
- state location w/ entity & class, mono <AW:Z36983> (Z26570): Forms a sentence stating the location and class of a given entity. E.g. "Seoul is a city in South Korea." HTML version at Z36983.
- Shown in (English) (Z32199): (noun) shown in (descriptor)
- quantity comparison, English (Z32230): Description missing
- English non-defining role sentence (Z32244): Sentence of the type [X] is a [Y] of [Z]. e.g. "Pretoria is a capital city of South Africa."
- English collective role sentence (Z32249): Makes a sentence like [X] are [Y] of [Z], e.g. "Stars are sources of light." or "Algorithms are sets of instructions"
- spatial sentence relative to a group (Z44687): States a location relative to a noun modified by a group, in the requested language. E.g. The island is near the boundaries of many countries.
- state sentence, English (Z44691): States a property of subject items with automatic grammatical number, tense and initial case. E.g. Volcanic activity is vigorous.
Special use cases
- intro for year in English (Z20597): creates the intro sentences for articles about years, similar to the English Wikipedia's style
- English short description for album (Z28784): Given an album, returns a short description using the year and performer, e.g. "1968 album by The Beatles"
- sentence with dev, mfr, series, class in English (Z41682): Description missing
- follows and followed by sentence, English (Z41707): Description missing
- English date event predicate (Z42078): Returns an English predicate phrase for a dated event from a Wikidata property and grammatical number. Returns an empty string for unsupported properties.
- English events section of date Wikidata statement (Z42080): Description missing
- dated event sentence from Wikidata, English (Z42082): Generates an English sentence summarizing selected dated events of a Wikidata item in chronological order, using a pronoun when the item was previously mentioned.
- quantity with qualifier, in English (Z42100): Description missing
- price sentence from Wikidata, in English (Z42208): Description missing
- role of property values clause, English (Z42422): Description missing
- uses property values as roles-sentence, English (Z42438): Description missing
- property values as roles with a relation, English (Z42970): Description missing
- preferred value and reason sentence, English (Z43162): Description missing
- sentence with a discourse adverbial, English (Z43186): Description missing
- connective for a discourse relation (Z43281): The lemma of the conjunction or adverb whose sense (P5137) is the discourse relation; nouns are skipped. E.g. conjunction relation gives 「また」. Empty if there is none.
- counted property value clause, English (Z43216): Description missing
- counted property values with a relation, English (Z43219): Description missing
- property values by place sentence, English (Z43327): Description missing
- qualifier of each value sentence, English (Z43297): Description missing
- add a full stop unless one ends the sentence (Z43522): Adds a full stop to the end of a sentence, unless it already ends with one, as after "Inc.".
- wrap in quotation marks, English (Z43543): Description missing
- multiple property values-sentence, English (Z42519): Writes an English sentence stating the values of properties of an entity, optionally with a qualifier of each value. E.g. Its highest point is Mount Fuji, with an elevation above sea level of 3776 m.
- property-values clause, English (Z42520): A clause naming a property of an entity and its values, e.g. "its RAM capacity is 8 GiB". The copula agrees with the number of values and with the tense.
- value with a qualifier, English (Z44581): Shows a statement value in English, followed by the name and value of the first listed qualifier. E.g. Mount Fuji, with an elevation above sea level of 3776 m
- plural of an English property name (Z44281): Gives the plural of an English property name by making its head noun plural. E.g. name in kana becomes names in kana; official language becomes official languages.
- property value alternatives clause, English (Z42573): Description missing
- property value alternatives-sentence, English (Z42576): Description missing
- supported item with qualifier clause, English (Z42600): Description missing
- supported item with qualifier-sentence, English (Z42603): Description missing
- material by part clause, English (Z42721): Description missing
- material by part-sentence, English (Z42724): Description missing
- qualifier of property value clause, English (Z42752): Description missing
- qualifier of property value-sentence, English (Z42755): Description missing
- qualifier as subject clause, English (Z42932): Description missing
- qualifier as subject-sentence, English (Z42943): Description missing
- English predicate for a relation item (Z42843): The English predicate for a relation: the lexeme whose sense is that item, in the form the given number and tense call for. An adjective takes a copula. Compatibility gives "is compatible with".
- predicate clause from Wikidata values, English (Z42866): Description missing
- predicate sentence from Wikidata values, English (Z42879): Description missing
- possessed-subject relation sentence, English (Z44021): Writes an English sentence "The B of A [relation] C", optionally with words describing C, in the passive when the verb needs it. E.g. The territory of Japan is centred on the Japanese archipelago.
- relation modifier phrase, English (Z44017): Makes an English phrase that describes the noun before it, e.g. extending in France and Germany, or just in the North West Pacific Ocean when the relation has no English verb.
- modifier phrase from a verb lexeme, English (Z44055): Makes an English phrase from a verb lexeme that describes the noun before it. E.g. extend gives extending in France and Germany.
- semantic role phrase, English (Z44046): Joins object names with "and" and puts the English preposition for their semantic role in front; objects take none. E.g. on the Japanese archipelago, or nitrogen and oxygen.
- relation sentence with groups of things, English (Z44167): Writes an English sentence relating an entity to groups of things, each listed in full or by examples. E.g. Japan consists of four principal islands—Hokkaidō, Honshu, Shikoku, and Kyushu—and …
- noun phrase for a group of things, English (Z44153): An English noun phrase for a group of things, listing all of them with their number or giving examples. E.g. four principal islands—Hokkaido, Honshu, Shikoku, and Kyushu.
- join group noun phrases, English (Z44145): Joins English noun phrases for groups with "and", closing a dash-led list of names with a second dash. E.g. four islands—A and B—and many islands.
- relation sentence with counted values, English (Z44226): Writes an English sentence relating an entity to how many of its values are of a kind. E.g. Japan is administratively divided into 47 prefectures.
- noun phrase listing items, English (Z44374): Lists items as an English noun phrase joined with "and". E.g. location and topography; location, topography, and nature
- class part count sentence, English (Z44486): Writes an English sentence on how many parts of each class an entity has, or how much of its area they take. E.g. Japan has 14,125 islands as of January 2022.
- class part sentence from values, English (Z44500): Writes the English sentence on the number of parts of a class, or the share of the area they take, from statements already picked.
- genitive phrase with group, English (Z44632): Makes an English noun phrase whose noun belongs to a group of things. E.g. the islands of many countries, the boundaries of many tectonic plates
- spatial relation phrase, English (Z44637): Makes an English phrase saying where something is relative to another thing. E.g. near the coast
- place noun phrase with a possessor and a quantity (Z45402): Builds a noun phrase with a possessor and a quantity, such as "in many regions of Japan". Example: 日本の多数の地域で.
- noun phrase with a quantity, English (Z48105): Puts the English adjective for a quantity in front of a noun phrase. E.g. many and endemic species: many endemic species.
- clause stating a relation, English (Z44346): Writes one clause stating a relation in an English sentence: capitalised if it starts the sentence, with "and" before the last clause, ending in a full stop or a comma.
- English clause text (Z44477): Writes the words of an English clause from its verb lexeme, grammatical roles and subject role, without the final full stop or comma. E.g. Japan faces the Pacific Ocean to the east
- role that is the subject of an English clause (Z44294): Chooses the role that becomes the subject of an English clause: the topic when the verb takes it, otherwise the verb's subject. E.g. the place for inhabit; the thing moving when the topic is a time.
- English phrases for the other roles of a clause (Z44299): Writes the English phrases after the verb: objects, prepositional phrases and, last, a topic such as a time; a passive leaves out the agent. E.g. under Yamato Kingship in ancient history.
- English name for an item, plural for kinds (Z44334): Gives the English name of an item: the plural for a kind of thing with a countable noun, otherwise its name with "the" where needed. E.g. samurai governments, industrialisation, the Meiji Restoration.
- plural of an English countable noun for an item (Z44312): Gives the plural of an English noun in its sense for an item, or nothing when that sense is a mass noun or there is no plural. E.g. snow as precipitation gives nothing; as a flake, snows.
- is the item named as a kind in English (Z48647): Tells whether English names the item as a kind, with the plural of its noun: endemic species, regions. A kind has a superclass and an English lexeme.
- English name of a kind from its lexeme (Z48648): Names a kind with its English noun: the plural of a countable noun, the lemma of a mass noun. E.g. regions, snow.
Morphology
Nouns and pronouns
- English plural (Z11089): return the plural of an English word; see https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Updates/2023-09-08 for context
- English count plurality (Z11218): takes a natural number and the plural and singular cases of a count noun and returns the correct plurality
- is lexeme form plural? (including parent lexeme) (Z22490): tests if the lexeme form or parent lexeme, has a grammatical feature/number of Q146786 (plural)
Possessives
- English possessive (Z11302): makes a noun or pronoun (either subjective or objective) possessive, but use a different function for possessive determiners. see https://en.wikipedia.org/wiki/English_possessive
- English plural possessive (Z19125): Returns the form for a plural possessive or genitive based on the lemma form, e.g. dog → dogs'
Verbs
- three main forms of English verb (Z24676): returns a string with the present tense, simple past, and past participle of a verb, separated by commas
- three main forms of English verb by LID (Z24687): Description missing
- English -ed form (regular) (Z13177): Create the past participle of an English verb
- English -ing form (Z13087): create the gerund / present participle form of an English verb
- verb phrase for the subject role, English (Z44058): Makes an English verb phrase in the active or the passive voice, depending on which role of the verb the subject plays. E.g. contains (active), is centred (passive).
- English verb phrase with an adverb (Z44212): Puts an adverb into an English verb phrase: after the first auxiliary, or before a single verb. E.g. is divided and administratively give is administratively divided.
- English verb phrase with tense and aspect (Z44322): Makes an English verb phrase for the subject, in the active or passive, present or past, and in the perfect when asked. E.g. has been inhabited, progressed.
Adjectives and adverbs
- English comparative adjective (Z11795): morpheme which takes an adjective and returns the comparative adjective
- English regular superlative form (Z12203): regular superlative form of an English adjective or flat adverb
- adjective for an item, English (Z44138): The English adjective for an item. E.g. principal, small, many.
Articles
- add an indefinite article unless a name, English (Z43698): Puts a or an in front of an English common noun; names and phrases that already have an article are returned unchanged. E.g. accelerometer becomes an accelerometer.
- English noun phrase takes no article? (Z43697): Tells whether an English noun phrase needs no a, an or the in front: true for names and for phrases that already start with an article. E.g. Gorilla Glass is true, gyroscope is false.
- statement value as English complement (Z43699): Shows the value of a Wikidata statement in English as it would follow "is": names of things get a or an, quantities and dates are shown as they are. E.g. a slate smartphone.
- value as English generic plural, from a lexeme (Z43834): Shows a value as an English generic plural, the form used in "it contains loudspeakers". Names and words whose plural is unknown keep their label.
- English item name, with "the" where required (Z44035): Gives an item's English name, adding "the" when the geographic class list or the English alias requires the definite article. E.g. the North West Pacific Ocean, the Kanto Plain, the East Asian rainy season, but France.
- an or a? (English) (Z21739): Based on an English word or phrase, returns whether "a" or "an" should be the indefinite article.
- item indicates zero article, English (Z32935): True if the noun string representing the item should have neither article before it: "the" or "a/an".
- grammatical features indicate zero article English (Z32929): Description missing
- item indicates definite article, English (Z32645): From the identity of the item, decide whether the English text needs a definite article. Used in combination with other grammatical indicators. True if always "the X", False if never "the", else Maybe
Word derivation
- English verb to agent noun (Z11390): morpheme which takes a verb and returns the agent that does that verb
- English adjective to adverb (Z11646): Creates an English adverb from an adjective.
- English -ion base form (Z13280): The transformation of a verb into an agent noun by adding the suffix "-ion"
- English -er form (Z13262): English verb to agent noun ending in -er
Other
- suffix English word (Z13254): add any suffix to an English word with regular changes to spelling (monosyllabic or final-syllable stress is generally assumed)
- render item or generated phrase (Z44635): Returns a generated phrase unchanged, or renders an item through the supplied two-argument function. E.g. near the coast.
- omit markers for generated phrases (Z44686): Preserves markers for item references and removes them for generated phrases that already include their case or preposition.
Numbers
- English cardinal (Z13587): expresses a natural number in English words
- English ordinal (Z14526): converts a natural number to a standard English text string
- English name of month (Z13596): transforms Gregorian month to the English name of the month
- English denominator to fractional ordinal (Z14726): converts the natural number N in the denominator of a fraction into the singular name of (1/Nth)
- Natural number with English ordinal suffix (Z14531): Description missing
- English cardinal to ordinal (Z14523): Converts standard English cardinal forms like “twenty-three” to the corresponding ordinal form, like “twenty-third”.
Other
- English to Pig Latin (Z23827): Converts English text into Pig Latin
- contains shouting (Z18852): Detects shouting in English text; returns True if any is found, otherwise False.
- Filter shouting words (Z18859): Returns a list of shouting words in English.
Function usage on Abstract Wikipedia
See function usage on Abstract Wikipedia on this tool for en.
Configurations
Shows whether each configuration has a en-connected option. In some cases no language option is necessary for this language, because the default function is already the most appropriate function. This can be noted after the relevant item.
This list shows every active Configuration of functions for given languages (Z14294). For a list of those used on Abstract Wikipedia, see toolforge:abstract-data/languages/en#sec-2.
The list of all configurations is from here.
Syntactic tables (experimental)
For more about Syntactic tables see the language independent functions for tables. These are the ones specific for English. Syntactic tables are experimental and may be deprecated entirely, especially in favor of syntactic functions.
Nouns
- Example noun: English noun goose table (Z36617)
- English noun table from Lexeme (Z36607): constructs a syntactic table for an English noun from an English noun Lexeme
- English noun table from Lexeme reference (Z36754): constructs a syntactic table for an English noun from an English noun Lexeme reference
- English noun table from singular and plural (Z36759): constructs an English noun Syntactic table from the singular and plural individually given. Useful for irregular plurals.
- English noun table from string (Z36762): constructs an English noun Syntactic table from a string for the singular and creating a regular plural
- English noun table from item reference (Z36766): constructs a syntactic table for an English noun from a Wikidata item reference
- is valid English noun table (Z36770): checks if it has forms for sg and pl, no inherent, right language and pos, and ex. 1 fragment/form
- English noun tab from pos adj tab and noun tab (Z36969): Adds the positive form of an adjective to a noun to produce a new noun
- English linked noun as table from item (Z37080): given a Wikidata item reference, it creates a Syntactic table for an English noun which links to the article in English Wikipedia of that item
Determiners
- specific determiners
- English indefinite singular determiner table (Z36781): "a" or "an"
- English indefinite plural determiner table (Z36782): This is a "zero determiner", that is, it isn't actually lexicalized in English.
- English definite singular determiner table (Z36783): "the"
- English definite plural determiner table (Z36784): "the", but for plural (e.g. "the stars")
- English determiner some table (Z36791): "some"
- English grammatic determiner table (Z36785): Returns a determiner based on definiteness and number.
- English determiner table from number (Z36792): turns a natural number into an English determiner
Noun phrase
- English noun phrase table from det tab and n tab (Z36798): creates noun phrases such as "a house", "the cat", "seven little dwarves", etc.
- English noun phrase tab from named item reference (Z36925): given a Wikidata item, it returns the noun phrase referring to it by name. E.g. "Paris", "The Seine", "France", "The Eiffel Tower", etc.
- English noun phrase table from noun table (Z36935): give it a Syntactic table with a noun, needs to choose whether singular or plural, and returns a noun phrase without articles
Adjective
- example adjective: English adjective table hungry (Z36968)
- English adjective table from three strings (Z36972): Constructs a Syntactic table for English adjectives from explicitly given positive, comparative, and superlative forms
- English adjective table from positive (Z36975): constructs a Syntactic table for English adjective from a single string for the positive, and creating the comparative and superlative automatically
- English adjective table from Lexeme (Z36978): given a Wikidata Lexeme for an English adjective, this constructs a Syntactic table for an English adjective
- English adjective table from item (Z37076): given a QID, create a Syntactic table for an English adjective that offers an adjective connected to the item
Sentence
- English instantiate pres a n phrase tab as n tab (Z37083): Given a noun phrase NP and a noun N, this creates a sentence that says that NP is an N
- English instantiate past a n phrase tab as n tab (Z37086): Given a noun phrase NP and a noun N, this creates a sentence that says that NP was an N
- English instantiate present from 2 noun phrase tab (Z36939): creates an instantiating sentence in the present tense from two noun phrases, e.g. "Paris is a city", "A tiger is a mammal", "Brač is a beautiful island", etc.
- English instantiate past from 2 noun phrase tab (Z36953): creates an instantiating sentence in the past tense from two noun phrases, e.g. "Rome was an empire.", "Giant sloths were omnivores.", "Marie Curie was a scientist.", etc.
Syntactic phrase functions
Functions for building anonymous functions
nouns
- fragment from singular and plural and number (Z39425): given a string for the singular and one for the plural, chooses based on the third value which is a grammatical number, and returns a listed HTML fragment
- English noun fragment from string (Z39430): given the singular form, returns the regular plural or just the unchanged singular form, depending on what you ask
- English or French noun fragment from Lexeme (Z39437): given an English or French noun Lexeme, this creates a function that can select the grammatical number and then returns a listed fragment
- English or French noun fragment from Item ref (Z40299): given a Wikidata Item Reference and the grammatical number this returns the fragments that realises the Wikidata Item reference in English
- English noun from singular and plural (Z40335): given a string for the singular and one for the plural, gives a syntactic phrase function that waits for the grammatical number
- English noun from single string (Z40344): given a string for the singular (making the regular plural), gives a syntactic phrase function that waits for the grammatical number
- English noun from Lexeme (Z40374): given a Lexeme for an English noun gives a syntactic phrase function that waits for the grammatical number
- English noun from Item (Z40378): given a Wikidata Item reference gives a syntactic phrase function to realise that item reference that needs the grammatical number
determiner
- English indefinite singular determiner function (Z40382): a syntactic phrase function for the English indefinite singular determiner, i.e. a or an (note that it turns to "an" in the function that makes it a noun phrase)
- English indefinite singular determiner (Z40389): a or an, although that's implemented by the noun phrase merge. has definiteness to make the merge faster.
- English definite singular determiner (Z40391): the - a syntactic phrase function representing the English definite singular determiner
- English indefinite plural determiner (Z40421): a syntactic phrase function representing the English definite plural determiner. Note that in English there's nothing.
- English definite plural determiner (Z40419): the - a syntactic phrase function representing the English definite plural determiner
- English some plural determiner (Z40423): a syntactic phrase function representing the English "some" plural determiner.
- English number determiner (Z40427): given a number, this returns the syntactic phrase function for this number as an English determiner. Written out until 20, as digits afterwards.
adjective
- fragment for Engl adjective from 3 forms & degree (Z41157): given a string for the normal, comparative and superlative, the function chooses based on the degree, and returns a listed HTML fragment
- fragment for Engl adjective from string & degree (Z41204): given a string for the normal, the function chooses based on the degree, and returns a listed HTML fragment. The comparative and superlative are regularly formed.
- fragment for Engl adjective from Lex ref & degree (Z41251): given a Lexeme reference to an English adjective, the function chooses based on the degree, and returns a listed HTML fragment
- fragment for Engl adjective from Lexeme & degree (Z41304): given a Lexeme to an English adjective, the function chooses based on the degree, and returns a listed HTML fragment
- fragment for English adjective from item & degree (Z41266): given a Wikidata item, it finds the English adjective lexeme, and then the function chooses a form based on the degree, and returns it as a listed HTML fragment
- English positive adjective from lexeme (Z41311): creates a syntactic phrase function for an English adjective from the lexeme of an English adjective
- English positive adjective from item (Z41322): creates a syntactic phrase function for an English adjective from a Wikidata item
- add English adjective to English noun (Z41392): add an syntactic phrase function for an adjective to a syntactic phrase function for a noun to get a new syntactic phrase function that behaves like a noun
noun phrase
- English noun phrase from determiner and noun (Z40395): given a syntactic phrase function for the determiner and a syntactic phrase function for the noun, this returns the syntactic phrase function for the English noun phrase
- English noun phrase from item for named entity (Z40457): given a Wikidata Item Reference, this creates the Syntactic Phrase Function that realises the Item. E.g. "the Pacific Ocean" or "Lagos" etc.
clause
- English present describing clause from 2 np (Z40440): given two syntactic phrase functions for the subject and object, this creates a new one for the clause "subject is object"
- English past describing clause from 2 np (Z40450): given two syntactic phrase functions for the subject and object, this creates a new one for the clause stating "subject was object"
- English describing clause from np and noun (Z40505): given a syntactic function for a noun phrase as the instance and a syntactic function for the noun as the description, returns a syntactic function giving the clause "instance is description"
- English describing past clause from np and noun (Z40550): given a syntactic function for a noun phrase as the instance and a syntactic function for the noun as the description, returns a syntactic function giving the clause "instance was description"