Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
Jump to content

Wikifunctions:Catalogue

From Wikifunctions

This is a guided list of example functions provided. See also the complete list of functions and Wikifunctions:Suggest a function.

Logic operators

These are the fundamental tools to control flow in your functions.

Boolean operations

These are the basic blocks from which to build logic states.

Boolean pairwise functions

2 nullary Boolean functions
Name ZID Value
nullary false nullary false (Z10206) F
nullary true nullary true (Z10210) T
4 unary Boolean functions
Name ZID F T
unary false unary false (Z10214) F F
identity Boolean identity (Z10215) F T
not not (Z10216) T F
unary true unary true (Z10217) T T
16 binary Boolean functions
Name ZID F ∗ F F ∗ T T ∗ F T ∗ T
binary false binary false (Z10257) F F F F
and and (Z10174) F F F T
not (A → B) not boolean implication (Z10962) F F T F
A Boolean Left (Z10265) F F T T
not (B → A) not backwards Boolean implication (Z10964) F T F F
B Boolean Right (Z10298) F T F T
xor Boolean inequality (Z10237) F T T F
or or (Z10184) F T T T
nor nor (Z10231) T F F F
xnor/eqv Boolean equality (Z844) T F F T
not B Boolean Not Right (Z10306) T F T F
B → A backwards Boolean implication (Z10348) T F T T
not A Boolean Not Left (Z10272) T T F F
A → B Boolean implication (Z10329) T T F T
nand nand (Z10243) T T T F
binary true Binary True (Z10287) T T T T

Sign operations

String operations

String evaluation operations

These functions perform simple tests on a text string to tell you if something else needs to be done, or they already are in an expected format.

String comparison operations

String discard functions

String character discard functions

These reduce a string by discarding certain characters.

Simple String transformations

These perform character replacements and other basic operations.

Replace suffix

Add string suffix if not already present

Other transformations

Color operations

String presentation transformations

Uncommon String operations

These functions perform more advanced transformations, hold more states and showcase the more advanced capabilities of Wikifunctions.

String classical cipher functions

(alphabet needs to be specified when calling these functions)

Cryptographic hash functions

(would be better with types representing a stream of bytes)

Experimental String operations

TODO: Explain why these exist and when people might use them.

Wikitext and Mediawiki string operations

Comma-separated operations

  • string is element of CSV (Z11094): tests whether a string is an element of a validly formatted (RFC 4180) comma-separated value series (single row, not whole file); be careful to validly interpret a CSV with quoted fields

Scientific functions

Place functions to their fields of study.

Biology/Health

  • blood compatibility (Z14469): checks whether two blood groups are compatible with each other, determining if the donation or receipt of blood is possible; this assumes the absence of atypical antibodies
  • blood group inheritance (Z14473): calculates child's blood group based on parent one and parent two genotype blood groups; A and B are co-dominant, while O is recessive

Chemistry

Computer/Network

Natural language operations

See context in m:Abstract Wikipedia/Updates/2023-09-08.

global language functions

Bangla

General

Grammatical & Morphological

  • genitive case of Bangla word (Z10591): Returns the genitive case of a Bangla word
  • Classical to standard Bengali (Z11077): Converts a classical Bengali word to standard Bengali.
  • Is Bangla Vowel or Consonant (Z12919): Returns is the string is a Bangla vowel, consonant or a mixture of both.
  • Bangla matra (diacritic) type (Z13156): Returns the type of matra present in the input string. If the input contains multiple types of matras, it returns 'Mixed'.
  • Bangla consonant type (articulation point) (Z13195): ইনপুটে উপস্থিত ব্যাঞ্জনবর্ণ গুলোর উচ্চারণের স্থান অনুযায়ী তাদের বর্ণের প্রকার প্রদর্শন করে, গননা সহিত। যদি স্পর্শবর্ণ তাহলে ধ্বনির প্রকারও গননা করতে সক্ষম।
  • Bangla consonant type (pronunciation) (Z13238): উচ্চারণ রীতির বৈশিষ্ট্য অনুযায়ী, ইনপুটের ব্যঞ্জনবর্ণ গুলোর প্রকার ও তাদের গননা প্রদর্শন করে
  • Bangla vowels type (Z13270): ইনপুটে উপস্থিত স্বরবর্ণের ধরণ যাচাই ও গননা করে, উচ্চারণ অনুসারে। কোনো ব্যাঞ্জনবর্ণ গননা করবে না, সেটার জন্য দেখুন Z13238।
  • Bengali -এর suffix form (Z18831): Adds an 'এর' (or 'ের') to a Bengali word. 'এর' in Bengali is similar to 's (Apostrophe) in English.
  • Bengali -এরা suffix form (Z18837): Adds an 'এরা' (or 'েরা') to a Bengali word.
  • Bengali -গুলো suffix form (Z18881): Adds a 'গুলো' suffix to a Bengali word if it doesn't end with 'গুলো', 'গুলা', or 'গুলি'.

Basque

Brahui

Breton

General

For Breton nouns

Compositions
ending soft hard aspirant
Breton plural in -où and soft mutation (Z11637) Breton plural in -où and hard mutation (Z11660) Breton aspirant plural in -où (Z11663)
-ioù Breton plural -ioù and soft mutation (Z11786) Breton plural in –ioù with hard mutation (Z12281) Breton aspirant plural in -ioù (Z12284)
-ed Breton plural in -ed and soft mutation (Z12288) Breton plural in -ed and hard mutation (Z12291) Breton plural in -ed and aspirant mutation (Z12295)
-ien Breton plural in -ien and soft mutation (Z12298) Breton plural in -ien and hard mutation (Z12301) Breton plural in -ien and aspirant mutation (Z12305)

For Breton verbs

Breton conjugation
Person Indicative Conditional Imperative
Present Imperfect Preterite Future Present Past
1st singular Breton conjugation present 1st person singular (Z12320) Breton conjugation imperfect 1st person singular (Z12366) Breton conjugation preterite 1st person singular (-is) (Z12448)
Breton conjugation preterite 1st person singular (-jon) (Z12451)
Breton conjugation future 1st person singular (Z12342) Breton conjugation present conditional 1st person singular (Z12528) 1st person singular past conditional conjugation in Breton (Z12551) NA
2nd singular Breton conjugation present 2nd person singular (Z12323) Breton conjugation imperfect 2nd person singular (Z12369) Breton conjugation preterite 2nd person singular (Z12454) Breton conjugation future 2nd person singular (Z12345) Breton conjugation present conditional 2nd person singular (Z12533) Breton conjugation past conditional 2nd person singular (Z12554) Z
3rd singular Breton conjugation present 3rd person singular (Z12326) Breton conjugation imperfect 3rd person singular (Z12372) Breton conjugation preterite 3rd person singular (Z12457) Breton conjugation future 3rd person singular (Z12348) Breton 3rd person singular present conditional form (Z12536) Breton conjugation past conditional 3rd person singular (Z12557) Z
1st plural Breton conjugation present 1st person plural (Z12330) Breton conjugation imperfect 1st person plural (Z12375) Breton conjugation preterite 1st person plural (Z12460) Breton conjugation future 1st person plural (Z12357) Breton conjugation present conditional 1st person plural (Z12539) Breton conjugation past conditional 1st person plural (Z12560) Z
2nd plural Breton 2nd person plural present tense (Z12333) Breton conjugation imperfect 2nd person plural (Z12378) Breton conjugation preterite 2nd person plural (Z12463) Breton conjugation future 2nd person plural (-oc'h) (Z12351)
Breton conjugation future 2nd person plural (-ot) (Z12354)
Breton conjugation present conditional 2nd person plural (Z12542) Breton conjugation past conditional 2nd person plural (Z12563) Z
3rd plural Breton conjugation present 3rd person plural (Z12336) Breton conjugation imperfect 3rd person plural (Z12381) Breton conjugation preterite 3rd person plural (Z12466) Breton conjugation future 3rd person plural (Z12360) Breton conjugation present conditional 3rd person plural (Z12545) Breton conjugation past conditional 3rd person plural (Z12566) Z
0 Breton conjugation present person 0 (Z12339) Breton conjugated form (Z12384) Breton conjugation preterite person 0 (Z12469) Breton conjugation future person 0 (Z12363) Breton conjugation present conditional person 0 (Z12548) Breton conjugation past conditional person 0 (Z12569) NA

TODO: conjugated form in 4 mutations

Croatian

The percentages in the table, if given, state for how many of the lexemes in Wikidata the functions are correct. The percentages have been calculated using the this Paws Notebook.

regular inflections of nouns
feminine masculine neuter
case singular plural singular plural singular plural
nominative 100% 95% 98% 50% 100% 85%
genitive 97% 82% 83% 63% 88% 74%
dative 91% 95% 81% 47% 88% 85%
accusative 95% 94% 79% 53% 94% 85%
vocative 85% 95% 44% 49% 95% 85%
locative 90% 94% 82% 47% 88% 85%
instrumental 88% 94% 66% 47% 85% 85%
regular inflections of adjectives
positive definite feminine masculine neuter
case singular plural singular plural singular plural
nominative Z12578
genitive Z12587
dative
accusative animate
inanimate
vocative
locative
instrumental
positive indefinite feminine masculine neuter
case singular plural singular plural singular plural
nominative
genitive
dative
accusative animate
inanimate
vocative
locative
instrumental
comparative feminine masculine neuter
case singular plural singular plural singular plural
nominative
genitive
dative
accusative animate
inanimate
vocative
locative
instrumental
superlative feminine masculine neuter
case singular plural singular plural singular plural
nominative
genitive
dative
accusative animate
inanimate
vocative
locative
instrumental

Dagbani

  • Is some string(s) containing a Dagbani character?

Dutch

English

Esperanto

Finnish

French

German

(These generally correspond to more than one form.)

Hindustani

Verb

Igbo

Japanese

  • is hiragana (Z10878): Given a single-character string, returns boolean for whether it is an hiragana or not.
  • is katakana (Z10883): Given a character, returns boolean for whether it is a katakana or not.
  • is Han character (Z10927): Given a character, returns boolean for whether it is a Han character (hanzi, kanji, hanja) or not.

New Persian

Considering together Iranian, Afghan, and Tajik Persian or Dari in the Arabic, Cyrllic, Latin, Hebrew or other scripts.

Noun

Korean

Hangul

Kurdish

Polish

  • Polish cardinal (Z15965): перетворює число на його текстову форму польською мовою

Punjabi

Missing functions will be filled in as they are completed.

Nominal

  • masculine direct case plural, oblique case singular
  • masculine oblique case plural
    • Gurmukhi ā > iā~
    • Shahmukhi ā > iā~
  • masculine oblique case plural (perfect participle)
    • Gurmukhi ā > iā~/e
    • Shahmukhi ā > iā~/e
  • masculine vocative case singular
    • Gurmukhi ā > iā
    • Shahmukhi ā > iā
  • masculine vocative case plural
    • Gurmukhi ā > io
    • Shahmukhi ā > io
  • masculine ablative
    • Gurmukhi ā > io~
    • Shahmukhi ā > io~
  • feminine direct case plural, oblique case plural
    • Gurmukhi +ā~
    • Shahmukhi +ā~
  • feminine vocative case singular
    • Gurmukhi +e
    • Shahmukhi +e
  • feminine vocative case plural
    • Gurmukhi +o
    • Shahmukhi +o
  • feminine ablative
    • Gurmukhi +o~
    • Shahmukhi +o~

Verb

  • common forms
    • gerund
    • conjunctive participle
    • absolute construction
    • potential participle
    • imperfect participle
      • Pothohari forms in -n-
    • perfect participle
    • subjunctive
    • imperative
  • subtractive phase
    • imperfect participle
  • Charhdi definite subjunctive
    • colloquial first person singular, third person singular
    • gendered personal series
  • Lehndi future
  • Lehndi passive
    • passive gerund
    • imperfect passive participle
    • impersonal passive
    • Jatki + Shahpuri passive subjunctive
    • Jatki + Shahpuri passive future

Rohingya

General

Noun

The ergative case function can serve as one for the instrumental case where applicable.

Russian

Serbian

Sindhi

Noun

Swedish

See draft functions.

Turkish

Ukrainian

List operations

Basic list/iterable functions

Complex list/iterable functions

Functions with list outputs

A list argument returned by a Python or JavaScript implementation is given the Type appropriate for the elements in that list. A specific Type of list may be specified in the function specification, and an error will occur if the list returned contains elements of any different Type. Note that an untyped (Z1-typed) list will not be returned if all its elements have the same Type; untype a list (Z17895) will convert any type of list to a Z1-typed list, where this is required.

In-built functions with list outputs

These operate on object-typed lists, so may not need a different version for each type. However, code implementations cannot currently generate lists of objects (other than string/boolean). So code implementations will not work on these functions.

Character operations

Natural number operations

Numeric Characteristics

Comparisons

Selections

Arithmetic Functions

Natural number sequences and unary natural number functions

See Wikifunctions:OEIS

Bitwise Functions

Number conversions

Integer functions

Integer functions using set-theoretic representation with pairs of natural numbers

see w:Integer#Equivalence classes of ordered pairs

Integer sequence and unary integer functions

See Wikifunctions:OEIS

Number operations requiring future types

Types such as floating point or negative integers would benefit these functions.

Numeric Characteristics

Arithmetic Functions

Trigonometric Functions

Health Functions

Geometric Functions

  • (!) linear interpolation (Z13341): one dimensional linear interpolation given points a,b and input t (0,1) see: https://en.wikipedia.org/wiki/Linear_interpolation for attribution

These would benefit from a float type.

Distance functions

Physics functions

Randomness

Reminder that Wikifunctions does not support randomness for now. We always expect all functions to return functional, deterministic results, only dependent on the input. This is in order to allow for aggressive caching. see Wikifunctions:Project_chat/Archive/2023/09#Help_please.

Day of the week

Month operations

Gregorian months

Igbo months

Date operations

Gregorian era

Bengali date operations

Persistent object operations

Note that there are currently some bugs in the handling of persistent objects, especially in tests. See [1]

Generic object operations

Note that due to handling all types of objects, most of these functions have bugs

  • Echo (Z801): returns the argument unchanged
  • Value by key (Z803): returns the value (Object) associated with the specified Key reference
  • Values by keys (Z804): returns the values (Object) associated with the specified list of Key references
  • Reify (Z805): Returns a list of key-value pairs representing the object given
  • Abstract (Z808): Takes a list of key-value pairs representing an object and returns the corresponding object
  • object equality (Z13052): takes two objects as arguments and tests if they are exactly equal including same type representation (when mapped to python) and their types have an unambiguous concept of equality
  • object type equality (Z15801): returns True if two objects are of the same type
  • strict object equality (Z18683): requires both object type equality (Z15801) and object equality (Z13052)

Type handling

Functional operations

Note that functions as argument or return types are not fully supported yet. See [2]

Programming

Functions that are directly related to programming languages.

  • python help (Z18722): Helps developers to know how many "modules", "keywords", "symbols" and "symbol names" Python currently has.

See also