class RMMSeg::Ferret::PunctuationFilter::Dictionary

The punctuation dictionary.

Constants

DIC_FILE

Public Class Methods

new() click to toggle source
# File lib/rmmseg/ferret.rb, line 70
def initialize
  @dic = Hash.new
  File.open(DIC_FILE, "r") do |f|
    f.each_line { |line|
      @dic[line.chomp.freeze] = nil
    }
  end
end

Public Instance Methods

include?(str) click to toggle source
# File lib/rmmseg/ferret.rb, line 79
def include?(str)
  @dic.has_key?(str)
end