module Spellchecker::Dictionaries::HumanNames::LastNames

Constants

MUTEX
PATH

Public Instance Methods

all() click to toggle source

@return [Set<String>]

# File lib/spellchecker/dictionaries/human_names.rb, line 38
def all
  @all || MUTEX.synchronize do
    @all ||= Set.new(PATH.read.split("\n"))
  end
end
include?(string) click to toggle source

@param string [String] @return [Boolean]

# File lib/spellchecker/dictionaries/human_names.rb, line 46
def include?(string)
  return false unless string

  string = Utils.remove_suffix(string.downcase)

  all.include?(string)
end