Initialize new Robot Worker
Usage Example:
In Block DSL way
line = CF::Line.create("sentiment_robot","Digitization") do |l|
CF::InputFormat.new({:line => l, :name => "url", :valid_type => "url", :required => "true"})
CF::Station.create({:line => l, :type => "work"}) do |s|
CF::RobotWorker.new({:station => s, :settings => {:document => "{url}", :sanitize => true}, :type => "sentiment_robot"})
end
end
OR
In Plain Ruby way
line = CF::Line.new("sentiment_robot_1","Digitization")
input_format = CF::InputFormat.new({:name => "url", :required => true, :valid_type => "url"})
line.input_formats input_format
station = CF::Station.new({:type => "work"})
line.stations station
worker = CF::RobotWorker.new({:settings => {:document => "{url}", :sanitize => true}, :type => "sentiment_robot"})
line.stations.first.worker = worker