lib/nb/classifier.rb
# will load into a memory-backed classifier
will load into a memory-backed classifier
will load into a memory - backed classifier
def load_yaml(yaml_file)
        data = YAML.load_file(yaml_file)
        new(data[:categories], backend: :memory).tap do |classifier|
          classifier.tokens_count = data[:tokens_count]
          classifier.categories_count = data[:categories_count]
        end
      end
def load_yaml ( yaml_file ) data = YAML . load_file ( yaml_file ) new ( data [ :categories ] , backend : :memory ) . tap do | classifier | classifier . tokens_count = data [ :tokens_count ] classifier . categories_count = data [ :categories_count ] end end
will load into a memory-backed classifier
will load into a memory - backed classifier
yaml_file
<not_specific>