Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

Commit

Permalink
Merge pull request #26 from thucar/develop
Browse files Browse the repository at this point in the history
Initial support for Estonian language.
  • Loading branch information
mbait committed Mar 13, 2015
2 parents 1b53256 + a4f2e98 commit 1403a2f
Show file tree
Hide file tree
Showing 17 changed files with 2,267 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/default-config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
"en.finance"
"en.communication"
]}
:et$core {:corpus [
"et.numbers"
]
:rules [
"et.numbers"
]}
:it$core {:corpus [
"it.time"
"it.numbers"
Expand Down
28 changes: 28 additions & 0 deletions resources/duckling/corpus/et.communication.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
(
{}

"650-283-4757"
"+1 6502834757"
"+33 4 76095663"
"06 2070 2220"
"(650)-283-4757 ext 897"
(fn [token _] (and (= :phone-number (:dim token))
(= (:text token) (:val token))))

"http://www.bla.com"
"www.bla.com:8080/path"
"https://myserver?foo=bar"
"cnn.com/info"
"bla.com/path/path?ext=%23&foo=bla"
"localhost"
"localhost:8000"
"http://kimchi" ; local url
(fn [token _] (and (= :url (:dim token))
(= (:text token) (:val token))))

"alex@wit.ai"
"alex.lebrun@mail.wit.com"
(fn [token _] (and (= :email (:dim token))
(= (:text token) (:val token))))

)
60 changes: 60 additions & 0 deletions resources/duckling/corpus/et.finance.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
(

{}

"$10"
"10$"
"kümme dollarit"
(money 10 "$")

;"alla $15"
;"kuni 15$"
;"vähem kui 15$"
;"maksimaalselt 15$"
;"vähem kui viisteist dollarit"
;(money 15 "$" "<")

"kümme senti"
(money 10 "cent")

"$10,000"
"$10 000"
"10K$"
"$10k"
(money 10000 "$")

"USD1.23"
(money 1.23 "USD")

"2 dollarit ja 23 senti"
"kaks dollarit 23 senti"
"2 dollarit 23"
"kaks dollarit ja 23"
(money 2.23 "$")

"20€"
"20 eurot"
"20 Euri"
"20 Eurot"
"EUR 20"
(money 20 "EUR")

"EUR29.99"
(money 29.99 "EUR")

"3 taala"
(money 3) ; unknown unit

"£9"
"üheksa naela"
"üheksa naelsterlingit"
(money 9 "£")

"GBP3.01"
"GBP 3.01"
(money 3.01 "GBP")

)

;umbes $200
;$200 ja $300 vahel
60 changes: 60 additions & 0 deletions resources/duckling/corpus/et.measure.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
(
; Context map
{}

; Distance

"3 kilomeetrit"
"3 km"
"3km"
"3k"
(distance 3 "kilometre" {:value 3000 :unit "metre"})

"3.0 km"
(distance 3.0 "kilometre" {:value 3000.0 :unit "metre"})

"8 miili"
(distance 8 "mile" {:value 12872 :unit "metre"})

"9m"
(distance 9 "m")

"2cm"
"2 sentimeetrit"
(distance 2 "centimetre" {:value 0.02 :unit "metre"})

; Volume

"250 milliliitrit"
"250ml"
"250 ml"
(volume 250 "millilitre" {:value 0.25 :unit "litre"})

"2 liitrit"
(volume 2 "litre")

"3 gallonit"
"3 gal"
(volume 3 "gallon" {:value 11.355 :unit "litre"})

"3 hektoliitrit"
"3 kuupliitrit"
(volume 300 "litre" {:value 30 :unit "litre"})

"pool liitrit"
(volume 0.5 "litre")

; Quantity
"kaks naela liha"
(quantity 2 "pound" "meat")

"nael"
(quantity 1 "pound")

"liha"
(quantity 1 nil "meat")

"3 klaasi suhkrut"
(quantity 3 "cup" "sugar")
)

23 changes: 23 additions & 0 deletions resources/duckling/corpus/et.metrics.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(
; Context map
{}

"miili"
"miil"
(metric :length 1609.34)

"km"
"kilomeeter"
"kms"
"kilomeetrit"
(metric :length 1000)

"meetrit"
"meeter"
(metric :length 1)

"4 miili"
"4 miili pikkune"
(metric :length 6437.36)

)
92 changes: 92 additions & 0 deletions resources/duckling/corpus/et.numbers.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
(
; Context map
{}

"0"
"null"
(number 0)

"1"
"üks"
(number 1)

"33"
"kolmkümmend kolm"
"kolmkend kolm"
(number 33)

"14"
"neliteist"
(number 14)

"16"
"kuusteist"
(number 16)

"17"
"seitseteist"
(number 17)

"18"
"kaheksateist"
(number 18)

"1.1"
"1.10"
"01.10"
(number 1.1)

"0.77"
".77"
(number 0.77)

"100,000"
"100000"
"100K"
"100k"
"100 000"
(number 100000)

"3M"
"3000K"
"3000000"
"3,000,000"
"3 000 000"
(number 3000000)

"1,200,000"
"1200000"
"1.2M"
"1200K"
".0012G"
"1 200 000"
(number 1200000)

"- 1,200,000"
"-1200000"
"miinus 1,200,000"
"-1.2M"
"-1200K"
"-.0012G"
(number -1200000)

"viis tuhat"
(number 5000)

"kakssada tuhat"
(number 200000)

"kakskümmend üks tuhat üksteist"
(number 21011)

"seitsesada kakskümmend üks tuhat kaksteist"
(number 721012)

"kolmkümmend üks miljonit kakssada viiskümmend kuus tuhat seitsesada kakskümmend üks"
(number 31256721)

"4s"
"neljas"
(ordinal 4)
)

27 changes: 27 additions & 0 deletions resources/duckling/corpus/et.temperature.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
(
; Context map
{}

; Temperature

"37°C"
"37° celsiuse kraadi"
"37 kraadi Celsiuse järgi"
"kolmkümmend seitse celsiust"
"37 kraadi celsiust"
"37 kraadi C"
"kolmkümmend seitse kraadi celsiuse skaalal"
(temperature 37 "celsius")

"70°F"
"70° Fahrenheiti kraadi"
"70 kraadi F"
"seitsekümmend Fahrenheiti"
(temperature 70 "fahrenheit")

"45°"
"45 kraadi"
(temperature 45 "degree")

)

Loading

0 comments on commit 1403a2f

Please sign in to comment.