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

Thai number not found #104

Open
Bongsakorn opened this issue May 19, 2016 · 1 comment
Open

Thai number not found #104

Bongsakorn opened this issue May 19, 2016 · 1 comment

Comments

@Bongsakorn
Copy link

I created rule for 0..10 and 21..99 like this

"integer (0..10) - thai number"
    #"๐|๑๐|๑|๒|๓|๔|๕|๖|๗|๘|๙"
    {:dim :number
     :integer true
     :value (get {"๐" 0 "๑๐" 10 "๑" 1 "๒" 2 "๓" 3 "๔" 4 "๕" 5 "๖" 6 "๗" 7 "๘" 8 "๙" 9} (:text %1))}

"integer 21..99 - thai number"
     [#(#{2 3 4 5 6 7 8 9} (:value %)) (integer 1 9)]
     {:dim :number
      :integer true
      :value (+ (* (:value %1) 10) (:value %2))}

when I test number "๒๔", result is correct. but when I try testing number like "๒๒", "๓๓", "๔๔" and so on. It cannot found anything.

0 FAIL "๑๑"
    Expected null
1 FAIL "๓๓"
    Expected null

Any suggestion?

@l5t
Copy link

l5t commented May 24, 2016

Hi, can you prepend the corpus/rules files with an underscore (_) and do a Pull Request. This allows to save your work while getting help from somebody else in the community.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants