diff options
Diffstat (limited to '')
-rw-r--r-- | swedish.test.c | 1207 |
1 files changed, 707 insertions, 500 deletions
diff --git a/swedish.test.c b/swedish.test.c index 3478660..b3bd4a3 100644 --- a/swedish.test.c +++ b/swedish.test.c @@ -1,528 +1,735 @@ /* See LICENSE file for copyright and license details. */ -#include "libnumtext.h" -#include <errno.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> +#include "common.h" #define F(FLAG) LIBNUMTEXT_N2T_SWEDISH_##FLAG +#define ORD F(ORDINAL) -#define _6 "000000" -#define _6_0 "" -#define _6_1 _6 -#define _6_2 _6 _6 -#define _6_3 _6 _6 _6 -#define _6_4 _6 _6 _6 _6 -#define _6_5 _6 _6 _6 _6 _6 -#define _6_6 _6 _6 _6 _6 _6 _6 -#define _6_7 _6 _6 _6 _6 _6 _6 _6 -#define _6_8 _6 _6 _6 _6 _6 _6 _6 _6 -#define _6_9 _6 _6 _6 _6 _6 _6 _6 _6 _6 -#define _60 _6_9 _6 -#define _60_0 "" -#define _60_1 _60 -#define _60_2 _60 _60 -#define _60_3 _60 _60 _60 -#define _60_4 _60 _60 _60 _60 -#define _60_5 _60 _60 _60 _60 _60 -#define _60_6 _60 _60 _60 _60 _60 _60 -#define _60_7 _60 _60 _60 _60 _60 _60 _60 -#define _60_8 _60 _60 _60 _60 _60 _60 _60 _60 -#define _60_9 _60 _60 _60 _60 _60 _60 _60 _60 _60 -#define _600 _60_9 _60 -#define _600_1 _600 -#define _600_2 _600 _600 -#define _600_3 _600 _600 _600 -#define _600_4 _600 _600 _600 _600 -#define _600_5 _600 _600 _600 _600 _600 -#define _600_6 _600 _600 _600 _600 _600 _600 -#define _600_7 _600 _600 _600 _600 _600 _600 _600 -#define _600_8 _600 _600 _600 _600 _600 _600 _600 _600 -#define _600_9 _600 _600 _600 _600 _600 _600 _600 _600 _600 static struct test { const char *num; + size_t zeroes; const char *expect; uint32_t flags; } tests[] = { - {"0", "noll", 0}, - {"1", "ett", 0}, - {"2", "två", 0}, - {"3", "tre", 0}, - {"4", "fyra", 0}, - {"5", "fem", 0}, - {"6", "sex", 0}, - {"7", "sju", 0}, - {"8", "åtta", 0}, - {"9", "nio", 0}, - {"10", "tio", 0}, - {"11", "elva", 0}, - {"12", "tolv", 0}, - {"13", "tretton", 0}, - {"14", "fjorton", 0}, - {"15", "femton", 0}, - {"16", "sexton", 0}, - {"17", "sjutton", 0}, - {"18", "arton", 0}, - {"19", "nitton", 0}, - {"20", "tjugo", 0}, - {"21", "tjugoett", 0}, - {"22", "tjugotvå", 0}, - {"23", "tjugotre", 0}, - {"28", "tjugoåtta", 0}, - {"29", "tjugonio", 0}, - {"30", "trettio", 0}, - {"31", "trettioett", 0}, - {"32", "trettiotvå", 0}, - {"40", "fyrtio", 0}, - {"43", "fyrtiotre", 0}, - {"50", "femtio", 0}, - {"54", "femtiofyra", 0}, - {"60", "sextio", 0}, - {"65", "sextiofem", 0}, - {"70", "sjuttio", 0}, - {"76", "sjuttiosex", 0}, - {"80", "åttio", 0}, - {"87", "åttiosju", 0}, - {"90", "nittio", 0}, - {"98", "nittioåtta", 0}, - {"99", "nittionio", 0}, - {"100", "etthundra", 0}, - {"101", "etthundraett", 0}, - {"110", "etthundratio", 0}, - {"111", "etthundraelva", 0}, - {"120", "etthundratjugo", 0}, - {"121", "etthundratjugoett", 0}, - {"999", "niohundranittionio", 0}, - {"1000", "ettusen", 0}, - {"1001", "ettusenett", 0}, - {"1002", "ettusentvå", 0}, - {"1100", "ettusenetthundra", 0}, - {"1101", "ettusenetthundraett", 0}, - {"1123", "ettusenetthundratjugotre", 0}, - {"2000", "tvåtusen", 0}, - {"3000", "tretusen", 0}, - {"4000", "fyratusen", 0}, - {"5000", "femtusen", 0}, - {"8000", "åttatusen", 0}, - {"9000", "niotusen", 0}, - {"10000", "tiotusen", 0}, - {"11000", "elvatusen", 0}, - {"20000", "tjugotusen", 0}, - {"21000", "tjugoettusen", 0}, /* "tjugoentusen" is actually incorrect (it's colloquial) */ - {"30000", "trettiotusen", 0}, - {"31000", "trettioettusen", 0}, - {"32000", "trettiotvåtusen", 0}, - {"40001", "fyrtiotusenett", 0}, - {"40010", "fyrtiotusentio", 0}, - {"40012", "fyrtiotusentolv", 0}, - {"50100", "femtiotusenetthundra", 0}, - {"50200", "femtiotusentvåhundra", 0}, - {"50210", "femtiotusentvåhundratio", 0}, - {"50240", "femtiotusentvåhundrafyrtio", 0}, - {"50248", "femtiotusentvåhundrafyrtioåtta", 0}, - {"100000", "etthundratusen", 0}, - {"100001", "etthundratusenett", 0}, - {"100014", "etthundratusenfjorton", 0}, - {"100020", "etthundratusentjugo", 0}, - {"100026", "etthundratusentjugosex", 0}, - {"100100", "etthundratusenetthundra", 0}, - {"100200", "etthundratusentvåhundra", 0}, - {"100210", "etthundratusentvåhundratio", 0}, - {"100247", "etthundratusentvåhundrafyrtiosju", 0}, - {"101000", "etthundraettusen", 0}, - {"102000", "etthundratvåtusen", 0}, - {"110000", "etthundratiotusen", 0}, - {"118000", "etthundraartontusen", 0}, - {"130000", "etthundratrettiotusen", 0}, - {"182000", "etthundraåttiotvåtusen", 0}, - {"300000", "trehundratusen", 0}, - {"1""000000", "enmiljon", 0}, - {"1""200000", "enmiljontvåhundratusen", 0}, - {"2""000000", "tvåmiljoner", 0}, - {"3""000000", "tremiljoner", 0}, - {"5""000000", "femmiljoner", 0}, - {"5""010000", "femmiljonertiotusen", 0}, - {"5""010100", "femmiljonertiotusenetthundra", 0}, - {"5""010111", "femmiljonertiotusenetthundraelva", 0}, - {"9""999999", "niomiljonerniohundranittioniotusenniohundranittionio", 0}, - {"10""000000", "tiomiljoner", 0}, - {"11""000000", "elvamiljoner", 0}, - {"20""000000", "tjugomiljoner", 0}, - {"100""000000", "etthundramiljoner", 0}, - {"101""000000", "etthundraenmiljoner", 0}, - {"102""000000", "etthundratvåmiljoner", 0}, - {"112""000000", "etthundratolvmiljoner", 0}, - {"160""000000", "etthundrasextiomiljoner", 0}, - {"169""000000", "etthundrasextioniomiljoner", 0}, - {"200""000000", "tvåhundramiljoner", 0}, - {"1000""000000", "enmiljard", 0}, - {"2000""000000", "tvåmiljarder", 0}, - {"20000""000000", "tjugomiljarder", 0}, - {"21000""000000", "tjugoenmiljarder", 0}, - {"100000""000000", "etthundramiljarder", 0}, - {"101000""000000", "etthundraenmiljarder", 0}, - {"101001""000000", "etthundraenmiljarderenmiljon", 0}, - {"101100""000000", "etthundraenmiljarderetthundramiljoner", 0}, - {"1""000000""000000", "enbiljon", 0}, - {"1""001000""000000", "enbiljonenmiljard", 0}, - {"1""001001""000000", "enbiljonenmiljardenmiljon", 0}, - {"1""001001""001000", "enbiljonenmiljardenmiljonettusen", 0}, - {"1""001001""001001", "enbiljonenmiljardenmiljonettusenett", 0}, - {"2""000000""000000", "tvåbiljoner", 0}, - {"1000""000000""000000", "enbiljard", 0}, - {"1"_6_3, "entriljon", 0}, - {"1000"_6_3, "entriljard", 0}, - {"1"_6_4, "enkvadriljon", 0}, - {"1"_6_5, "enkvintiljon", 0}, - {"1"_6_6, "ensextiljon", 0}, - {"1"_6_7, "enseptiljon", 0}, - {"1"_6_8, "enoktiljon", 0}, - {"1"_6_9, "ennoniljon", 0}, - {"1"_60_1 _6_0, "endeciljon", 0}, - {"1"_60_1 _6_1, "enundeciljon", 0}, - {"1"_60_1 _6_2, "enduodeciljon", 0}, - {"1"_60_1 _6_3, "entredeciljon", 0}, - {"1"_60_1 _6_4, "enkvattuordeciljon", 0}, - {"1"_60_1 _6_5, "enkvindeciljon", 0}, - {"1"_60_1 _6_6, "ensedeciljon", 0}, - {"1"_60_1 _6_7, "enseptendeciljon", 0}, - {"1"_60_1 _6_8, "enoktodeciljon", 0}, - {"1"_60_1 _6_9, "ennovendeciljon", 0}, - {"1"_60_2 _6_0, "envigintiljon", 0}, - {"1"_60_2 _6_1, "enunvigintiljon", 0}, - {"1"_60_2 _6_2, "enduovigintiljon", 0}, - {"1"_60_2 _6_3, "entresvigintiljon", 0}, - {"1"_60_2 _6_4, "enkvattuorvigintiljon", 0}, - {"1"_60_2 _6_5, "enkvinvigintiljon", 0}, - {"1"_60_2 _6_6, "ensesvigintiljon", 0}, - {"1"_60_2 _6_7, "enseptemvigintiljon", 0}, - {"1"_60_2 _6_8, "enoktovigintiljon", 0}, - {"1"_60_2 _6_9, "ennovemvigintiljon", 0}, - {"1"_60_3 _6_0, "entrigintiljon", 0}, - {"1"_60_3 _6_1, "enuntrigintiljon", 0}, - {"1"_60_3 _6_2, "enduotrigintiljon", 0}, - {"1"_60_3 _6_3, "entrestrigintiljon", 0}, - {"1"_60_3 _6_4, "enkvattuortrigintiljon", 0}, - {"1"_60_3 _6_5, "enkvintrigintiljon", 0}, - {"1"_60_3 _6_6, "ensestrigintiljon", 0}, - {"1"_60_3 _6_7, "enseptentrigintiljon", 0}, - {"1"_60_3 _6_8, "enoktotrigintiljon", 0}, - {"1"_60_3 _6_9, "ennoventrigintiljon", 0}, - {"1"_60_4 _6_0, "enkvadragintiljon", 0}, - {"1"_60_4 _6_1, "enunkvadragintiljon", 0}, - {"1"_60_4 _6_2, "enduokvadragintiljon", 0}, - {"1"_60_4 _6_3, "entreskvadragintiljon", 0}, - {"1"_60_4 _6_4, "enkvattuorkvadragintiljon", 0}, - {"1"_60_4 _6_5, "enkvinkvadragintiljon", 0}, - {"1"_60_4 _6_6, "enseskvadragintiljon", 0}, - {"1"_60_4 _6_7, "enseptenkvadragintiljon", 0}, - {"1"_60_4 _6_8, "enoktokvadragintiljon", 0}, - {"1"_60_4 _6_9, "ennovenkvadragintiljon", 0}, - {"1"_60_5 _6_0, "enkvinkvagintiljon", 0}, - {"1"_60_5 _6_1, "enunkvinkvagintiljon", 0}, - {"1"_60_5 _6_2, "enduokvinkvagintiljon", 0}, - {"1"_60_5 _6_3, "entreskvinkvagintiljon", 0}, - {"1"_60_5 _6_4, "enkvattuorkvinkvagintiljon", 0}, - {"1"_60_5 _6_5, "enkvinkvinkvagintiljon", 0}, - {"1"_60_5 _6_6, "enseskvinkvagintiljon", 0}, - {"1"_60_5 _6_7, "enseptenkvinkvagintiljon", 0}, - {"1"_60_5 _6_8, "enoktokvinkvagintiljon", 0}, - {"1"_60_5 _6_9, "ennovenkvinkvagintiljon", 0}, - {"1"_60_6 _6_0, "ensexagintiljon", 0}, - {"1"_60_6 _6_1, "enunsexagintiljon", 0}, - {"1"_60_6 _6_2, "enduosexagintiljon", 0}, - {"1"_60_6 _6_3, "entresexagintiljon", 0}, - {"1"_60_6 _6_4, "enkvattuorsexagintiljon", 0}, - {"1"_60_6 _6_5, "enkvinsexagintiljon", 0}, - {"1"_60_6 _6_6, "ensesexagintiljon", 0}, - {"1"_60_6 _6_7, "enseptensexagintiljon", 0}, - {"1"_60_6 _6_8, "enoktosexagintiljon", 0}, - {"1"_60_6 _6_9, "ennovensexagintiljon", 0}, - {"1"_60_7 _6_0, "enseptuagintiljon", 0}, - {"1"_60_7 _6_1, "enunseptuagintiljon", 0}, - {"1"_60_7 _6_2, "enduoseptuagintiljon", 0}, - {"1"_60_7 _6_3, "entreseptuagintiljon", 0}, - {"1"_60_7 _6_4, "enkvattuorseptuagintiljon", 0}, - {"1"_60_7 _6_5, "enkvinseptuagintiljon", 0}, - {"1"_60_7 _6_6, "enseseptuagintiljon", 0}, - {"1"_60_7 _6_7, "enseptenseptuagintiljon", 0}, - {"1"_60_7 _6_8, "enoktoseptuagintiljon", 0}, - {"1"_60_7 _6_9, "ennovenseptuagintiljon", 0}, - {"1"_60_8 _6_0, "enoktogintiljon", 0}, - {"1"_60_8 _6_1, "enunoktogintiljon", 0}, - {"1"_60_8 _6_2, "enduooktogintiljon", 0}, - {"1"_60_8 _6_3, "entresoktogintiljon", 0}, - {"1"_60_8 _6_4, "enkvattuoroktogintiljon", 0}, - {"1"_60_8 _6_5, "enkvinoktogintiljon", 0}, - {"1"_60_8 _6_6, "ensexoktogintiljon", 0}, - {"1"_60_8 _6_7, "enseptemoktogintiljon", 0}, - {"1"_60_8 _6_8, "enoktooktogintiljon", 0}, - {"1"_60_8 _6_9, "ennovemoktogintiljon", 0}, - {"1"_60_9 _6_0, "ennonagintiljon", 0}, - {"1"_60_9 _6_1, "enunnonagintiljon", 0}, - {"1"_60_9 _6_2, "enduononagintiljon", 0}, - {"1"_60_9 _6_3, "entrenonagintiljon", 0}, - {"1"_60_9 _6_4, "enkvattuornonagintiljon", 0}, - {"1"_60_9 _6_5, "enkvinnonagintiljon", 0}, - {"1"_60_9 _6_6, "ensenonagintiljon", 0}, - {"1"_60_9 _6_7, "enseptenonagintiljon", 0}, - {"1"_60_9 _6_8, "enoktononagintiljon", 0}, - {"1"_60_9 _6_9, "ennovenonagintiljon", 0}, - {"1"_600_1 _60_0 _6_0, "encentiljon", 0}, - {"1"_600_1 _60_0 _6_1, "enuncentiljon", 0}, - {"1"_600_1 _60_0 _6_2, "enduocentiljon", 0}, - {"1"_600_1 _60_0 _6_3, "entrescentiljon", 0}, - {"1"_600_1 _60_0 _6_4, "enkvattuorcentiljon", 0}, - {"1"_600_1 _60_0 _6_5, "enkvincentiljon", 0}, - {"1"_600_1 _60_0 _6_6, "ensexcentiljon", 0}, - {"1"_600_1 _60_0 _6_7, "enseptencentiljon", 0}, - {"1"_600_1 _60_0 _6_8, "enoktocentiljon", 0}, - {"1"_600_1 _60_0 _6_9, "ennovencentiljon", 0}, - {"1"_600_1 _60_1 _6_0, "endecicentiljon", 0}, - {"1"_600_1 _60_2 _6_0, "enviginticentiljon", 0}, - {"1"_600_1 _60_3 _6_0, "entrigintacentiljon", 0}, - {"1"_600_1 _60_4 _6_0, "enkvadragintacentiljon", 0}, - {"1"_600_1 _60_5 _6_0, "enkvinkvagintacentiljon", 0}, - {"1"_600_1 _60_6 _6_0, "ensexagintacentiljon", 0}, - {"1"_600_1 _60_7 _6_0, "enseptuagintacentiljon", 0}, - {"1"_600_1 _60_7 _6_7, "enseptenseptuagintacentiljon", 0}, - {"1"_600_1 _60_8 _6_0, "enoktogintacentiljon", 0}, - {"1"_600_1 _60_9 _6_0, "ennonagintacentiljon", 0}, - {"1"_600_1 _60_9 _6_9, "ennovenonagintacentiljon", 0}, - {"1"_600_2 _60_0 _6_0, "enducentiljon", 0}, - {"1"_600_2 _60_0 _6_1, "enunducentiljon", 0}, - {"1"_600_2 _60_0 _6_2, "enduoducentiljon", 0}, - {"1"_600_2 _60_0 _6_3, "entreducentiljon", 0}, - {"1"_600_2 _60_0 _6_4, "enkvattuorducentiljon", 0}, - {"1"_600_2 _60_0 _6_5, "enkvinducentiljon", 0}, - {"1"_600_2 _60_0 _6_6, "enseducentiljon", 0}, - {"1"_600_2 _60_0 _6_7, "enseptenducentiljon", 0}, - {"1"_600_2 _60_0 _6_8, "enoktoducentiljon", 0}, - {"1"_600_2 _60_0 _6_9, "ennovenducentiljon", 0}, - {"1"_600_3 _60_0 _6_0, "entrecentiljon", 0}, - {"1"_600_3 _60_0 _6_1, "enuntrecentiljon", 0}, - {"1"_600_3 _60_0 _6_2, "enduotrecentiljon", 0}, - {"1"_600_3 _60_0 _6_3, "entrestrecentiljon", 0}, - {"1"_600_3 _60_0 _6_4, "enkvattuortrecentiljon", 0}, - {"1"_600_3 _60_0 _6_5, "enkvintrecentiljon", 0}, - {"1"_600_3 _60_0 _6_6, "ensestrecentiljon", 0}, - {"1"_600_3 _60_0 _6_7, "enseptentrecentiljon", 0}, - {"1"_600_3 _60_0 _6_8, "enoktotrecentiljon", 0}, - {"1"_600_3 _60_0 _6_9, "ennoventrecentiljon", 0}, - {"1"_600_4 _60_0 _6_0, "enkvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_1, "enunkvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_2, "enduokvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_3, "entreskvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_4, "enkvattuorkvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_5, "enkvinkvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_6, "enseskvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_7, "enseptenkvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_8, "enoktokvadringentiljon", 0}, - {"1"_600_4 _60_0 _6_9, "ennovenkvadringentiljon", 0}, - {"1"_600_5 _60_0 _6_0, "enkvingentiljon", 0}, - {"1"_600_5 _60_0 _6_1, "enunkvingentiljon", 0}, - {"1"_600_5 _60_0 _6_2, "enduokvingentiljon", 0}, - {"1"_600_5 _60_0 _6_3, "entreskvingentiljon", 0}, - {"1"_600_5 _60_0 _6_4, "enkvattuorkvingentiljon", 0}, - {"1"_600_5 _60_0 _6_5, "enkvinkvingentiljon", 0}, - {"1"_600_5 _60_0 _6_6, "enseskvingentiljon", 0}, - {"1"_600_5 _60_0 _6_7, "enseptenkvingentiljon", 0}, - {"1"_600_5 _60_0 _6_8, "enoktokvingentiljon", 0}, - {"1"_600_5 _60_0 _6_9, "ennovenkvingentiljon", 0}, - {"1"_600_6 _60_0 _6_0, "ensescentiljon", 0}, - {"1"_600_6 _60_0 _6_1, "enunsescentiljon", 0}, - {"1"_600_6 _60_0 _6_2, "enduosescentiljon", 0}, - {"1"_600_6 _60_0 _6_3, "entresescentiljon", 0}, - {"1"_600_6 _60_0 _6_4, "enkvattuorsescentiljon", 0}, - {"1"_600_6 _60_0 _6_5, "enkvinsescentiljon", 0}, - {"1"_600_6 _60_0 _6_6, "ensesescentiljon", 0}, - {"1"_600_6 _60_0 _6_7, "enseptensescentiljon", 0}, - {"1"_600_6 _60_0 _6_8, "enoktosescentiljon", 0}, - {"1"_600_6 _60_0 _6_9, "ennovensescentiljon", 0}, - {"1"_600_7 _60_0 _6_0, "enseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_1, "enunseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_2, "enduoseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_3, "entreseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_4, "enkvattuorseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_5, "enkvinseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_6, "enseseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_7, "enseptenseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_8, "enoktoseptingentiljon", 0}, - {"1"_600_7 _60_0 _6_9, "ennovenseptingentiljon", 0}, - {"1"_600_8 _60_0 _6_0, "enoktingentiljon", 0}, - {"1"_600_8 _60_0 _6_1, "enunoktingentiljon", 0}, - {"1"_600_8 _60_0 _6_2, "enduooktingentiljon", 0}, - {"1"_600_8 _60_0 _6_3, "entresoktingentiljon", 0}, - {"1"_600_8 _60_0 _6_4, "enkvattuoroktingentiljon", 0}, - {"1"_600_8 _60_0 _6_5, "enkvinoktingentiljon", 0}, - {"1"_600_8 _60_0 _6_6, "ensexoktingentiljon", 0}, - {"1"_600_8 _60_0 _6_7, "enseptemoktingentiljon", 0}, - {"1"_600_8 _60_0 _6_8, "enoktooktingentiljon", 0}, - {"1"_600_8 _60_0 _6_9, "ennovemoktingentiljon", 0}, - {"1"_600_9 _60_0 _6_0, "ennongentiljon", 0}, - {"1"_600_9 _60_0 _6_1, "enunnongentiljon", 0}, - {"1"_600_9 _60_0 _6_2, "enduonongentiljon", 0}, - {"1"_600_9 _60_0 _6_3, "entrenongentiljon", 0}, - {"1"_600_9 _60_0 _6_4, "enkvattuornongentiljon", 0}, - {"1"_600_9 _60_0 _6_5, "enkvinnongentiljon", 0}, - {"1"_600_9 _60_0 _6_6, "ensenongentiljon", 0}, - {"1"_600_9 _60_0 _6_7, "enseptenongentiljon", 0}, - {"1"_600_9 _60_0 _6_8, "enoktonongentiljon", 0}, - {"1"_600_9 _60_0 _6_9, "ennovenongentiljon", 0}, - {"1"_600_9 _60_9 _6_0, "ennonagintanongentiljon", 0}, - {"1"_600_9 _60_9 _6_9, "ennovenonagintanongentiljon", 0}, - {"1000"_600_9 _60_9 _6_9, "ennovenonagintanongentiljard", 0}, - {"0", "noll", F(IMPLICIT_ONE)}, - {"1", "ett", F(IMPLICIT_ONE)}, - {"2", "två", F(IMPLICIT_ONE)}, - {"3", "tre", F(IMPLICIT_ONE)}, - {"4", "fyra", F(IMPLICIT_ONE)}, - {"20", "tjugo", F(IMPLICIT_ONE)}, - {"30", "trettio", F(IMPLICIT_ONE)}, - {"100", "hundra", F(IMPLICIT_ONE)}, - {"101", "hundraett", F(IMPLICIT_ONE)}, - {"110", "hundratio", F(IMPLICIT_ONE)}, - {"999", "niohundranittionio", F(IMPLICIT_ONE)}, - {"1000", "tusen", F(IMPLICIT_ONE)}, - {"1001", "tusenett", F(IMPLICIT_ONE)}, - {"2000", "tvåtusen", F(IMPLICIT_ONE)}, - {"100000", "hundratusen", F(IMPLICIT_ONE)}, - {"101000", "hundraettusen", F(IMPLICIT_ONE)}, - {"300000", "trehundratusen", F(IMPLICIT_ONE)}, - {"1""000000", "enmiljon", F(IMPLICIT_ONE)}, - {"1""200000", "enmiljontvåhundratusen", F(IMPLICIT_ONE)}, - {"2""000000", "tvåmiljoner", F(IMPLICIT_ONE)}, - {"100""000000", "hundramiljoner", F(IMPLICIT_ONE)}, - {"1000""000000", "enmiljard", F(IMPLICIT_ONE)}, - {"1""000000""000000", "enbiljon", F(IMPLICIT_ONE)}, - {"1"_6_4, "enkvadriljon", F(IMPLICIT_ONE)}, - {"1"_600_1 _60_0 _6_0, "encentiljon", F(IMPLICIT_ONE)}, - {"54248", "FemtioFyratusenTvåhundraFyrtioÅtta", F(PASCAL_CASE)}, - {"54248", "FEMTIOFYRATUSENTVÅHUNDRAFYRTIOÅTTA", F(UPPER_CASE)}, - {"54248", "Femtiofyratusentvåhundrafyrtioåtta", F(SENTENCE_CASE)}, - {"54248", "femtio-fyratusen-tvåhundra-fyrtio-åtta", F(HYPHENATED)}, - {"54248", "Femtio-Fyratusen-Tvåhundra-Fyrtio-Åtta", F(HYPHENATED) | F(PASCAL_CASE)}, - {"54248", "FEMTIO-FYRATUSEN-TVÅHUNDRA-FYRTIO-ÅTTA", F(HYPHENATED) | F(UPPER_CASE)}, - {"54248", "Femtio-fyratusen-tvåhundra-fyrtio-åtta", F(HYPHENATED) | F(SENTENCE_CASE)}, - {"100", "etthundra", F(EXPLICIT_TRIPLETS)}, - {"100", "etthundra", F(LATEX_TRIPLETS)}, - {"1000", "etttusen", F(EXPLICIT_TRIPLETS)}, - {"1000", "e\"ttusen", F(LATEX_TRIPLETS)}, - {"1000", "tusen", F(IMPLICIT_ONE) | F(EXPLICIT_TRIPLETS)}, - {"1000", "tusen", F(IMPLICIT_ONE) | F(LATEX_TRIPLETS)}, - {"0", "noll", F(NEUTER_GENDER)}, - {"1", "en", F(NEUTER_GENDER)}, - {"2", "två", F(NEUTER_GENDER)}, - {"3", "tre", F(NEUTER_GENDER)}, - {"21", "tjugoen", F(NEUTER_GENDER)}, - {"22", "tjugotvå", F(NEUTER_GENDER)}, - {"23", "tjugotre", F(NEUTER_GENDER)}, - {"100", "etthundra", F(NEUTER_GENDER)}, - {"101", "etthundraen", F(NEUTER_GENDER)}, - {"1000", "ettusen", F(NEUTER_GENDER)}, - {"1001", "ettusenen", F(NEUTER_GENDER)}, - {"1000000", "enmiljon", F(NEUTER_GENDER)}, - {"1000001", "enmiljonen", F(NEUTER_GENDER)}, - {"0", "noll", F(MASCULINE_GENDER)}, - {"1", "en", F(MASCULINE_GENDER)}, - {"2", "två", F(MASCULINE_GENDER)}, - {"3", "tre", F(MASCULINE_GENDER)}, - {"21", "tjugoen", F(MASCULINE_GENDER)}, - {"22", "tjugotvå", F(MASCULINE_GENDER)}, - {"23", "tjugotre", F(MASCULINE_GENDER)}, - {"100", "etthundra", F(MASCULINE_GENDER)}, - {"101", "etthundraen", F(MASCULINE_GENDER)}, - {"1000", "ettusen", F(MASCULINE_GENDER)}, - {"1001", "ettusenen", F(MASCULINE_GENDER)}, - {"1000000", "enmiljon", F(MASCULINE_GENDER)}, - {"1000001", "enmiljonen", F(MASCULINE_GENDER)}, - {"0", "noll", F(FEMININE_GENDER)}, - {"1", "en", F(FEMININE_GENDER)}, - {"2", "två", F(FEMININE_GENDER)}, - {"3", "tre", F(FEMININE_GENDER)}, - {"21", "tjugoen", F(FEMININE_GENDER)}, - {"22", "tjugotvå", F(FEMININE_GENDER)}, - {"23", "tjugotre", F(FEMININE_GENDER)}, - {"100", "etthundra", F(FEMININE_GENDER)}, - {"101", "etthundraen", F(FEMININE_GENDER)}, - {"1000", "ettusen", F(FEMININE_GENDER)}, - {"1001", "ettusenen", F(FEMININE_GENDER)}, - {"1000000", "enmiljon", F(FEMININE_GENDER)}, - {"1000001", "enmiljonen", F(FEMININE_GENDER)}, - {"100", "ett|hundra", F(COMPONENT_HYPHENATION)}, - {"100", "ett|hun|dra", F(SYLLABLE_HYPHENATION)}, - {"100", "ett|hun¦dra", F(SECONDARY_HYPHENATION)}, - {"100", "ett|hundra", F(HYPHENATED) | F(COMPONENT_HYPHENATION)}, - {"100", "ett|hun|dra", F(HYPHENATED) | F(SYLLABLE_HYPHENATION)}, - {"100", "ett|hun¦dra", F(HYPHENATED) | F(SECONDARY_HYPHENATION)}, - {"1000", "ettusen", F(COMPONENT_HYPHENATION)}, - {"1000", "ettu|sen", F(SYLLABLE_HYPHENATION)}, - {"1000", "ettu¦sen", F(SECONDARY_HYPHENATION)}, - {"1000", "ettusen", F(HYPHENATED) | F(COMPONENT_HYPHENATION)}, - {"1000", "ettu|sen", F(HYPHENATED) | F(SYLLABLE_HYPHENATION)}, - {"1000", "ettu¦sen", F(HYPHENATED) | F(SECONDARY_HYPHENATION)}, - {"1000", "e\"ttusen", F(COMPONENT_HYPHENATION) | F(LATEX_TRIPLETS)}, - {"1000", "e\"ttu|sen", F(SYLLABLE_HYPHENATION) | F(LATEX_TRIPLETS)}, - {"1000", "e\"ttu¦sen", F(SECONDARY_HYPHENATION) | F(LATEX_TRIPLETS)}, - {"1000", "e\"ttusen", F(HYPHENATED) | F(COMPONENT_HYPHENATION) | F(LATEX_TRIPLETS)}, - {"1000", "e\"ttu|sen", F(HYPHENATED) | F(SYLLABLE_HYPHENATION) | F(LATEX_TRIPLETS)}, - {"1000", "e\"ttu¦sen", F(HYPHENATED) | F(SECONDARY_HYPHENATION) | F(LATEX_TRIPLETS)}, - {"1000", "ett|tusen", F(COMPONENT_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, - {"1000", "ett|tu|sen", F(SYLLABLE_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, - {"1000", "ett|tu¦sen", F(SECONDARY_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, - {"1000", "ett|tusen", F(HYPHENATED) | F(COMPONENT_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, - {"1000", "ett|tu|sen", F(HYPHENATED) | F(SYLLABLE_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, - {"1000", "ett|tu¦sen", F(HYPHENATED) | F(SECONDARY_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, - {"54248", "femtio|fyra|tusen|två|hundra|fyrtio|åtta", F(COMPONENT_HYPHENATION)}, - {"54248", "fem|tio|fy|ra|tu|sen|två|hun|dra|fyr|tio|åt|ta", F(SYLLABLE_HYPHENATION)}, - {"54248", "fem¦tio|fy¦ra|tu¦sen|två|hun¦dra|fyr¦tio|åt¦ta", F(SECONDARY_HYPHENATION)}, - {"54248", "femtio-fyra|tusen-två|hundra-fyrtio-åtta", F(HYPHENATED) | F(COMPONENT_HYPHENATION)}, - {"54248", "fem|tio-fy|ra|tu|sen-två|hun|dra-fyr|tio-åt|ta", F(HYPHENATED) | F(SYLLABLE_HYPHENATION)}, - {"54248", "fem¦tio-fy¦ra|tu¦sen-två|hun¦dra-fyr¦tio-åt¦ta", F(HYPHENATED) | F(SECONDARY_HYPHENATION)}, + {"0", 0, "noll", 0}, + {"+0", 0, "plus noll", 0}, + {"-0", 0, "minus noll", 0}, + {UNICODE_MINUS"0", 0, "minus noll", 0}, + {"0", 0, "nollte", ORD}, + {"+0", 0, "plus-nollte", ORD}, + {"-0", 0, "minus-nollte", ORD}, + {UNICODE_MINUS"0", 0, "minus-nollte", ORD}, + {"1", 0, "ett", 0}, + {"+1", 0, "plus ett", 0}, + {"-1", 0, "minus ett", 0}, + {UNICODE_MINUS"1", 0, "minus ett", 0}, + {"1", 0, "första", ORD}, + {"+1", 0, "plus-första", ORD}, + {"-1", 0, "minus-första", ORD}, + {UNICODE_MINUS"1", 0, "minus-första", ORD}, + {"2", 0, "två", 0}, + {"+2", 0, "plus två", 0}, + {"-2", 0, "minus två", 0}, + {UNICODE_MINUS"2", 0, "minus två", 0}, + {"2", 0, "andra", ORD}, + {"+2", 0, "plus-andra", ORD}, + {"-2", 0, "minus-andra", ORD}, + {UNICODE_MINUS"2", 0, "minus-andra", ORD}, + {"3", 0, "tre", 0}, + {"+3", 0, "plus tre", 0}, + {"-3", 0, "minus tre", 0}, + {UNICODE_MINUS"3", 0, "minus tre", 0}, + {"3", 0, "tredje", ORD}, + {"+3", 0, "plus-tredje", ORD}, + {"-3", 0, "minus-tredje", ORD}, + {UNICODE_MINUS"3", 0, "minus-tredje", ORD}, + {"4", 0, "fyra", 0}, + {"4", 0, "fjärde", ORD}, + {"5", 0, "fem", 0}, + {"5", 0, "femte", ORD}, + {"6", 0, "sex", 0}, + {"6", 0, "sjätte", ORD}, + {"7", 0, "sju", 0}, + {"7", 0, "sjunde", ORD}, + {"8", 0, "åtta", 0}, + {"8", 0, "åttonde", ORD}, + {"9", 0, "nio", 0}, + {"9", 0, "nionde", ORD}, + {"10", 0, "tio", 0}, + {"10", 0, "tionde", ORD}, + {"11", 0, "elva", 0}, + {"11", 0, "elfte", ORD}, + {"12", 0, "tolv", 0}, + {"12", 0, "tolfte", ORD}, + {"13", 0, "tretton", 0}, + {"13", 0, "trettonde", ORD}, + {"14", 0, "fjorton", 0}, + {"14", 0, "fjortonde", ORD}, + {"15", 0, "femton", 0}, + {"15", 0, "femtonde", ORD}, + {"16", 0, "sexton", 0}, + {"16", 0, "sextonde", ORD}, + {"17", 0, "sjutton", 0}, + {"17", 0, "sjuttonde", ORD}, + {"18", 0, "arton", 0}, + {"18", 0, "artonde", ORD}, + {"19", 0, "nitton", 0}, + {"19", 0, "nittonde", ORD}, + {"20", 0, "tjugo", 0}, + {"20", 0, "tjugonde", ORD}, + {"21", 0, "tjugoett", 0}, + {"21", 0, "tjugoförsta", ORD}, + {"22", 0, "tjugotvå", 0}, + {"22", 0, "tjugoandra", ORD}, + {"23", 0, "tjugotre", 0}, + {"23", 0, "tjugotredje", ORD}, + {"28", 0, "tjugoåtta", 0}, + {"28", 0, "tjugoåttonde", ORD}, + {"29", 0, "tjugonio", 0}, + {"29", 0, "tjugonionde", ORD}, + {"30", 0, "trettio", 0}, + {"30", 0, "trettionde", ORD}, + {"31", 0, "trettioett", 0}, + {"31", 0, "trettioförsta", ORD}, + {"32", 0, "trettiotvå", 0}, + {"32", 0, "trettioandra", ORD}, + {"40", 0, "fyrtio", 0}, + {"40", 0, "fyrtionde", ORD}, + {"43", 0, "fyrtiotre", 0}, + {"43", 0, "fyrtiotredje", ORD}, + {"50", 0, "femtio", 0}, + {"50", 0, "femtionde", ORD}, + {"54", 0, "femtiofyra", 0}, + {"54", 0, "femtiofjärde", ORD}, + {"60", 0, "sextio", 0}, + {"60", 0, "sextionde", ORD}, + {"65", 0, "sextiofem", 0}, + {"65", 0, "sextiofemte", ORD}, + {"70", 0, "sjuttio", 0}, + {"70", 0, "sjuttionde", ORD}, + {"76", 0, "sjuttiosex", 0}, + {"76", 0, "sjuttiosjätte", ORD}, + {"80", 0, "åttio", 0}, + {"80", 0, "åttionde", ORD}, + {"87", 0, "åttiosju", 0}, + {"87", 0, "åttiosjunde", ORD}, + {"90", 0, "nittio", 0}, + {"90", 0, "nittionde", ORD}, + {"98", 0, "nittioåtta", 0}, + {"98", 0, "nittioåttonde", ORD}, + {"99", 0, "nittionio", 0}, + {"99", 0, "nittionionde", ORD}, + {"100", 0, "etthundra", 0}, + {"100", 0, "etthundrade", ORD}, + {"101", 0, "etthundraett", 0}, + {"101", 0, "etthundraförsta", ORD}, + {"110", 0, "etthundratio", 0}, + {"110", 0, "etthundrationde", ORD}, + {"111", 0, "etthundraelva", 0}, + {"111", 0, "etthundraelfte", ORD}, + {"120", 0, "etthundratjugo", 0}, + {"120", 0, "etthundratjugonde", ORD}, + {"121", 0, "etthundratjugoett", 0}, + {"121", 0, "etthundratjugoförsta", ORD}, + {"999", 0, "niohundranittionio", 0}, + {"999", 0, "niohundranittionionde", ORD}, + {"1000", 0, "ettusen", 0}, + {"1000", 0, "ettusende", ORD}, + {"1001", 0, "ettusenett", 0}, + {"1001", 0, "ettusenförsta", ORD}, + {"1002", 0, "ettusentvå", 0}, + {"1002", 0, "ettusenandra", ORD}, + {"1100", 0, "ettusenetthundra", 0}, + {"1100", 0, "ettusenetthundrade", ORD}, + {"1101", 0, "ettusenetthundraett", 0}, + {"1101", 0, "ettusenetthundraförsta", ORD}, + {"1123", 0, "ettusenetthundratjugotre", 0}, + {"1123", 0, "ettusenetthundratjugotredje", ORD}, + {"2000", 0, "tvåtusen", 0}, + {"2000", 0, "tvåtusende", ORD}, + {"3000", 0, "tretusen", 0}, + {"3000", 0, "tretusende", ORD}, + {"4000", 0, "fyratusen", 0}, + {"4000", 0, "fyratusende", ORD}, + {"5000", 0, "femtusen", 0}, + {"5000", 0, "femtusende", ORD}, + {"8000", 0, "åttatusen", 0}, + {"8000", 0, "åttatusende", ORD}, + {"9000", 0, "niotusen", 0}, + {"9000", 0, "niotusende", ORD}, + {"10000", 0, "tiotusen", 0}, + {"10000", 0, "tiotusende", ORD}, + {"11000", 0, "elvatusen", 0}, + {"11000", 0, "elvatusende", ORD}, + {"20000", 0, "tjugotusen", 0}, + {"20000", 0, "tjugotusende", ORD}, + {"21000", 0, "tjugoettusen", 0}, /* "tjugoentusen" is actually incorrect (it's colloquial) */ + {"30000", 0, "trettiotusen", 0}, + {"31000", 0, "trettioettusen", 0}, + {"32000", 0, "trettiotvåtusen", 0}, + {"40001", 0, "fyrtiotusenett", 0}, + {"40001", 0, "fyrtiotusenförsta", ORD}, + {"40010", 0, "fyrtiotusentio", 0}, + {"40010", 0, "fyrtiotusentionde", ORD}, + {"40012", 0, "fyrtiotusentolv", 0}, + {"40012", 0, "fyrtiotusentolfte", ORD}, + {"50100", 0, "femtiotusenetthundra", 0}, + {"50100", 0, "femtiotusenetthundrade", ORD}, + {"50200", 0, "femtiotusentvåhundra", 0}, + {"50200", 0, "femtiotusentvåhundrade", ORD}, + {"50210", 0, "femtiotusentvåhundratio", 0}, + {"50240", 0, "femtiotusentvåhundrafyrtio", 0}, + {"50240", 0, "femtiotusentvåhundrafyrtionde", ORD}, + {"50248", 0, "femtiotusentvåhundrafyrtioåtta", 0}, + {"50248", 0, "femtiotusentvåhundrafyrtioåttonde", ORD}, + {"100000", 0, "etthundratusen", 0}, + {"100000", 0, "etthundratusende", ORD}, + {"100001", 0, "etthundratusenett", 0}, + {"100001", 0, "etthundratusenförsta", ORD}, + {"100014", 0, "etthundratusenfjorton", 0}, + {"100014", 0, "etthundratusenfjortonde", ORD}, + {"100020", 0, "etthundratusentjugo", 0}, + {"100020", 0, "etthundratusentjugonde", ORD}, + {"100026", 0, "etthundratusentjugosex", 0}, + {"100026", 0, "etthundratusentjugosjätte", ORD}, + {"100100", 0, "etthundratusenetthundra", 0}, + {"100100", 0, "etthundratusenetthundrade", ORD}, + {"100200", 0, "etthundratusentvåhundra", 0}, + {"100200", 0, "etthundratusentvåhundrade", ORD}, + {"100210", 0, "etthundratusentvåhundratio", 0}, + {"100247", 0, "etthundratusentvåhundrafyrtiosju", 0}, + {"101000", 0, "etthundraettusen", 0}, + {"101000", 0, "etthundraettusende", ORD}, + {"102000", 0, "etthundratvåtusen", 0}, + {"110000", 0, "etthundratiotusen", 0}, + {"118000", 0, "etthundraartontusen", 0}, + {"130000", 0, "etthundratrettiotusen", 0}, + {"182000", 0, "etthundraåttiotvåtusen", 0}, + {"182000", 0, "etthundraåttiotvåtusende", ORD}, + {"300000", 0, "trehundratusen", 0}, + {"300000", 0, "trehundratusende", ORD}, + {"1""000000", 0, "enmiljon", 0}, + {"1""000000", 0, "enmiljonte", ORD}, + {"1""200000", 0, "enmiljontvåhundratusen", 0}, + {"1""200000", 0, "enmiljontvåhundratusende", ORD}, + {"2""000000", 0, "tvåmiljoner", 0}, + {"2""000000", 0, "tvåmiljonte", ORD}, + {"3""000000", 0, "tremiljoner", 0}, + {"5""000000", 0, "femmiljoner", 0}, + {"5""000000", 0, "femmiljonte", ORD}, + {"5""010000", 0, "femmiljonertiotusen", 0}, + {"5""010000", 0, "femmiljonertiotusende", ORD}, + {"5""010100", 0, "femmiljonertiotusenetthundra", 0}, + {"5""010100", 0, "femmiljonertiotusenetthundrade", ORD}, + {"5""010111", 0, "femmiljonertiotusenetthundraelva", 0}, + {"5""010111", 0, "femmiljonertiotusenetthundraelfte", ORD}, + {"9""999999", 0, "niomiljonerniohundranittioniotusenniohundranittionio", 0}, + {"9""999999", 0, "niomiljonerniohundranittioniotusenniohundranittionionde", ORD}, + {"10""000000", 0, "tiomiljoner", 0}, + {"10""000000", 0, "tiomiljonte", ORD}, + {"11""000000", 0, "elvamiljoner", 0}, + {"11""000000", 0, "elvamiljonte", ORD}, + {"20""000000", 0, "tjugomiljoner", 0}, + {"20""000000", 0, "tjugomiljonte", ORD}, + {"100""000000", 0, "etthundramiljoner", 0}, + {"100""000000", 0, "etthundramiljonte", ORD}, + {"101""000000", 0, "etthundraenmiljoner", 0}, + {"102""000000", 0, "etthundratvåmiljoner", 0}, + {"112""000000", 0, "etthundratolvmiljoner", 0}, + {"160""000000", 0, "etthundrasextiomiljoner", 0}, + {"169""000000", 0, "etthundrasextioniomiljoner", 0}, + {"169""000000", 0, "etthundrasextioniomiljonte", ORD}, + {"200""000000", 0, "tvåhundramiljoner", 0}, + {"200""000000", 0, "tvåhundramiljonte", ORD}, + {"1000""000000", 0, "enmiljard", 0}, + {"1000""000000", 0, "enmiljarde", ORD}, + {"2000""000000", 0, "tvåmiljarder", 0}, + {"2000""000000", 0, "tvåmiljarde", ORD}, + {"20000""000000", 0, "tjugomiljarder", 0}, + {"21000""000000", 0, "tjugoenmiljarder", 0}, + {"100000""000000", 0, "etthundramiljarder", 0}, + {"101000""000000", 0, "etthundraenmiljarder", 0}, + {"101000""000000", 0, "etthundraenmiljarde", ORD}, + {"101001""000000", 0, "etthundraenmiljarderenmiljon", 0}, + {"101001""000000", 0, "etthundraenmiljarderenmiljonte", ORD}, + {"101100""000000", 0, "etthundraenmiljarderetthundramiljoner", 0}, + {"101100""000000", 0, "etthundraenmiljarderetthundramiljonte", ORD}, + {"1""000000""000000", 0, "enbiljon", 0}, + {"1""000000""000000", 0, "enbiljonte", ORD}, + {"1""001000""000000", 0, "enbiljonenmiljard", 0}, + {"1""001000""000000", 0, "enbiljonenmiljarde", ORD}, + {"1""001001""000000", 0, "enbiljonenmiljardenmiljon", 0}, + {"1""001001""000000", 0, "enbiljonenmiljardenmiljonte", ORD}, + {"1""001001""001000", 0, "enbiljonenmiljardenmiljonettusen", 0}, + {"1""001001""001000", 0, "enbiljonenmiljardenmiljonettusende", ORD}, + {"1""001001""001001", 0, "enbiljonenmiljardenmiljonettusenett", 0}, + {"1""001001""001001", 0, "enbiljonenmiljardenmiljonettusenförsta", ORD}, + {"2""000000""000000", 0, "tvåbiljoner", 0}, + {"2""000000""000000", 0, "tvåbiljonte", ORD}, + {"1000""000000""000000", 0, "enbiljard", 0}, + {"1000""000000""000000", 0, "enbiljarde", ORD}, + {"1", 3 * 6, "entriljon", 0}, + {"1", 3 * 6, "entriljonte", ORD}, + {"1000", 3 * 6, "entriljard", 0}, + {"1", 4 * 6, "enkvadriljon", 0}, + {"1", 5 * 6, "enkvintiljon", 0}, + {"1", 6 * 6, "ensextiljon", 0}, + {"1", 7 * 6, "enseptiljon", 0}, + {"1", 8 * 6, "enoktiljon", 0}, + {"1", 8 * 6, "enoktiljonte", ORD}, + {"1", 9 * 6, "ennoniljon", 0}, + {"1", 10 * 6, "endeciljon", 0}, + {"1", 11 * 6, "enundeciljon", 0}, + {"1", 12 * 6, "enduodeciljon", 0}, + {"1", 13 * 6, "entredeciljon", 0}, + {"1", 14 * 6, "enkvattuordeciljon", 0}, + {"1", 15 * 6, "enkvindeciljon", 0}, + {"1", 16 * 6, "ensedeciljon", 0}, + {"1", 17 * 6, "enseptendeciljon", 0}, + {"1", 18 * 6, "enoktodeciljon", 0}, + {"1", 19 * 6, "ennovendeciljon", 0}, + {"1", 20 * 6, "envigintiljon", 0}, + {"1", 21 * 6, "enunvigintiljon", 0}, + {"1", 22 * 6, "enduovigintiljon", 0}, + {"1", 23 * 6, "entresvigintiljon", 0}, + {"1", 24 * 6, "enkvattuorvigintiljon", 0}, + {"1", 25 * 6, "enkvinvigintiljon", 0}, + {"1", 26 * 6, "ensesvigintiljon", 0}, + {"1", 27 * 6, "enseptemvigintiljon", 0}, + {"1", 28 * 6, "enoktovigintiljon", 0}, + {"1", 29 * 6, "ennovemvigintiljon", 0}, + {"1", 30 * 6, "entrigintiljon", 0}, + {"1", 31 * 6, "enuntrigintiljon", 0}, + {"1", 32 * 6, "enduotrigintiljon", 0}, + {"1", 33 * 6, "entrestrigintiljon", 0}, + {"1", 34 * 6, "enkvattuortrigintiljon", 0}, + {"1", 35 * 6, "enkvintrigintiljon", 0}, + {"1", 36 * 6, "ensestrigintiljon", 0}, + {"1", 37 * 6, "enseptentrigintiljon", 0}, + {"1", 38 * 6, "enoktotrigintiljon", 0}, + {"1", 39 * 6, "ennoventrigintiljon", 0}, + {"1", 40 * 6, "enkvadragintiljon", 0}, + {"1", 41 * 6, "enunkvadragintiljon", 0}, + {"1", 42 * 6, "enduokvadragintiljon", 0}, + {"1", 43 * 6, "entreskvadragintiljon", 0}, + {"1", 44 * 6, "enkvattuorkvadragintiljon", 0}, + {"1", 45 * 6, "enkvinkvadragintiljon", 0}, + {"1", 46 * 6, "enseskvadragintiljon", 0}, + {"1", 47 * 6, "enseptenkvadragintiljon", 0}, + {"1", 48 * 6, "enoktokvadragintiljon", 0}, + {"1", 49 * 6, "ennovenkvadragintiljon", 0}, + {"1", 50 * 6, "enkvinkvagintiljon", 0}, + {"1", 51 * 6, "enunkvinkvagintiljon", 0}, + {"1", 52 * 6, "enduokvinkvagintiljon", 0}, + {"1", 53 * 6, "entreskvinkvagintiljon", 0}, + {"1", 54 * 6, "enkvattuorkvinkvagintiljon", 0}, + {"1", 55 * 6, "enkvinkvinkvagintiljon", 0}, + {"1", 56 * 6, "enseskvinkvagintiljon", 0}, + {"1", 57 * 6, "enseptenkvinkvagintiljon", 0}, + {"1", 58 * 6, "enoktokvinkvagintiljon", 0}, + {"1", 59 * 6, "ennovenkvinkvagintiljon", 0}, + {"1", 60 * 6, "ensexagintiljon", 0}, + {"1", 61 * 6, "enunsexagintiljon", 0}, + {"1", 62 * 6, "enduosexagintiljon", 0}, + {"1", 63 * 6, "entresexagintiljon", 0}, + {"1", 64 * 6, "enkvattuorsexagintiljon", 0}, + {"1", 65 * 6, "enkvinsexagintiljon", 0}, + {"1", 66 * 6, "ensesexagintiljon", 0}, + {"1", 67 * 6, "enseptensexagintiljon", 0}, + {"1", 68 * 6, "enoktosexagintiljon", 0}, + {"1", 69 * 6, "ennovensexagintiljon", 0}, + {"1", 70 * 6, "enseptuagintiljon", 0}, + {"1", 71 * 6, "enunseptuagintiljon", 0}, + {"1", 72 * 6, "enduoseptuagintiljon", 0}, + {"1", 73 * 6, "entreseptuagintiljon", 0}, + {"1", 74 * 6, "enkvattuorseptuagintiljon", 0}, + {"1", 75 * 6, "enkvinseptuagintiljon", 0}, + {"1", 76 * 6, "enseseptuagintiljon", 0}, + {"1", 77 * 6, "enseptenseptuagintiljon", 0}, + {"1", 78 * 6, "enoktoseptuagintiljon", 0}, + {"1", 79 * 6, "ennovenseptuagintiljon", 0}, + {"1", 80 * 6, "enoktogintiljon", 0}, + {"1", 81 * 6, "enunoktogintiljon", 0}, + {"1", 82 * 6, "enduooktogintiljon", 0}, + {"1", 83 * 6, "entresoktogintiljon", 0}, + {"1", 84 * 6, "enkvattuoroktogintiljon", 0}, + {"1", 85 * 6, "enkvinoktogintiljon", 0}, + {"1", 86 * 6, "ensexoktogintiljon", 0}, + {"1", 87 * 6, "enseptemoktogintiljon", 0}, + {"1", 88 * 6, "enoktooktogintiljon", 0}, + {"1", 89 * 6, "ennovemoktogintiljon", 0}, + {"1", 90 * 6, "ennonagintiljon", 0}, + {"1", 91 * 6, "enunnonagintiljon", 0}, + {"1", 92 * 6, "enduononagintiljon", 0}, + {"1", 93 * 6, "entrenonagintiljon", 0}, + {"1", 94 * 6, "enkvattuornonagintiljon", 0}, + {"1", 95 * 6, "enkvinnonagintiljon", 0}, + {"1", 96 * 6, "ensenonagintiljon", 0}, + {"1", 97 * 6, "enseptenonagintiljon", 0}, + {"1", 98 * 6, "enoktononagintiljon", 0}, + {"1", 99 * 6, "ennovenonagintiljon", 0}, + {"1", 100 * 6, "encentiljon", 0}, + {"1", 101 * 6, "enuncentiljon", 0}, + {"1", 102 * 6, "enduocentiljon", 0}, + {"1", 103 * 6, "entrescentiljon", 0}, + {"1", 104 * 6, "enkvattuorcentiljon", 0}, + {"1", 105 * 6, "enkvincentiljon", 0}, + {"1", 106 * 6, "ensexcentiljon", 0}, + {"1", 107 * 6, "enseptencentiljon", 0}, + {"1", 108 * 6, "enoktocentiljon", 0}, + {"1", 109 * 6, "ennovencentiljon", 0}, + {"1", 110 * 6, "endecicentiljon", 0}, + {"1", 120 * 6, "enviginticentiljon", 0}, + {"1", 130 * 6, "entrigintacentiljon", 0}, + {"1", 140 * 6, "enkvadragintacentiljon", 0}, + {"1", 150 * 6, "enkvinkvagintacentiljon", 0}, + {"1", 160 * 6, "ensexagintacentiljon", 0}, + {"1", 170 * 6, "enseptuagintacentiljon", 0}, + {"1", 177 * 6, "enseptenseptuagintacentiljon", 0}, + {"1", 180 * 6, "enoktogintacentiljon", 0}, + {"1", 190 * 6, "ennonagintacentiljon", 0}, + {"1", 199 * 6, "ennovenonagintacentiljon", 0}, + {"1", 200 * 6, "enducentiljon", 0}, + {"1", 201 * 6, "enunducentiljon", 0}, + {"1", 202 * 6, "enduoducentiljon", 0}, + {"1", 203 * 6, "entreducentiljon", 0}, + {"1", 204 * 6, "enkvattuorducentiljon", 0}, + {"1", 205 * 6, "enkvinducentiljon", 0}, + {"1", 206 * 6, "enseducentiljon", 0}, + {"1", 207 * 6, "enseptenducentiljon", 0}, + {"1", 208 * 6, "enoktoducentiljon", 0}, + {"1", 209 * 6, "ennovenducentiljon", 0}, + {"1", 300 * 6, "entrecentiljon", 0}, + {"1", 301 * 6, "enuntrecentiljon", 0}, + {"1", 302 * 6, "enduotrecentiljon", 0}, + {"1", 303 * 6, "entrestrecentiljon", 0}, + {"1", 304 * 6, "enkvattuortrecentiljon", 0}, + {"1", 305 * 6, "enkvintrecentiljon", 0}, + {"1", 306 * 6, "ensestrecentiljon", 0}, + {"1", 307 * 6, "enseptentrecentiljon", 0}, + {"1", 308 * 6, "enoktotrecentiljon", 0}, + {"1", 309 * 6, "ennoventrecentiljon", 0}, + {"1", 400 * 6, "enkvadringentiljon", 0}, + {"1", 401 * 6, "enunkvadringentiljon", 0}, + {"1", 402 * 6, "enduokvadringentiljon", 0}, + {"1", 403 * 6, "entreskvadringentiljon", 0}, + {"1", 404 * 6, "enkvattuorkvadringentiljon", 0}, + {"1", 405 * 6, "enkvinkvadringentiljon", 0}, + {"1", 406 * 6, "enseskvadringentiljon", 0}, + {"1", 407 * 6, "enseptenkvadringentiljon", 0}, + {"1", 408 * 6, "enoktokvadringentiljon", 0}, + {"1", 409 * 6, "ennovenkvadringentiljon", 0}, + {"1", 500 * 6, "enkvingentiljon", 0}, + {"1", 501 * 6, "enunkvingentiljon", 0}, + {"1", 502 * 6, "enduokvingentiljon", 0}, + {"1", 503 * 6, "entreskvingentiljon", 0}, + {"1", 504 * 6, "enkvattuorkvingentiljon", 0}, + {"1", 505 * 6, "enkvinkvingentiljon", 0}, + {"1", 506 * 6, "enseskvingentiljon", 0}, + {"1", 507 * 6, "enseptenkvingentiljon", 0}, + {"1", 508 * 6, "enoktokvingentiljon", 0}, + {"1", 509 * 6, "ennovenkvingentiljon", 0}, + {"1", 600 * 6, "ensescentiljon", 0}, + {"1", 601 * 6, "enunsescentiljon", 0}, + {"1", 602 * 6, "enduosescentiljon", 0}, + {"1", 603 * 6, "entresescentiljon", 0}, + {"1", 604 * 6, "enkvattuorsescentiljon", 0}, + {"1", 605 * 6, "enkvinsescentiljon", 0}, + {"1", 606 * 6, "ensesescentiljon", 0}, + {"1", 607 * 6, "enseptensescentiljon", 0}, + {"1", 608 * 6, "enoktosescentiljon", 0}, + {"1", 609 * 6, "ennovensescentiljon", 0}, + {"1", 700 * 6, "enseptingentiljon", 0}, + {"1", 701 * 6, "enunseptingentiljon", 0}, + {"1", 702 * 6, "enduoseptingentiljon", 0}, + {"1", 703 * 6, "entreseptingentiljon", 0}, + {"1", 704 * 6, "enkvattuorseptingentiljon", 0}, + {"1", 705 * 6, "enkvinseptingentiljon", 0}, + {"1", 706 * 6, "enseseptingentiljon", 0}, + {"1", 707 * 6, "enseptenseptingentiljon", 0}, + {"1", 708 * 6, "enoktoseptingentiljon", 0}, + {"1", 709 * 6, "ennovenseptingentiljon", 0}, + {"1", 800 * 6, "enoktingentiljon", 0}, + {"1", 801 * 6, "enunoktingentiljon", 0}, + {"1", 802 * 6, "enduooktingentiljon", 0}, + {"1", 803 * 6, "entresoktingentiljon", 0}, + {"1", 804 * 6, "enkvattuoroktingentiljon", 0}, + {"1", 805 * 6, "enkvinoktingentiljon", 0}, + {"1", 806 * 6, "ensexoktingentiljon", 0}, + {"1", 807 * 6, "enseptemoktingentiljon", 0}, + {"1", 808 * 6, "enoktooktingentiljon", 0}, + {"1", 809 * 6, "ennovemoktingentiljon", 0}, + {"1", 900 * 6, "ennongentiljon", 0}, + {"1", 901 * 6, "enunnongentiljon", 0}, + {"1", 902 * 6, "enduonongentiljon", 0}, + {"1", 903 * 6, "entrenongentiljon", 0}, + {"1", 904 * 6, "enkvattuornongentiljon", 0}, + {"1", 905 * 6, "enkvinnongentiljon", 0}, + {"1", 906 * 6, "ensenongentiljon", 0}, + {"1", 907 * 6, "enseptenongentiljon", 0}, + {"1", 908 * 6, "enoktonongentiljon", 0}, + {"1", 909 * 6, "ennovenongentiljon", 0}, + {"1", 990 * 6, "ennonagintanongentiljon", 0}, + {"1", 999 * 6, "ennovenonagintanongentiljon", 0}, + {"1", 999 * 6, "ennovenonagintanongentiljonte", ORD}, + {"1000", 999 * 6, "ennovenonagintanongentiljard", 0}, + {"1000", 999 * 6, "ennovenonagintanongentiljarde", ORD}, + {"0", 0, "noll", F(IMPLICIT_ONE)}, + {"0", 0, "nollte", F(IMPLICIT_ONE) | ORD}, + {"1", 0, "ett", F(IMPLICIT_ONE)}, + {"1", 0, "första", F(IMPLICIT_ONE) | ORD}, + {"2", 0, "två", F(IMPLICIT_ONE)}, + {"2", 0, "andra", F(IMPLICIT_ONE) | ORD}, + {"3", 0, "tre", F(IMPLICIT_ONE)}, + {"3", 0, "tredje", F(IMPLICIT_ONE) | ORD}, + {"4", 0, "fyra", F(IMPLICIT_ONE)}, + {"20", 0, "tjugo", F(IMPLICIT_ONE)}, + {"30", 0, "trettio", F(IMPLICIT_ONE)}, + {"100", 0, "hundra", F(IMPLICIT_ONE)}, + {"100", 0, "hundrade", F(IMPLICIT_ONE) | ORD}, + {"101", 0, "hundraett", F(IMPLICIT_ONE)}, + {"101", 0, "hundraförsta", F(IMPLICIT_ONE) | ORD}, + {"110", 0, "hundratio", F(IMPLICIT_ONE)}, + {"110", 0, "hundrationde", F(IMPLICIT_ONE) | ORD}, + {"999", 0, "niohundranittionio", F(IMPLICIT_ONE)}, + {"999", 0, "niohundranittionionde", F(IMPLICIT_ONE) | ORD}, + {"1000", 0, "tusen", F(IMPLICIT_ONE)}, + {"1000", 0, "tusende", F(IMPLICIT_ONE) | ORD}, + {"1001", 0, "tusenett", F(IMPLICIT_ONE)}, + {"1001", 0, "tusenförsta", F(IMPLICIT_ONE) | ORD}, + {"2000", 0, "tvåtusen", F(IMPLICIT_ONE)}, + {"2000", 0, "tvåtusende", F(IMPLICIT_ONE) | ORD}, + {"100000", 0, "hundratusen", F(IMPLICIT_ONE)}, + {"100000", 0, "hundratusende", F(IMPLICIT_ONE) | ORD}, + {"101000", 0, "hundraettusen", F(IMPLICIT_ONE)}, + {"101000", 0, "hundraettusende", F(IMPLICIT_ONE) | ORD}, + {"300000", 0, "trehundratusen", F(IMPLICIT_ONE)}, + {"1""000000", 0, "enmiljon", F(IMPLICIT_ONE)}, + {"1""000000", 0, "enmiljonte", F(IMPLICIT_ONE) | ORD}, + {"1""200000", 0, "enmiljontvåhundratusen", F(IMPLICIT_ONE)}, + {"2""000000", 0, "tvåmiljoner", F(IMPLICIT_ONE)}, + {"2""000000", 0, "tvåmiljonte", F(IMPLICIT_ONE) | ORD}, + {"100""000000", 0, "hundramiljoner", F(IMPLICIT_ONE)}, + {"1000""000000", 0, "enmiljard", F(IMPLICIT_ONE)}, + {"1""000000""000000", 0, "enbiljon", F(IMPLICIT_ONE)}, + {"1", 4 * 6, "enkvadriljon", F(IMPLICIT_ONE)}, + {"1", 100 * 6, "encentiljon", F(IMPLICIT_ONE)}, + {"+0", 0, "Plus Noll", F(PASCAL_CASE)}, + {"+0", 0, "PLUS NOLL", F(UPPER_CASE)}, + {"+0", 0, "Plus noll", F(SENTENCE_CASE)}, + {"-0", 0, "Minus Noll", F(PASCAL_CASE)}, + {"-0", 0, "MINUS NOLL", F(UPPER_CASE)}, + {"-0", 0, "Minus noll", F(SENTENCE_CASE)}, + {"54248", 0, "FemtioFyratusenTvåhundraFyrtioÅtta", F(PASCAL_CASE)}, + {"54248", 0, "FEMTIOFYRATUSENTVÅHUNDRAFYRTIOÅTTA", F(UPPER_CASE)}, + {"54248", 0, "Femtiofyratusentvåhundrafyrtioåtta", F(SENTENCE_CASE)}, + {"54248", 0, "femtio-fyratusen-tvåhundra-fyrtio-åtta", F(HYPHENATED)}, + {"54248", 0, "Femtio-Fyratusen-Tvåhundra-Fyrtio-Åtta", F(HYPHENATED) | F(PASCAL_CASE)}, + {"54248", 0, "FEMTIO-FYRATUSEN-TVÅHUNDRA-FYRTIO-ÅTTA", F(HYPHENATED) | F(UPPER_CASE)}, + {"54248", 0, "Femtio-fyratusen-tvåhundra-fyrtio-åtta", F(HYPHENATED) | F(SENTENCE_CASE)}, + {"100", 0, "etthundra", F(EXPLICIT_TRIPLETS)}, + {"100", 0, "etthundra", F(LATEX_TRIPLETS)}, + {"1000", 0, "etttusen", F(EXPLICIT_TRIPLETS)}, + {"1000", 0, "e\"ttusen", F(LATEX_TRIPLETS)}, + {"1000", 0, "tusen", F(IMPLICIT_ONE) | F(EXPLICIT_TRIPLETS)}, + {"1000", 0, "tusen", F(IMPLICIT_ONE) | F(LATEX_TRIPLETS)}, + {"0", 0, "noll", F(NEUTER_GENDER)}, + {"0", 0, "nollte", F(NEUTER_GENDER) | ORD}, + {"1", 0, "en", F(NEUTER_GENDER)}, + {"1", 0, "första", F(NEUTER_GENDER) | ORD}, + {"2", 0, "två", F(NEUTER_GENDER)}, + {"2", 0, "andra", F(NEUTER_GENDER) | ORD}, + {"3", 0, "tre", F(NEUTER_GENDER)}, + {"3", 0, "tredje", F(NEUTER_GENDER) | ORD}, + {"21", 0, "tjugoen", F(NEUTER_GENDER)}, + {"21", 0, "tjugoförsta", F(NEUTER_GENDER) | ORD}, + {"22", 0, "tjugotvå", F(NEUTER_GENDER)}, + {"22", 0, "tjugoandra", F(NEUTER_GENDER) | ORD}, + {"23", 0, "tjugotre", F(NEUTER_GENDER)}, + {"23", 0, "tjugotredje", F(NEUTER_GENDER) | ORD}, + {"100", 0, "etthundra", F(NEUTER_GENDER)}, + {"100", 0, "etthundrade", F(NEUTER_GENDER) | ORD}, + {"101", 0, "etthundraen", F(NEUTER_GENDER)}, + {"101", 0, "etthundraförsta", F(NEUTER_GENDER) | ORD}, + {"1000", 0, "ettusen", F(NEUTER_GENDER)}, + {"1000", 0, "ettusende", F(NEUTER_GENDER) | ORD}, + {"1001", 0, "ettusenen", F(NEUTER_GENDER)}, + {"1001", 0, "ettusenförsta", F(NEUTER_GENDER) | ORD}, + {"1002", 0, "ettusentvå", F(NEUTER_GENDER)}, + {"1002", 0, "ettusenandra", F(NEUTER_GENDER) | ORD}, + {"1000000", 0, "enmiljon", F(NEUTER_GENDER)}, + {"1000000", 0, "enmiljonte", F(NEUTER_GENDER) | ORD}, + {"1000001", 0, "enmiljonen", F(NEUTER_GENDER)}, + {"1000001", 0, "enmiljonförsta", F(NEUTER_GENDER) | ORD}, + {"1000002", 0, "enmiljontvå", F(NEUTER_GENDER)}, + {"1000002", 0, "enmiljonandra", F(NEUTER_GENDER) | ORD}, + {"1000003", 0, "enmiljontre", F(NEUTER_GENDER)}, + {"1000003", 0, "enmiljontredje", F(NEUTER_GENDER) | ORD}, + {"0", 0, "noll", F(MASCULINE_GENDER)}, + {"0", 0, "nollte", F(MASCULINE_GENDER) | ORD}, + {"1", 0, "en", F(MASCULINE_GENDER)}, + {"1", 0, "förste", F(MASCULINE_GENDER) | ORD}, + {"2", 0, "två", F(MASCULINE_GENDER)}, + {"2", 0, "andre", F(MASCULINE_GENDER) | ORD}, + {"3", 0, "tre", F(MASCULINE_GENDER)}, + {"3", 0, "tredje", F(MASCULINE_GENDER) | ORD}, + {"21", 0, "tjugoen", F(MASCULINE_GENDER)}, + {"21", 0, "tjugoförste", F(MASCULINE_GENDER) | ORD}, + {"22", 0, "tjugotvå", F(MASCULINE_GENDER)}, + {"22", 0, "tjugoandre", F(MASCULINE_GENDER) | ORD}, + {"23", 0, "tjugotre", F(MASCULINE_GENDER)}, + {"23", 0, "tjugotredje", F(MASCULINE_GENDER) | ORD}, + {"100", 0, "etthundra", F(MASCULINE_GENDER)}, + {"100", 0, "etthundrade", F(MASCULINE_GENDER) | ORD}, + {"101", 0, "etthundraen", F(MASCULINE_GENDER)}, + {"101", 0, "etthundraförste", F(MASCULINE_GENDER) | ORD}, + {"1000", 0, "ettusen", F(MASCULINE_GENDER)}, + {"1000", 0, "ettusende", F(MASCULINE_GENDER) | ORD}, + {"1001", 0, "ettusenen", F(MASCULINE_GENDER)}, + {"1001", 0, "ettusenförste", F(MASCULINE_GENDER) | ORD}, + {"1002", 0, "ettusentvå", F(MASCULINE_GENDER)}, + {"1002", 0, "ettusenandre", F(MASCULINE_GENDER) | ORD}, + {"1000000", 0, "enmiljon", F(MASCULINE_GENDER)}, + {"1000000", 0, "enmiljonte", F(MASCULINE_GENDER) | ORD}, + {"1000001", 0, "enmiljonen", F(MASCULINE_GENDER)}, + {"1000001", 0, "enmiljonförste", F(MASCULINE_GENDER) | ORD}, + {"1000002", 0, "enmiljontvå", F(MASCULINE_GENDER)}, + {"1000002", 0, "enmiljonandre", F(MASCULINE_GENDER) | ORD}, + {"1000003", 0, "enmiljontre", F(MASCULINE_GENDER)}, + {"1000003", 0, "enmiljontredje", F(MASCULINE_GENDER) | ORD}, + {"0", 0, "noll", F(FEMININE_GENDER)}, + {"0", 0, "nollte", F(FEMININE_GENDER) | ORD}, + {"1", 0, "en", F(FEMININE_GENDER)}, + {"1", 0, "första", F(FEMININE_GENDER) | ORD}, + {"2", 0, "två", F(FEMININE_GENDER)}, + {"2", 0, "andra", F(FEMININE_GENDER) | ORD}, + {"3", 0, "tre", F(FEMININE_GENDER)}, + {"3", 0, "tredje", F(FEMININE_GENDER) | ORD}, + {"21", 0, "tjugoen", F(FEMININE_GENDER)}, + {"21", 0, "tjugoförsta", F(FEMININE_GENDER) | ORD}, + {"22", 0, "tjugotvå", F(FEMININE_GENDER)}, + {"22", 0, "tjugoandra", F(FEMININE_GENDER) | ORD}, + {"23", 0, "tjugotre", F(FEMININE_GENDER)}, + {"23", 0, "tjugotredje", F(FEMININE_GENDER) | ORD}, + {"100", 0, "etthundra", F(FEMININE_GENDER)}, + {"100", 0, "etthundrade", F(FEMININE_GENDER) | ORD}, + {"101", 0, "etthundraen", F(FEMININE_GENDER)}, + {"101", 0, "etthundraförsta", F(FEMININE_GENDER) | ORD}, + {"1000", 0, "ettusen", F(FEMININE_GENDER)}, + {"1000", 0, "ettusende", F(FEMININE_GENDER) | ORD}, + {"1001", 0, "ettusenen", F(FEMININE_GENDER)}, + {"1001", 0, "ettusenförsta", F(FEMININE_GENDER) | ORD}, + {"1002", 0, "ettusentvå", F(FEMININE_GENDER)}, + {"1002", 0, "ettusenandra", F(FEMININE_GENDER) | ORD}, + {"1000000", 0, "enmiljon", F(FEMININE_GENDER)}, + {"1000000", 0, "enmiljonte", F(FEMININE_GENDER) | ORD}, + {"1000001", 0, "enmiljonen", F(FEMININE_GENDER)}, + {"1000001", 0, "enmiljonförsta", F(FEMININE_GENDER) | ORD}, + {"1000002", 0, "enmiljontvå", F(FEMININE_GENDER)}, + {"1000002", 0, "enmiljonandra", F(FEMININE_GENDER) | ORD}, + {"1000003", 0, "enmiljontre", F(FEMININE_GENDER)}, + {"1000003", 0, "enmiljontredje", F(FEMININE_GENDER) | ORD}, + {"100", 0, "ett|hundra", F(COMPONENT_HYPHENATION)}, + {"100", 0, "ett|hun|dra", F(SYLLABLE_HYPHENATION)}, + {"100", 0, "ett|hun¦dra", F(SECONDARY_HYPHENATION)}, + {"100", 0, "ett|hundra", F(HYPHENATED) | F(COMPONENT_HYPHENATION)}, + {"100", 0, "ett|hun|dra", F(HYPHENATED) | F(SYLLABLE_HYPHENATION)}, + {"100", 0, "ett|hun¦dra", F(HYPHENATED) | F(SECONDARY_HYPHENATION)}, + {"1000", 0, "ettusen", F(COMPONENT_HYPHENATION)}, + {"1000", 0, "ettu|sen", F(SYLLABLE_HYPHENATION)}, + {"1000", 0, "ettu¦sen", F(SECONDARY_HYPHENATION)}, + {"1000", 0, "ettusen", F(HYPHENATED) | F(COMPONENT_HYPHENATION)}, + {"1000", 0, "ettu|sen", F(HYPHENATED) | F(SYLLABLE_HYPHENATION)}, + {"1000", 0, "ettu¦sen", F(HYPHENATED) | F(SECONDARY_HYPHENATION)}, + {"1000", 0, "e\"ttusen", F(COMPONENT_HYPHENATION) | F(LATEX_TRIPLETS)}, + {"1000", 0, "e\"ttu|sen", F(SYLLABLE_HYPHENATION) | F(LATEX_TRIPLETS)}, + {"1000", 0, "e\"ttu¦sen", F(SECONDARY_HYPHENATION) | F(LATEX_TRIPLETS)}, + {"1000", 0, "e\"ttusen", F(HYPHENATED) | F(COMPONENT_HYPHENATION) | F(LATEX_TRIPLETS)}, + {"1000", 0, "e\"ttu|sen", F(HYPHENATED) | F(SYLLABLE_HYPHENATION) | F(LATEX_TRIPLETS)}, + {"1000", 0, "e\"ttu¦sen", F(HYPHENATED) | F(SECONDARY_HYPHENATION) | F(LATEX_TRIPLETS)}, + {"1000", 0, "ett|tusen", F(COMPONENT_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, + {"1000", 0, "ett|tu|sen", F(SYLLABLE_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, + {"1000", 0, "ett|tu¦sen", F(SECONDARY_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, + {"1000", 0, "ett|tusen", F(HYPHENATED) | F(COMPONENT_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, + {"1000", 0, "ett|tu|sen", F(HYPHENATED) | F(SYLLABLE_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, + {"1000", 0, "ett|tu¦sen", F(HYPHENATED) | F(SECONDARY_HYPHENATION) | F(EXPLICIT_TRIPLETS)}, + {"54248", 0, "femtio|fyra|tusen|två|hundra|fyrtio|åtta", F(COMPONENT_HYPHENATION)}, + {"54248", 0, "fem|tio|fy|ra|tu|sen|två|hun|dra|fyr|tio|åt|ta", F(SYLLABLE_HYPHENATION)}, + {"54248", 0, "fem¦tio|fy¦ra|tu¦sen|två|hun¦dra|fyr¦tio|åt¦ta", F(SECONDARY_HYPHENATION)}, + {"54248", 0, "femtio-fyra|tusen-två|hundra-fyrtio-åtta", F(HYPHENATED) | F(COMPONENT_HYPHENATION)}, + {"54248", 0, "fem|tio-fy|ra|tu|sen-två|hun|dra-fyr|tio-åt|ta", F(HYPHENATED) | F(SYLLABLE_HYPHENATION)}, + {"54248", 0, "fem¦tio-fy¦ra|tu¦sen-två|hun¦dra-fyr¦tio-åt¦ta", F(HYPHENATED) | F(SECONDARY_HYPHENATION)}, }; int main(void) { + char numbuf[8 << 10]; char buf[2 << 10]; - ssize_t len; - size_t i; - int ok = 1; + ssize_t len, r; + size_t i, j, z, numlen, failures = 0; + struct test *t; for (i = 0; i < sizeof(tests) / sizeof(*tests); i++) { - len = libnumtext_num2text(buf, sizeof(buf), tests[i].num, strlen(tests[i].num), LIBNUMTEXT_SWEDISH, tests[i].flags); - if (len < 0) - fprintf(stderr, "Error at test %zu: %s\n", i + 1, strerror(errno)); - else if ((size_t)len > sizeof(buf)) - fprintf(stderr, "Test %zu returned result larger (%zi) than buffer (%zu)\n", i + 1, len, sizeof(buf)); - else if (!len) - fprintf(stderr, "Test %zu returned zero-sized result\n", i + 1); - else if (buf[len - 1]) - fprintf(stderr, "Test %zu returned non-NUL-terminated result\n", i + 1); - else if (strcmp(buf, tests[i].expect)) - fprintf(stderr, "Test %zu returned incorrect result: %s\n", i + 1, buf); + j = i + 1; + t = &tests[i]; + numlen = strlen(t->num); + memcpy(numbuf, t->num, numlen); + for (z = 0; z < t->zeroes; z++) + numbuf[numlen++] = '0'; + numbuf[numlen] = '\0'; + len = libnumtext_num2text(buf, sizeof(buf), numbuf, numlen, LIBNUMTEXT_SWEDISH, t->flags); + if (len < 0) { + fprintf(stderr, "Error at test %zu: %s\n", j, strerror(errno)); + } else if ((size_t)len > sizeof(buf)) { + fprintf(stderr, "Test %zu returned result larger (%zi) than buffer (%zu)\n", j, len, sizeof(buf)); + } else if (!len) { + fprintf(stderr, "Test %zu returned zero-sized result\n", j); + } else if (buf[len - 1]) { + fprintf(stderr, "Test %zu returned non-NUL-terminated result\n", j); + } else if (strcmp(buf, t->expect)) { + fprintf(stderr, "Test %zu returned incorrect result: %s\n", j, buf); + } else if ((r = libnumtext_num2text(buf, 2, numbuf, numlen, LIBNUMTEXT_SWEDISH, t->flags)) != len) { + fprintf(stderr, "Test %zu has invalid return size when buffer is undersized: %zi\n", j, r); + } else if (buf[1]) { + fprintf(stderr, "Test %zu returned non-NUL-terminated result when buffer is undersized\n", j); + } else if (buf[0] != t->expect[0]) { + fprintf(stderr, "Test %zu returned incorrect result when buffer is undersized\n", j); + } else if ((r = libnumtext_num2text(NULL, 0, numbuf, numlen, LIBNUMTEXT_SWEDISH, t->flags)) != len) { + fprintf(stderr, "Test %zu has invalid return size when buffer is NULL: %zi\n", j, r); + } else { + numbuf[numlen + 0] = 'x'; + numbuf[numlen + 1] = '\0'; + libnumtext_num2text(buf, sizeof(buf), numbuf, numlen, LIBNUMTEXT_SWEDISH, t->flags); + if (r != len) { + fprintf(stderr, "Test %zu has invalid return size when buffer is not NUL-terminated: %zi\n", j, r); + } else if (buf[len - 1]) { + fprintf(stderr, "Test %zu returned non-NUL-terminated result when buffer is not NUL-terminated\n", j); + } else if (strcmp(buf, t->expect)) { + fprintf(stderr, "Test %zu has incorrect result when buffer is not NUL-terminated: %s\n", j, buf); + } else { + continue; + } + } + if (t->zeroes) + fprintf(stderr, "\tInput: \"%s\"e%zu\n", t->num, t->zeroes); else - continue; - fprintf(stderr, "\tInput: %s\n", tests[i].num); - fprintf(stderr, "\tExpected: %s\n", tests[i].expect); - fprintf(stderr, "\tFlags: 0x%08x\n", tests[i].flags); - ok = 0; + fprintf(stderr, "\tInput: %s\n", t->num); + fprintf(stderr, "\tExpected: %s\n", t->expect); + fprintf(stderr, "\tFlags: 0x%08x\n", t->flags); + failures += 1; } - /* TODO test sign prefix */ - /* TODO test for failures */ - /* TODO test undersized buf */ - /* TODO test NULL buf */ - /* TODO test non-NUL terminated input */ + /* TODO test for incorrect and oversized input */ /* TODO test for separator removal */ - /* TODO test LIBNUMTEXT_N2T_SWEDISH_ORDINAL */ /* TODO test LIBNUMTEXT_N2T_SWEDISH_DENOMINATOR */ /* TODO test LIBNUMTEXT_N2T_SWEDISH_PLURAL_FORM */ /* TODO test LIBNUMTEXT_N2T_SWEDISH_DEFINITE_FORM */ - return !ok; + if (failures > 0) { + fprintf(stderr, "Failure count: %zu\n", failures); + return 1; + } + return 0; } |