class Ingreedy::AmountParser

Private Instance Methods

vulgar_fractions() click to toggle source
# File lib/ingreedyfork/amount_parser.rb, line 69
def vulgar_fractions
  Ingreedy.dictionaries.current.vulgar_fractions.keys
end
word_digits() click to toggle source
# File lib/ingreedyfork/amount_parser.rb, line 61
def word_digits
  # words are sorted by length, from longest to shortest to ensure that
  # in case of word A that is prefix of word B
  # word A appears after word B
  # real example: words "kilka" and "kilkanaƛcie" in Polish
  Ingreedy.dictionaries.current.numbers.keys.sort_by { |word| -word.length }
end