Commit 56d6fa7d authored by auraes's avatar auraes 💬
Browse files

Suppression de la préposition "à" dans Translation()

parent 138ed14b
......@@ -309,6 +309,7 @@ Array StorageForShortName buffer 12; !Warning, valeur à ne pas dépasser
rfalse;
];
#IfV5;
! From library 6.12
[ LTI_Insert i ch b y; !WARNING vérifier pour v3
......@@ -324,12 +325,10 @@ Array StorageForShortName buffer 12; !Warning, valeur à ne pas dépasser
! Move the subsequent text along one character:
for (y=y+2 : y>i : y--) b->y = b->(y-1);
b->i = ch;
#IfV3;
#IfNot;
! And the text is now one character longer:
if (b->1 < b->0) (b->1)++;
#Endif;
];
#Endif;
! Header constants
Constant HDR_DICTIONARY = $8; ! Actual address
......
......@@ -48,50 +48,45 @@
Verb 'parler'
* 'à'/'au'/'aux'/'avec' creature -> TalkTo
* creature -> TalkTo
* 'à'/'au'/'aux'/'avec' creature
'de'/'d^'/'du'/'des' topic -> Tell
* 'de'/'d^'/'du'/'des' topic
'à'/'au'/'aux'/'avec' creature -> Tell reverse
* creature 'de'/'d^'/'du'/'des' topic -> Tell
;
#Ifnot;
Verb 'parler'
* 'à'/'au'/'aux'/'avec' creature
'de'/'d^'/'du'/'des' topic -> Tell
* 'de'/'d^'/'du'/'des' topic
'à'/'au'/'aux'/'avec' creature -> Tell reverse
* creature 'de'/'d^'/'du'/'des' topic -> Tell
;
#Endif;
Verb 'répondre'
* 'à'/'au'/'aux' creature topic -> Answer reverse
* creature topic -> Answer reverse
* topic 'à'/'au'/'aux' creature -> Answer
;
Verb 'demander'
* noun 'à'/'au'/'aux' creature -> AskFor reverse
* 'à'/'au'/'aux' creature noun -> AskFor
* creature noun -> AskFor
* 'à'/'au'/'aux' creature 'de'/'d^' topic -> AskTo
* creature 'de'/'d^' topic -> AskTo
;
Verb 'dire'
* 'à'/'au'/'aux' creature 'de'/'d^' topic -> AskTo
* 'à'/'au'/'aux' creature topic -> Answer reverse
* creature 'de'/'d^' topic -> AskTo
* creature topic -> Answer reverse
* topic 'à'/'au'/'aux' creature -> Answer
;
Verb 'interroger'
* creature 'sur' topic -> Ask ! concernant
* creature 'à' 'propos' 'de'/'d^'/'du'/'des' topic-> Ask ! au_sujet_de
* creature 'sur' topic -> Ask ! concernant à_propos_de
;
!Verb 'attaquer'
! * creature -> Attack !noun?
! * creature 'avec' held -> Attack
!;
Verb 'montrer'
* held 'à'/'au'/'aux' creature -> Show
* 'à'/'au'/'aux' creature held -> Show reverse
* creature held -> Show reverse
;
#IfDef OPTIONAL_EXTENDED_VERBSET;
......@@ -223,7 +218,7 @@ Verb 'acheter'
Verb 'donner'
* held 'à'/'au'/'aux' creature -> Give
* 'à'/'au'/'aux' creature held -> Give reverse
* creature held -> Give reverse
;
Verb 'lancer' 'jeter'
......@@ -231,7 +226,7 @@ Verb 'lancer' 'jeter'
* held 'à'/'au'/'aux' noun -> ThrowAt
* held 'sur'/'dans'/'contre'/
'par'/'par-dessus' noun -> ThrowAt
* 'à'/'au'/'aux' noun held -> ThrowAt reverse
* creature held -> ThrowAt reverse
;
Verb 'poser'
......
......@@ -79,8 +79,7 @@ Verb 'dire'
;
Verb 'interroger'
* creature 'sur' topic -> Ask ! concernant
! * creature 'a' 'propos' 'de'/'des' topic -> Ask ! au_sujet_de
* creature 'sur' topic -> Ask ! concernant à_propos_de
;
Verb 'montrer'
......
......@@ -96,15 +96,14 @@ System_file;
#Endif;
#IfDef AVEC_ACCENTS;
[ Translation n i w w1 r;
! Tokenise__(buffer, parse); ! FIXME utile pour phrase incomplète?
[ Translation n i w1 w2 r;
xBeforeParsing();
!r = 0;
n = NbMotPhrase();
#IfDef AVEC_ACCENTS;
for (i=1: i<=n: i++) {
w = DicMot(i);
if (w == 0) { ! WARNING si >= 9 ou 6
w1 = DicMot(i);
if (w1 == 0) { ! WARNING si >= 9 ou 6
r = DecolleApostrophe(i);
if (r) {
n++;
......@@ -112,59 +111,7 @@ System_file;
}
}
}
if (n == 1) return;
! Pronoms avant le verbe
w = DicMot(1);
w1 = DicMot(2);
r = 2;
switch (w) { !y en
'se', 's^': w = "se"; r = 1;
'l^': w = "-l'"; r = 1;
'le':
switch (w1) {
'lui': w = "-le à lui";
'leur': w = "-le à leur";
default: w = "-le"; r = 1;
}
'la':
switch (w1) {
'lui': w = "-la à lui";
'leur': w = "-la à leur";
default: w = "-la"; r = 1;
}
'les':
switch (w1) {
'lui': w = "-les à lui";
'leur': w = "-les à leur";
default: w = "-les"; r = 1;
}
'lui': w = "à lui"; r = 1;
'leur': w = "à leur"; r = 1;
default: r = 0;
}
if (r) {
if (r == 1) {
EffaceMot(1);
InsertMot(3, w);
}
else {
EffaceMot(1);
EffaceMot(2);
InsertMot(4, w);
}
Tokenise__(buffer, parse);
}
];
#IfNot;
[ Translation n i w w1 r;
! Tokenise__(buffer, parse);
n = NbMotPhrase();
for (i=1: i<=n: i++) {
w = DicMot(i);
if (w == 0) { ! WARNING si >= 9 ou 6
......@@ -192,52 +139,52 @@ System_file;
}
#EndIf;
}
if (n == 1) return;
#EndIf;
! Pronoms avant le verbe
if (n == 1) return;
w = DicMot(1);
w1 = DicMot(2);
w1 = parse-->1;
w2 = parse-->3;
r = 2;
switch (w) { !y en
'se', 's^': w = "se"; r = 1;
'l^': w = "-l'"; r = 1;
switch (w1) { !y en
'se', 's^': w1 = "se"; r = 1;
'l^': w1 = "-l'"; r = 1;
'le':
switch (w1) {
'lui': w = "-le a lui";
'leur': w = "-le a leur";
default: w = "-le"; r = 1;
switch (w2) {
'lui': w1 = "lui -le";
'leur': w1 = "leur -le";
default: w1 = "-le"; r = 1;
}
'la':
switch (w1) {
'lui': w = "-la a lui";
'leur': w = "-la a leur";
default: w = "-la"; r = 1;
switch (w2) {
'lui': w1 = "lui -la";
'leur': w1 = "leur -la";
default: w1 = "-la"; r = 1;
}
'les':
switch (w1) {
'lui': w = "-les a lui";
'leur': w = "-les a leur";
default: w = "-les"; r = 1;
switch (w2) {
'lui': w1 = "lui -les";
'leur': w1 = "leur -les";
default: w1 = "-les"; r = 1;
}
'lui': w = "a lui"; r = 1;
'leur': w = "a leur"; r = 1;
'lui': w1 = "lui"; r = 1;
'leur': w1 = "leur"; r = 1;
default: r = 0;
}
if (r) {
if (r == 1) {
EffaceMot(1);
InsertMot(3, w);
InsertMot(3, w1);
}
else {
EffaceMot(1);
EffaceMot(2);
InsertMot(4, w);
InsertMot(4, w1);
}
Tokenise__(buffer, parse);
}
xBeforeParsing();
];
#EndIf;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment