interscript / interscript-ruby

Interoperable script conversion systems (ISCS) with the `interscript` gem
Other
11 stars 30 forks source link

Implement transliteration detection system #731

Closed webdev778 closed 3 years ago

webdev778 commented 3 years ago
[10] pry(main)> Interscript.detect("привет", "privet")
=> "alalc-aze-Cyrl-Latn-1997"
[11] pry(main)> Interscript.detect("привет", "priwet")
=> "bgnpcgn-tat-Cyrl-Latn-2007"
[12] pry(main)> Interscript.detect("привет", "priviet")
=> "by-bel-Cyrl-Latn-1998"
[13] pry(main)> Interscript.detect("привет", "priviet", multiple: true).first(10)
=> [["by-bel-Cyrl-Latn-1998", 0],
 ["by-bel-Cyrl-Latn-2007", 0],
 ["un-bel-Cyrl-Latn-2007", 0],
 ["alalc-aze-Cyrl-Latn-1997", 1],
 ["alalc-bul-Cyrl-Latn-1997", 1],
 ["alalc-mkd-Cyrl-Latn-1997", 1],
 ["alalc-mkd-Cyrl-Latn-2013", 1],
 ["alalc-mon-Cyrl-Latn-1997", 1],
 ["alalc-rus-Cyrl-Latn-1997", 1],
 ["alalc-rus-Cyrl-Latn-2012", 1]]
[14] pry(main)> 

728