Merge pull request #263 from gintsgints/master

Latvian tts file bugfix
This commit is contained in:
vshcherb 2012-06-14 02:43:19 -07:00
commit 945d83251a

View file

@ -1,4 +1,4 @@
:- op('==', xfy, 500).
:- op('==', xfy, 500).
version(101).
language(lv).
@ -14,61 +14,67 @@ turn('right', ['griezties pa labi ']).
turn('right_sh', ['strauji pagriezties pa labi ']).
turn('right_sl', ['pagriezties pa labi ']).
prepare_turn(Turn, Dist) == ['Pçc ', D, ' pagriezties ', M] :- distance(Dist) == D, turn(Turn, M).
turn(Turn, Dist) == ['Pçc ', D, M] :- distance(Dist) == D, turn(Turn, M).
prepare_turn(Turn, Dist) == ['Pēc ', D, ' gatavoties pa', M] :- distance(Dist) == D, turn(Turn, M).
turn(Turn, Dist) == ['Pēc ', D, M] :- distance(Dist) == D, turn(Turn, M).
turn(Turn) == M :- turn(Turn, M).
prepare_make_ut(Dist) == ['Gatavojaties apgriezties pçc ', D] :- distance(Dist) == D.
make_ut(Dist) == ['Pçc ', D, ' apgrieþaties '] :- distance(Dist) == D.
make_ut == ['Apgrieþaties '].
make_ut_wp == ['Apgrieþaties pie pirmâs iespçjas '].
prepare_make_ut(Dist) == ['Gatavojaties apgriezties pēc ', D] :- distance(Dist) == D.
make_ut(Dist) == ['Pēc ', D, ' apgriežaties '] :- distance(Dist) == D.
make_ut == ['Apgriežaties '].
make_ut_wp == ['Apgriežaties pie pirmās iespējas '].
prepare_roundabout(Dist) == ['Sagatvojaties lokveida kustîbai ', D] :- distance(Dist) == D.
roundabout(Dist, _Angle, Exit) == ['Pçc ', D, ' iebrauciet lokveida krustojumâ, un tad brauciet ', E, 'pagriezienâ'] :- distance(Dist) == D, nth(Exit, E).
roundabout(_Angle, Exit) == ['izbrauciet ', E, 'izbrauktuvç'] :- nth(Exit, E).
prepare_roundabout(Dist) == ['Sagatvojaties lokveida kustībai pēc ', D] :- distance(Dist) == D.
roundabout(Dist, _Angle, Exit) == ['Pēc ', D, ' iebrauciet lokveida krustojumā, un tad brauciet ', E, 'pagriezienā'] :- distance(Dist) == D, nth(Exit, E).
roundabout(_Angle, Exit) == ['izbrauciet ', E, 'izbrauktuvē'] :- nth(Exit, E).
go_ahead == ['Dodaties taisni uz priekðu '].
go_ahead(Dist) == ['Brauciet pa ceïu ', D]:- distance(Dist) == D.
go_ahead == ['Dodaties taisni uz priekšu '].
go_ahead(Dist) == ['Brauciet pa ceļu ', D]:- distance2(Dist) == D.
and_arrive_destination == ['un ierodaties galapunktâ '].
and_arrive_destination == ['un ierodaties galapunktā '].
then == ['tad '].
reached_destination == ['jûs esiet nokïuvis galapunktâ '].
bear_right == ['turieties pa labi '].
bear_left == ['turieties pa kreisi '].
reached_destination == ['jūs esiet nokļuvis galapunktā '].
bear_right == ['turēties pa labi '].
bear_left == ['turēties pa kreisi '].
route_new_calc(Dist) == ['Brauciens ir ', D] :- distance(Dist) == D.
route_recalc(Dist) == ['Marðruts ir pârçíinâts, attâlums ', D] :- distance(Dist) == D.
route_new_calc(Dist) == ['Brauciens ir ', D] :- distance2(Dist) == D.
route_recalc(Dist) == ['Maršruts ir pārēķināts, attālums ir ', D] :- distance2(Dist) == D.
location_lost == ['pazudis g p s signâls '].
location_lost == ['pazudis g p s signāls '].
%%
nth(1, 'pirmais ').
nth(2, 'otrais ').
nth(3, 'treðais ').
nth(4, 'ceturtais ').
nth(5, 'piektais ').
nth(6, 'sestais ').
nth(7, 'septîtais ').
nth(8, 'astotais ').
nth(9, 'devîtais ').
nth(10, 'desmit ').
nth(11, 'vienpadsmitais ').
nth(12, 'divpadsmitais ').
nth(13, 'trîspadsmitais ').
nth(14, 'èetrpadsmitais ').
nth(15, 'piecpadsmitais ').
nth(16, 'seðpadsmitais ').
nth(17, 'septiòpadsmitais ').
nth(1, 'pirma ').
nth(2, 'otra ').
nth(3, 'trešajā ').
nth(4, 'ceturta ').
nth(5, 'piekta ').
nth(6, 'sesta ').
nth(7, 'septītajā ').
nth(8, 'astota ').
nth(9, 'devītajā ').
nth(10, 'desmitajā ').
nth(11, 'vienpadsmita ').
nth(12, 'divpadsmita ').
nth(13, 'trīspadsmitajā ').
nth(14, 'četrpadsmitajā ').
nth(15, 'piecpadsmita ').
nth(16, 'sešpadsmitajā ').
nth(17, 'septiņpadsmitajā ').
%%% distance measure
%%% distance measure - Pēc xxx
distance(Dist) == [ X, ' meteriem'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
distance(Dist) == [ X, ' meteriem'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
distance(Dist) == ['aptuveni 1 kilometers '] :- Dist < 1500.
distance(Dist) == ['aptuveni ', X, ' kilometeri '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
distance(Dist) == [ X, ' kilometri '] :- D is round(Dist/1000), num_atom(D, X).
distance(Dist) == ['aptuveni viena kilometera '] :- Dist < 1500.
distance(Dist) == ['aptuveni ', X, ' kilometeriem '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
distance(Dist) == [ X, ' kilometriem '] :- D is round(Dist/1000), num_atom(D, X).
%%% distance mesure - Attālums ir xxx ....metri...
distance2(Dist) == [ X, ' meteri'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
distance2(Dist) == [ X, ' meteri'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
distance2(Dist) == ['aptuveni 1 kilometrs '] :- Dist < 1500.
distance2(Dist) == ['aptuveni ', X, ' kilometri '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
distance2(Dist) == [ X, ' kilometri '] :- D is round(Dist/1000), num_atom(D, X).
%% resolve command main method