69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'lib/monkeylearn/classifiers.rb', line 69
def create(name, options = {})
data = {
name: name,
description: options[:description],
algorithm: options[:algorithm],
language: options[:language],
max_features: options[:max_features],
ngram_range: options[:ngram_range],
use_stemming: options[:use_stemming],
preprocess_numbers: options[:preprocess_numbers],
preprocess_social_media: options[:preprocess_social_media],
normalize_weights: options[:normalize_weights],
stopwords: options[:stopwords],
whitelist: options[:whitelist],
}.delete_if { |k,v| v.nil? }
request(:post, build_endpoint, data)
end
|