Sha256: a564e62eca1a3ef6063ca63f03b91525978180d199419b00dd2493732898e33e

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

module Quarry
  class Model
    attr_reader :model
    def initialize(m = nil)
      @model = m || Quarry::ImplModel.new
    end
    
    def data_set
      Quarry::DataSet::DataSet.new(@model.get_data_set)
    end
    
    def data_set=(ds)
      @model.set_data_set(ds.data_set)
    end
    
    # def classifier
    #   @model.get_classifier
    # end

    def classifier=(c)
      @model.set_classifier(c.classifier)
    end
    
    def text_pipeline
      TextPipeline.new(@model.get_text_pipeline)
    end
    
    def text_pipeline=(t)
      @model.set_text_pipeline(t.text_pipeline)
    end
    
    def train(example)
      @model.train(example)
    end
    
    def train_text(text)
      @model.train_text(text)
    end
    
    def classify(example)
      @model.classify(example)
    end
    
    def classify_text(text)
      @model.classify_text(text)
    end
    
    def rank(example)
      @model.rank(example)
    end
    
    def rank_text(text)
      @model.rank_text(text)
    end
    
    def rank_text_names(text)
      @model.rank_text_names(text)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
thera-0.0.2 lib/quarry_rb/model/model.rb