Commit:643089457244c0679a0826d985c1d295a0081016

* ttsconfig.p was not UTF-8 as it should be. So was problems with special characters
Latvian has two ways here to say distance
Small word replacements to correct ones like turn -> prepeare
This commit is contained in:
Gints Polis 2012-06-13 22:03:45 +03:00
parent eae0274b0b
commit b3d8919b6e

View file

@ -1,4 +1,4 @@
:- op('==', xfy, 500). :- op('==', xfy, 500).
version(101). version(101).
language(lv). language(lv).
@ -14,61 +14,67 @@ turn('right', ['griezties pa labi ']).
turn('right_sh', ['strauji pagriezties pa labi ']). turn('right_sh', ['strauji pagriezties pa labi ']).
turn('right_sl', ['pagriezties pa labi ']). turn('right_sl', ['pagriezties pa labi ']).
prepare_turn(Turn, Dist) == ['Pçc ', D, ' pagriezties ', 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, Dist) == ['Pēc ', D, M] :- distance(Dist) == D, turn(Turn, M).
turn(Turn) == M :- turn(Turn, M). turn(Turn) == M :- turn(Turn, M).
prepare_make_ut(Dist) == ['Gatavojaties apgriezties pçc ', D] :- distance(Dist) == D. 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(Dist) == ['Pēc ', D, ' apgriežaties '] :- distance(Dist) == D.
make_ut == ['Apgrieþaties ']. make_ut == ['Apgriežaties '].
make_ut_wp == ['Apgrieþaties pie pirmâs iespçjas ']. make_ut_wp == ['Apgriežaties pie pirmās iespējas '].
prepare_roundabout(Dist) == ['Sagatvojaties lokveida kustîbai ', D] :- distance(Dist) == D. 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(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). roundabout(_Angle, Exit) == ['izbrauciet ', E, 'izbrauktuvē'] :- nth(Exit, E).
go_ahead == ['Dodaties taisni uz priekðu ']. go_ahead == ['Dodaties taisni uz priekšu '].
go_ahead(Dist) == ['Brauciet pa ceïu ', D]:- distance(Dist) == D. 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 ']. then == ['tad '].
reached_destination == ['jûs esiet nokïuvis galapunktâ ']. reached_destination == ['jūs esiet nokļuvis galapunktā '].
bear_right == ['turieties pa labi ']. bear_right == ['turēties pa labi '].
bear_left == ['turieties pa kreisi ']. bear_left == ['turēties pa kreisi '].
route_new_calc(Dist) == ['Brauciens ir ', 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 ', D] :- distance(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(1, 'pirma ').
nth(2, 'otrais '). nth(2, 'otra ').
nth(3, 'treðais '). nth(3, 'trešajā ').
nth(4, 'ceturtais '). nth(4, 'ceturta ').
nth(5, 'piektais '). nth(5, 'piekta ').
nth(6, 'sestais '). nth(6, 'sesta ').
nth(7, 'septîtais '). nth(7, 'septītajā ').
nth(8, 'astotais '). nth(8, 'astota ').
nth(9, 'devîtais '). nth(9, 'devītajā ').
nth(10, 'desmit '). nth(10, 'desmitajā ').
nth(11, 'vienpadsmitais '). nth(11, 'vienpadsmita ').
nth(12, 'divpadsmitais '). nth(12, 'divpadsmita ').
nth(13, 'trîspadsmitais '). nth(13, 'trīspadsmitajā ').
nth(14, 'èetrpadsmitais '). nth(14, 'četrpadsmitajā ').
nth(15, 'piecpadsmitais '). nth(15, 'piecpadsmita ').
nth(16, 'seðpadsmitais '). nth(16, 'sešpadsmitajā ').
nth(17, 'septiòpadsmitais '). 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 < 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) == [ 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 viena kilometera '] :- Dist < 1500.
distance(Dist) == ['aptuveni ', X, ' kilometeri '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X). distance(Dist) == ['aptuveni ', X, ' kilometeriem '] :- 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) == [ 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 %% resolve command main method