|
1 | 1 | --- |
2 | 2 | - include: "../../definitions.yaml" |
3 | 3 |
|
4 | | -# If an "intent" is used, the 'terse:medium:verbose' speech for the intent name is given here for a prefix||infix||postfix||function fixity |
5 | | -# If only one ":" is used, the first part is used for 'terse' and the second part is used for 'medium' and 'verbose' |
6 | | -# If no ":"s are used, the same speech is used for all forms |
7 | | -# If bracketing words make sense, they are separated with ";"s |
8 | | -# Intent mappings must specify whether they are "prefix", "infix", "postfix", or "function" with an "=" sign |
9 | | -# If there are multiple fixities (e.g., see transpose), they are separated with "||" |
10 | | -# for readability, spaces can be used around any of the delimiter characters |
11 | | -# Note: if there are multiple fixities, the first one is used if the fixity is not given in the intent |
| 4 | +# IntentMappings Syntax: |
| 5 | +# |
| 6 | +# This section defines how each "intent" is spoken for various grammatical forms (fixities such as "prefix", "infix", "postfix", and "function"), |
| 7 | +# along with supporting different verbosity levels. |
| 8 | +# The syntax is a little bit complicated, but allows a declarative syntax so you don't have to write as many rules. |
| 9 | +# |
| 10 | +# For each intent, you specify spoken forms for one or more fixities using the syntax below. |
| 11 | +# |
| 12 | +# - Each mapping has the form: |
| 13 | +# "<intent>": "<fixity1>=<speech1> || <fixity2>=<speech2> || ...", |
| 14 | +# or just |
| 15 | +# "<intent>": "<speech>", |
| 16 | +# where <speech> is used for all forms if fixity and '=' are omitted. |
| 17 | +# |
| 18 | +# - If an intent has multiple fixities, separate them with "||". Spaces are allowed around delimiters for readability. |
| 19 | +# - If only one ":" is present in *<speech>*, it provides the 'terse' form, and the following string is used for both 'medium' and 'verbose'. |
| 20 | +# - If more than one ":" is present, the string is split into 'terse', 'medium', and 'verbose' forms, in that order (each separated by ":"). |
| 21 | +# - If no ":" is present, the same spoken form is used for all styles. |
| 22 | +# |
| 23 | +# - Use semicolons ";" to divide opening, main, and closing bracketing words within a speech string, where such words make sense. |
| 24 | +# - If an intent has multiple fixities but a definition does not specify one, the first fixity listed is chosen by default. |
| 25 | +# |
| 26 | +# Functions and argument glue: |
| 27 | +# - The "|" character delimits options describing how to glue arguments together when speaking function arguments. |
| 28 | +# - Arity templates (multiple "|" options, or one option with ','-separated glue words): glue-word count |
| 29 | +# implies arity; the final argument is preceded by "of". Example: "sum | over | from,to" |
| 30 | +# - 1 arg: "sum of x" |
| 31 | +# - 2 args: "sum over i of x" |
| 32 | +# - 3 args: "sum from i to n of x" |
| 33 | +# If no option matches the argument count, separators fall back to "comma". |
| 34 | +# - Binary separator (exactly one "|" option, no commas in it): after "of", that word joins the two args. |
| 35 | +# Example: "quotient": "function=integer part | divided by" → "integer part of x divided by y" |
| 36 | +# If there are not exactly two args, separators fall back to "comma" (no real n-ary use of these words). |
| 37 | +# |
| 38 | +# BNF-like description: |
| 39 | +# |
| 40 | +# IntentMappingsEntry ::= <intent> ":" <intent_speech> |
| 41 | +# |
| 42 | +# <intent_speech> ::= <fixity_speech> ( "||" <fixity_speech> )* |
| 43 | +# | <simple_speech> |
| 44 | +# |
| 45 | +# <fixity_speech> ::= <fixity> "=" <speech_options> |
| 46 | +# |
| 47 | +# <fixity> ::= "prefix" | "infix" | "postfix" | "function" | "nofix" | "silent" |
| 48 | +# |
| 49 | +# <speech_options> ::= <speech_string> |
| 50 | +# | <speech_string> "|" <arg_glue> ( "|" <arg_glue> )* |
| 51 | +# |
| 52 | +# <speech_string> ::= text |
| 53 | +# # May use ":" to separate terse:medium:verbose forms. |
| 54 | +# # May use ";" for bracketing (opening; main; closing). |
| 55 | +# |
| 56 | +# <arg_glue> ::= text |
| 57 | +# # One option, no commas: binary separator after "of" (e.g. "divided by"). |
| 58 | +# # One option with "," or several "|" options: arity templates |
| 59 | +# # (glue-word count = arg_count - 1; last arg preceded by "of"). |
| 60 | +# # Unmatched arity (or binary glue with ≠2 args): fall back to "comma". |
| 61 | +# |
| 62 | +# <simple_speech> ::= <speech_string> (applies to all fixities) |
| 63 | +# |
| 64 | +# Example: |
| 65 | +# "absolute-value": "function= ; absolute value: the absolute value: the absolute value; end absolute value" |
| 66 | +# "sum": "function=sum | over | from,to" |
| 67 | +# "quotient": "function=integer part | divided by" |
| 68 | +# |
12 | 69 | - IntentMappings: { |
13 | 70 | "indexed-by": "infix= alsó index kezdete; alsó index; alsó index vége: alsó index vége: alsó index vége", |
14 | 71 | "say-super": "infix=felső index: felső index: felső index", # used with 'mo' for superscripts (e.g, "<") |
|
30 | 87 | #"fraction":"function=fraction; over; end fraction", # NOTE: Fails |
31 | 88 | "mixed-fraction":"infix=és", # NOTE: in website says function, but follow infix speech pattern. |
32 | 89 | "greatest-common-divisor": "function=a legnagyobb közös osztó", |
33 | | - "quotient":"function=egész rész osztva", # NOTE: Logic somewhere here failing, becomes "divided by of x comma, y" instead of "integer part of x divided by y" |
| 90 | + "quotient":"function=egész rész | osztva", # NOTE: Logic somewhere here failing, becomes "divided by of x comma, y" instead of "integer part of x divided by y" |
34 | 91 | "evaluated-at":"infix=értékelve || postfix=értékként", |
35 | | - "remainder":"function=a maradék, osztva", |
| 92 | + "remainder":"function=a maradék | osztva", |
36 | 93 | "max":"function=max", |
37 | 94 | "min":"function=min", |
38 | 95 | "power":"infix=a hatványra", |
39 | 96 | "root":"function=root", |
40 | | - "imaginary-part": "a képzeletbeli rész", |
| 97 | + "imaginary-part": "function=a képzeletbeli rész: a képzeletbeli rész: a képzeletbeli rész", |
41 | 98 | "least-common-multiple": "function=lcm: a legkisebb közös többszörös: a legkisebb közös többszörös", |
42 | 99 | "complex-conjugate":"function=Komplex konjugált", |
43 | 100 | "complex-arg":"function=argumentum", |
|
74 | 131 | "tends-to-from-below":"infix=alulról indul", |
75 | 132 | ### Sets |
76 | 133 | "set": "function= ; halmaz: a halmaz", |
77 | | - "set-difference":"function=különbséghalmaz || infix=mínusz || postfix=különbséghalmaza", # NOTE: not tested |
| 134 | + "set-difference":"function=különbséghalmaz | és || infix=mínusz", |
78 | 135 | "complement":"function=komplemens", |
79 | | - "empty-set":"function=üres halmaz", |
| 136 | + "empty-set":"nofix=üres halmaz", |
80 | 137 | "cardinality":"function=számosság", # NOTE: does not have a defined speech template in website |
81 | 138 | "list":"function=lista", |
82 | 139 | "tuple": "function= ; tuple: a tuple", |
83 | 140 | ### Sequence and Series |
84 | | - "sum":"function= ; összegzés : összeg ; ", #: sum over : sum from; to", |
85 | | - "product":"function=szorzat || function=szorzat vége || function=szorzat innen ide", |
| 141 | + "sum": "function=összeg", |
| 142 | + "product":"function=szorzat", |
86 | 143 |
|
87 | 144 | ### Elementary classical functions |
88 | 145 | "sine":"function=szinusz: szinusz", |
|
118 | 175 | "variance":"function=variencia", |
119 | 176 | "median":"function=medián", |
120 | 177 | "mode":"function=mód", |
121 | | - "conditional-probability":"function=valószínűség; adott", # NOTE: Check test |
| 178 | + "conditional-probability":"function=valószínűség", |
122 | 179 |
|
123 | 180 |
|
124 | 181 | ### Linear Algebra |
|
133 | 190 | "unit-vector":"prefix=egységvektor", |
134 | 191 |
|
135 | 192 | "identity-matrix":"nofix=identitásmátrix", # NOTE: no function specified |
136 | | - "transpose":"function=transzponált || postfix=transzponált", # postfix needs testing |
| 193 | + "transpose":"postfix=transzponált || function=transzponált", |
137 | 194 | "dimensional-product":"infix=a(z)", # INFIX |
138 | 195 |
|
139 | 196 |
|
|
164 | 221 | ### General Concepts |
165 | 222 | "fenced-group":"function=bekerített csoport", # appears both under general concepts and grouping |
166 | 223 | # NOTE: in site mentions "the pair x and y", due to being defined as function, needs the "of" keyword |
167 | | - "ordered-pair": "function= ; a pár; és", # Needs to be tested, test converts "and" to "comma," |
| 224 | + "ordered-pair": "function=a pár | és", # Needs to be tested, test converts "and" to "comma," |
168 | 225 | "highlight":"postfix=kiemelt", |
169 | 226 | "least-common-denominator":"function=legkisebb közös nevező", |
170 | 227 | "rate":"infix=per", |
| 228 | + "translation":"function=fordítás", |
171 | 229 | "constraint":"infix= ; feltétellel; ", |
172 | 230 |
|
173 | 231 | "binomial-coefficient":"infix=választ", |
|
269 | 327 | ## Default fixity nofix |
270 | 328 | "diameter":"nofix=átmérő: átmérő", |
271 | 329 | "distance":"nofix=távolság; távolság: távolság", |
272 | | - "probability":"nofix=P: valószínűség", |
| 330 | + "probability":"nofix=P: valószínűség || function=valószínűség", |
273 | 331 | "radius":"nofix=r: sugár", |
274 | 332 | "volume":"nofix=hangerő: hangerő || function=hangerő", |
275 | 333 | "exponential-e":"nofix=e", |
|
0 commit comments