Module: YeshuaCrm::Currency::Heuristics

Included in:
YeshuaCrm::Currency
Defined in:
lib/yeshua_crm/currency/heuristics.rb

Defined Under Namespace

Classes: Analyzer

Instance Method Summary collapse

Instance Method Details

#analyze(str) ⇒ Object

An robust and efficient algorithm for finding currencies in text. Using several algorithms it can find symbols, iso codes and even names of currencies. Although not recommendable, it can also attempt to find the given currency in an entire sentence

Returns: Array (matched results)



12
13
14
# File 'lib/yeshua_crm/currency/heuristics.rb', line 12

def analyze(str)
  return Analyzer.new(str, search_tree).process
end