fix constant division inside round() in ttsconfigs
This commit is contained in:
parent
f39bd801f4
commit
d90ee505b4
17 changed files with 104 additions and 104 deletions
|
@ -103,29 +103,29 @@ nth(17, instrumental, 'sedmnáctým').
|
|||
% SVOX bug: without "dál" says "pokračujte osmdesáti metrů" instead of "pokračujte osmdesát metrů"
|
||||
% "pokračujte rovně 80 metrů" does not work either
|
||||
% SVOX bug: "pokracujte dal priblizne 3 kilometry" is pronounced as "pokracujte dal priblizne tremi kilometry"
|
||||
distance(Dist,workaround) == [ 'dál', X, 'metrů'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist,workaround) == [ 'dál', X, 'metrů'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist,workaround) == [ 'dál', X, 'metrů'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist,workaround) == [ 'dál', X, 'metrů'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist,workaround) == ['přibližně jeden kilometr'] :- Dist < 1500.
|
||||
distance(Dist,workaround) == ['přibližně', X, 'kilometry'] :- Dist < 4500, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist,workaround) == ['dál přibližně', X, 'kilometrů'] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist,workaround) == [ 'dál', X, 'kilometrů'] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist,workaround) == ['přibližně', X, 'kilometry'] :- Dist < 4500, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist,workaround) == ['dál přibližně', X, 'kilometrů'] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist,workaround) == [ 'dál', X, 'kilometrů'] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
%%% distance measure - accusative
|
||||
% example: "pokracujte pet metru"
|
||||
distance(Dist,accusative) == [ X, 'metrů'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist,accusative) == [ X, 'metrů'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist,accusative) == [ X, 'metrů'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist,accusative) == [ X, 'metrů'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist,accusative) == ['přibližně jeden kilometr'] :- Dist < 1500.
|
||||
distance(Dist,accusative) == ['přibližně', X, 'kilometry'] :- Dist < 4500, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist,accusative) == ['přibližně', X, 'kilometrů'] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist,accusative) == [ X, 'kilometrů'] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist,accusative) == ['přibližně', X, 'kilometry'] :- Dist < 4500, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist,accusative) == ['přibližně', X, 'kilometrů'] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist,accusative) == [ X, 'kilometrů'] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
%%% distance measure - locative
|
||||
% example: "po peti metrech zabocte vpravo"
|
||||
distance(Dist,locative) == [ X, 'metrech'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist,locative) == [ X, 'metrech'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist,locative) == [ X, 'metrech'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist,locative) == [ X, 'metrech'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist,locative) == ['přibližně jednom kilometru'] :- Dist < 1500.
|
||||
distance(Dist,locative) == ['přibližně', X, 'kilometrech'] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist,locative) == [ X, 'kilometrech'] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist,locative) == ['přibližně', X, 'kilometrech'] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist,locative) == [ X, 'kilometrech'] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -67,16 +67,16 @@ nth(17, 'siebzehnte ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist, nominativ) == [ X, ' meter'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist, dativ) == [ X, ' metern'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist, nominativ) == [ X, ' meter'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist, dativ) == [ X, ' metern'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist, nominativ) == [ X, ' meter'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist, dativ) == [ X, ' metern'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist, nominativ) == [ X, ' meter'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist, dativ) == [ X, ' metern'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist, nominativ) == ['zirka einen Kilometer '] :- Dist < 1500.
|
||||
distance(Dist, dativ) == ['zirka einem Kilometer '] :- Dist < 1500.
|
||||
distance(Dist, nominativ) == ['zirka ', X, ' Kilometer '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, dativ) == ['zirka ', X, 'Kilometern '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, nominativ) == [ X, ' Kilometer '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, dativ) == [ X, 'Kilometern '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, nominativ) == ['zirka ', X, ' Kilometer '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, dativ) == ['zirka ', X, 'Kilometern '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, nominativ) == [ X, ' Kilometer '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, dativ) == [ X, 'Kilometern '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -68,19 +68,19 @@ nth(17, 'seventeenth ').
|
|||
distance(Dist) == D :- measure('km-m'), distance_km(Dist) == D.
|
||||
distance(Dist) == D :- distance_mi(Dist) == D.
|
||||
%%% distance measure
|
||||
distance_km(Dist) == [ X, ' meters'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance_km(Dist) == [ X, ' meters'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance_km(Dist) == [ X, ' meters'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance_km(Dist) == [ X, ' meters'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance_km(Dist) == ['about 1 kilometer '] :- Dist < 1500.
|
||||
distance_km(Dist) == ['about ', X, ' kilometers '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance_km(Dist) == [ X, ' kilometers '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance_km(Dist) == ['about ', X, ' kilometers '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance_km(Dist) == [ X, ' kilometers '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
%%% distance measure
|
||||
distance_mi(Dist) == [ X, ' feet'] :- Dist < 160, D is round(2*Dist/100/0.3048)*50, num_atom(D, X).
|
||||
distance_mi(Dist) == [ X, ' tenth of a mile'] :- Dist < 241, D is round(Dist/161), num_atom(D, X).
|
||||
distance_mi(Dist) == [ X, ' tenths of a mile'] :- Dist < 1529, D is round(Dist/161), num_atom(D, X).
|
||||
distance_mi(Dist) == [ X, ' feet'] :- Dist < 160, D is round(2*Dist/100.0/0.3048)*50, num_atom(D, X).
|
||||
distance_mi(Dist) == [ X, ' tenth of a mile'] :- Dist < 241, D is round(Dist/161.0), num_atom(D, X).
|
||||
distance_mi(Dist) == [ X, ' tenths of a mile'] :- Dist < 1529, D is round(Dist/161.0), num_atom(D, X).
|
||||
distance_mi(Dist) == ['about 1 mile '] :- Dist < 2414.
|
||||
distance_mi(Dist) == ['about ', X, ' miles '] :- Dist < 16093, D is round(Dist/1609), num_atom(D, X).
|
||||
distance_mi(Dist) == [ X, ' miles '] :- D is round(Dist/1609), num_atom(D, X).
|
||||
distance_mi(Dist) == ['about ', X, ' miles '] :- Dist < 16093, D is round(Dist/1609.0), num_atom(D, X).
|
||||
distance_mi(Dist) == [ X, ' miles '] :- D is round(Dist/1609.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -82,11 +82,11 @@ nth(17, 'decimoséptima').
|
|||
|
||||
%%% distance measure
|
||||
|
||||
distance(Dist) == [ X, ' metros'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metros'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metros'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metros'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['cerca de un kilómetro '] :- Dist < 1500.
|
||||
distance(Dist) == ['cerca de ', X, ' kilómetros '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilómetros '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['cerca de ', X, ' kilómetros '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilómetros '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -75,16 +75,16 @@ nth(17, 'seitsemästoista ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist, metrin) == [ X, ' metrin'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist, metria) == [ X, ' metriä'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist, metrin) == [ X, ' metrin'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist, metria) == [ X, ' metriä'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist, metrin) == [ X, ' metrin'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist, metria) == [ X, ' metriä'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist, metrin) == [ X, ' metrin'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist, metria) == [ X, ' metriä'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist, metrin) == ['noin 1 kilometrin '] :- Dist < 1500.
|
||||
distance(Dist, metria) == ['noin 1 kilometri '] :- Dist < 1500.
|
||||
distance(Dist, metrin) == ['noin', X, ' kilometerin '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, metria) == ['noin', X, ' kilometriä '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, metrin) == [ X, ' kilometerin '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, metria) == [ X, ' kilometriä '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, metrin) == ['noin', X, ' kilometerin '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, metria) == ['noin', X, ' kilometriä '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, metrin) == [ X, ' kilometerin '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, metria) == [ X, ' kilometriä '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
% Note: do not put space after word "noin" because for some reason the SVOX Finnish Satu Voice announces the number wrong if there is a space
|
||||
|
||||
|
||||
|
|
|
@ -66,11 +66,11 @@ nth(17, '17ème ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' mètres'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' mètres'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' mètres'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' mètres'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['environ 1 kilomètre '] :- 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).
|
||||
distance(Dist) == ['environ ', X, ' kilomètres '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilomètres '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
:- op('==', xfy, 500).
|
||||
:- op('==', xfy, 500).
|
||||
version(101).
|
||||
language(hi).
|
||||
|
||||
|
@ -66,11 +66,11 @@ nth(17, 'सतरहवा ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' मीटर '] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' मीटर '] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' मीटर '] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' मीटर '] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['साधारण 1 किलोमीटर '] :- Dist < 1500.
|
||||
distance(Dist) == ['साधारण ', X, ' किलोमीटर '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' किलोमीटर '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['साधारण ', X, ' किलोमीटर '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' किलोमीटर '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -66,16 +66,16 @@ nth(17, 'a tizenhetedik ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist, no-t) == [ X, ' méter'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist, t) == [ X, ' métert'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist, no-t) == [ X, ' méter'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist, t) == [ X, ' métert'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist, no-t) == [ X, ' méter'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist, t) == [ X, ' métert'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist, no-t) == [ X, ' méter'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist, t) == [ X, ' métert'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist, no-t) == ['körülbelül 1 kilométer'] :- Dist < 1500.
|
||||
distance(Dist, t) == ['körülbelül 1 kilométert'] :- Dist < 1500.
|
||||
distance(Dist, no-t) == ['mintegy ', X, ' kilométer'] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, t) == ['mintegy ', X, ' kilométert'] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, no-t) == [ X, ' kilométer'] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, t) == [ X, ' kilométert'] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist, no-t) == ['mintegy ', X, ' kilométer'] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, t) == ['mintegy ', X, ' kilométert'] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, no-t) == [ X, ' kilométer'] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist, t) == [ X, ' kilométert'] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -66,11 +66,11 @@ nth(17, 'diciassettesima uscita').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' metri '] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metri '] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metri '] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metri '] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['circa un chilometro '] :- Dist < 1500.
|
||||
distance(Dist) == ['circa ', X, ' chilometri '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' chilometri '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['circa ', X, ' chilometri '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' chilometri '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -67,11 +67,11 @@ nth(17, '열일곱번째 ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' 미터 '] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 미터 '] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 미터 '] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 미터 '] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['약, 1 킬로미터 '] :- Dist < 1500.
|
||||
distance(Dist) == ['약, ', X, ' 킬로미터 '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 킬로미터 '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['약, ', X, ' 킬로미터 '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 킬로미터 '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -66,17 +66,17 @@ nth(17, 'septiņpadsmitajā ').
|
|||
|
||||
|
||||
%%% 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) == [ X, ' meteriem'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' meteriem'] :- Dist < 1000, D is round(2*Dist/100.0)*50, 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(Dist) == ['aptuveni ', X, ' kilometeriem '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilometriem '] :- D is round(Dist/1000.0), 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) == [ X, ' meteri'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance2(Dist) == [ X, ' meteri'] :- Dist < 1000, D is round(2*Dist/100.0)*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).
|
||||
distance2(Dist) == ['aptuveni ', X, ' kilometri '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance2(Dist) == [ X, ' kilometri '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -66,11 +66,11 @@ nth(17, 'zeventiende ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' meter'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' meter'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' meter'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' meter'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['ongeveer een kilometer '] :- Dist < 1500.
|
||||
distance(Dist) == ['ongeveer ', X, ' Kilometer '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' Kilometer '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['ongeveer ', X, ' Kilometer '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' Kilometer '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -66,12 +66,12 @@ nth(17, 'siedemnasty ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' metrów'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metrów'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metrów'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metrów'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['około jeden kilometr '] :- Dist < 1500.
|
||||
distance(Dist) == ['około ', X, ' kilometry '] :- Dist < 4500, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['około ', X, ' kilometrów '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilometrów '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['około ', X, ' kilometry '] :- Dist < 4500, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == ['około ', X, ' kilometrów '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilometrów '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -66,16 +66,16 @@ nth(17, 'семнадцатый ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' метров'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' метров'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' метров'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' метров'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['около одного километра '] :- Dist < 1500.
|
||||
distance(Dist) == ['около ', X, Km] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X), plural_km(D, Km).
|
||||
distance(Dist) == ['около ', X, Km] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X), plural_km(D, Km).
|
||||
|
||||
plural_km(D, ' километр ') :- 1 is D mod 10.
|
||||
plural_km(D, ' километра ') :- Mod is D mod 10, Mod < 5, Mod > 1.
|
||||
plural_km(_D, ' километров ').
|
||||
|
||||
distance(Dist) == [ X, ' километров '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' километров '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -73,12 +73,12 @@ nth(17, 'sedemnásty ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' metrov'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metrov'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metrov'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' metrov'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['približne jeden kilometer '] :- Dist < 1500.
|
||||
distance(Dist) == ['približne ', X, ' kilometre'] :- Dist < 4500, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['približne ', X, ' kilometrov '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilometrov '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['približne ', X, ' kilometre'] :- Dist < 4500, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == ['približne ', X, ' kilometrov '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilometrov '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
:- op('==', xfy, 500).
|
||||
:- op('==', xfy, 500).
|
||||
version(101).
|
||||
language(sv).
|
||||
|
||||
|
@ -66,11 +66,11 @@ nth(17, 'sjuttonde ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' meter'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' meter'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' meter'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' meter'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['ungefär en kilometer '] :- Dist < 1500.
|
||||
distance(Dist) == ['ungefär ', X, ' kilometer '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilometer '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['ungefär ', X, ' kilometer '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' kilometer '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
:- op('==', xfy, 500).
|
||||
:- op('==', xfy, 500).
|
||||
version(101).
|
||||
language(zh).
|
||||
|
||||
|
@ -66,11 +66,11 @@ nth(17, '第十七個 ').
|
|||
|
||||
|
||||
%%% distance measure
|
||||
distance(Dist) == [ X, ' 公尺'] :- Dist < 100, D is round(Dist/10)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 公尺'] :- Dist < 1000, D is round(2*Dist/100)*50, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 公尺'] :- Dist < 100, D is round(Dist/10.0)*10, num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 公尺'] :- Dist < 1000, D is round(2*Dist/100.0)*50, num_atom(D, X).
|
||||
distance(Dist) == ['約 1 公里 '] :- Dist < 1500.
|
||||
distance(Dist) == ['約 ', X, ' 公里 '] :- Dist < 10000, D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 公里 '] :- D is round(Dist/1000), num_atom(D, X).
|
||||
distance(Dist) == ['約 ', X, ' 公里 '] :- Dist < 10000, D is round(Dist/1000.0), num_atom(D, X).
|
||||
distance(Dist) == [ X, ' 公里 '] :- D is round(Dist/1000.0), num_atom(D, X).
|
||||
|
||||
|
||||
%% resolve command main method
|
||||
|
|
Loading…
Reference in a new issue