ttlogo.jpg Free TextTransformer Projects
Home
Text2HTML
Wikipedia
Yacc2TT
Delphi parser
Java parser
C preprocessor
C parser
HTML4
Utilities
XML-Writer
MergeHTML
RtfCheck
Zahl2Nombre
MIME parser
Spamfilter
Additional Examples
Free components
  Minimal Website   Impressum

Zahl2Nombre


The project Zahl2Nombretranslates German numerals into French numerals.

It is interesting to know, that TextTransformer a kind of program, thats called a compiler compiler and a compiler is frequently described as a translator since it translates program code into a language which the computer understands. So TextTransformer is a tool for the construction of translators. The term "translator" corresponds to his everyday meaning at the project Zahl2Nombre.

The project can be downloaded here: Zahl2Nombre.ttp
A text for tsting Zahl2Nombre is: Zahl2Nombre_Test.txt
The text copy for this HTML page is: Zahl2Nombre.txt

The rules for the construction of the numerals are immediately known to every German-speaking reader. The task of writing such a translator nevertheless isn't an easy work even for a German native speaker and the resulting program isn't very clear. This is due to the fact, that natural-language expressions always contain irregularities and exceptions which make a formal representation difficult. Also the construction of French numerals is quite different from the German numerals. So, even if the German word has been analyzed correctly, the synthesis of the French word cannot be done 1:1.
E.g. the order of the single-digit numbers and the tenners is mixed up opposite in French and in German. The French "vingt et un" literally translatetd would be "zwanzig und eins" and not "einundzwanzig". Even more difficult is the translation of numbers greater than 70. The number "sechsundneunzig" is "quatre-vingt seize" in French, what would be translated literally: "vier-zwanzig-sechzehn" ("four-twenty-sixteen").

Because of these difficulties, it probably would make more sense in a serious application to make the first thousand numeral translations by a table. However, I have enjoyed this tossing work and at least for didactic purposes, it might be useful.


Translation table

German  French 
null  zéro 
eins  un 
zwei  deux 
drei  trois 
vier  quatre 
fünf  cinq 
sechs  six 
sieben  sept 
acht  huit 
neun  neuf 
zehn  dix 
elf  onze 
zwölf  douze 
dreizehn  treize 
vierzehn  quatorze 
fünfzehn  quinze 
sechzehn  seize 
siebzehn  dix-sept 
achtzehn  dix-huit 
neunzehn  dix-neuf 
zwanzig  vingt 
einundzwanzig  vingt et un 
zweiundzwanzig  vingt-deux 
dreiundzwanzig  vingt-trois 
vierundzwanzig  vingt-quatre 
fünfundzwanzig  vingt-cinq 
sechsundzwanzig  vingt-six 
siebenundzwanzig  vingt-sept 
achtundzwanzig  vingt-huit 
neunundzwanzig  vingt-neuf 
dreißig  trente 
einunddreißig  trente et un 
zweiunddreißig  trente-deux 
vierzig  quarante 
einundvierzig  quarante et un 
fünfzig  cinquante 
einundfünfzig  cinquante et un 
sechzig  soixante 
einundsechzig  soixante et un 
siebzig  soixante-dix 
einundsiebzig  soixante et onze 
zweiundsiebzig  soixante-douze 
dreiundsiebzig  soixante-treize 
achtzig  quatre-vingts 
einundachtzig  quatre-vingt-un 
zweiundachtzig  quatre-vingts-deux 
dreiundachtzig  quatre-vingts-trois 
neunzig  quatre-vingt-dix 
einundneunzig  quatre-vingt-onze 
sechsundneunzig  quatre-vingt-seize 
neunundneunzig  quatre-vingt-dix-neuf 
hundert  cent 
hunderteins  cent un 
hundertfünf  cent cinq 
hundertzehn  cent dix 
hundertzwanzig  cent vingt 
zweihundert  deux cents 
tausend  mille 
tausendeins  mille un 
tausendzweihundert  mille deux cents 
zweitausend  deux mille 
zweitausendzehn  deux mille dix 
eine Million  un million 

Last update: 19.10.05

 to the top