fr-tts improvements from Issue 614
This commit is contained in:
parent
2873893ff7
commit
20af17276e
1 changed files with 12 additions and 13 deletions
|
@ -5,29 +5,28 @@ language(fr).
|
|||
% before each announcement (beep)
|
||||
preamble - [].
|
||||
|
||||
|
||||
%% TURNS
|
||||
turn('left', ['tournez à gauche ']).
|
||||
turn('left_sh', ['immédiatement à gauche ']).
|
||||
turn('left_sh', ['tournez immédiatement à gauche ']).
|
||||
turn('left_sl', ['tournez légèrement à gauche ']).
|
||||
turn('right', ['tournez à droite ']).
|
||||
turn('right_sh', ['immédiatement à droite ']).
|
||||
turn('right_sh', ['tournez immédiatement à droite ']).
|
||||
turn('right_sl', ['tournez légèrement à droite ']).
|
||||
|
||||
prepare_turn(Turn, Dist) == ['Préparez vous à ', M, ' dans ', D] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
prepare_turn(Turn, Dist) == ['Dans ', D, ' préparez vous à ', M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn, Dist) == ['Dans ', D, M] :-
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
distance(Dist) == D, turn(Turn, M).
|
||||
turn(Turn) == M :- turn(Turn, M).
|
||||
|
||||
prepare_make_ut(Dist) == ['Dans ', D, ' préparez vous à faire demi tour'] :-
|
||||
distance(Dist) == D.
|
||||
distance(Dist) == D.
|
||||
|
||||
prepare_roundabout(Dist) == ['Préparez vous à entrer dans le rondpoint dans ', D] :-
|
||||
distance(Dist) == D.
|
||||
distance(Dist) == D.
|
||||
|
||||
make_ut(Dist) == ['Dans ', D, ' faites demi-tour '] :-
|
||||
distance(Dist) == D.
|
||||
distance(Dist) == D.
|
||||
make_ut == ['Faites demi-tour '].
|
||||
|
||||
roundabout(Dist, _Angle, Exit) == ['Dans ', D, ' entrez dans le rond-point et prenez la ', E, 'sortie'] :- distance(Dist) == D, nth(Exit, E).
|
||||
|
@ -38,7 +37,7 @@ then == ['puis '].
|
|||
reached_destination == ['vous êtes arrivé à destination '].
|
||||
bear_right == ['serrez à droite '].
|
||||
bear_left == ['serrez à gauche '].
|
||||
route_recalc(_Dist) == []. % ['recalcul de l itinéraire ']. %nothing to said possibly beep?
|
||||
route_recalc(_Dist) == []. % ['recalcul de l itinéraire ']. %nothing to said possibly beep?
|
||||
route_new_calc(Dist) == ['L itinéraire fait ', D] :- distance(Dist) == D. % nothing to said possibly beep?
|
||||
|
||||
go_ahead(Dist) == ['Continuez pendant ', D]:- distance(Dist) == D.
|
||||
|
@ -66,8 +65,8 @@ nth(17, '17ème ').
|
|||
%%% distance measure
|
||||
distance(Dist) == [ X, ' metres'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metres'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == ['quelque 1 kilometre '] :- Dist < 1500.
|
||||
distance(Dist) == ['quelques ', X, ' kilomètres '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['environ 1 kilometre '] :- Dist < 1500.
|
||||
distance(Dist) == ['environ ', X, ' kilomètres '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilomètres '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
|
||||
%% resolve command main method
|
||||
|
@ -76,7 +75,7 @@ distance(Dist) == [ X, ' kilomètres '] :- D is round(Dist/1000), num_atom(D, X)
|
|||
flatten(X, Y) :- flatten(X, [], Y), !.
|
||||
flatten([], Acc, Acc).
|
||||
flatten([X|Y], Acc, Res):-
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(Y, Acc, R), flatten(X, R, Res).
|
||||
flatten(X, Acc, [X|Acc]).
|
||||
|
||||
resolve(X, Y) :- resolve_impl(X,Z), flatten(Z, Y).
|
||||
|
|
Loading…
Reference in a new issue