Method: Ariel::Learner#refine

Defined in:
lib/ariel/learner.rb

#refineObject

Oversees both landmark (e.g. changing skip_to(“<b>”) in to skip_to(“Price”,“<b>”) and topology (skip_to(:html_tag) to a chain of skip_to() commands). Takes the current rule being generated and the example against which it is being created (the current seed_rule) as arguments.



166
167
168
169
170
171
172
173
# File 'lib/ariel/learner.rb', line 166

def refine
  @candidates=[]
  current_rule.landmarks.each_with_index do |landmark, index|
    add_new_landmarks(landmark, index) #Topology refinements
    lengthen_landmark(landmark, index) #Landmark refinements
  end
  return @candidates.size
end