Sha256: f47321755cd0bd78098380bd8ec89514271548f02e4d68d0dec57c0842f36aca
Contents?: true
Size: 354 Bytes
Versions: 59
Compression:
Stored size: 354 Bytes
Contents
require 'recog' module Dap module Filter class FilterRecog include Base def process(doc) self.opts.each_pair do |k,v| next unless doc.has_key?(k) match = Recog::Nizer.match(v, doc[k]) next unless match match.each_pair do |ok, ov| doc["#{k}.recog.#{ok}"] = ov.to_s end end [ doc ] end end end end
Version data entries
59 entries across 59 versions & 1 rubygems