Module: Tr39Confusables
- Defined in:
- lib/tr39_confusables.rb
Constant Summary collapse
- @@table =
Marshal.load(File.open("lib/confusables", "r"))
Class Method Summary collapse
Class Method Details
.is_confusable?(a, b) ⇒ Boolean
11 12 13 |
# File 'lib/tr39_confusables.rb', line 11 def self.is_confusable?(a, b) skeleton(a) == skeleton(b) end |
.skeleton(string) ⇒ Object
6 7 8 9 |
# File 'lib/tr39_confusables.rb', line 6 def self.skeleton(string) string = UNF::Normalizer.normalize(string, :nfc) UNF::Normalizer.normalize(mapping(string), :nfc) end |