Class: CrossLanguageSpotter::CrossLanguageReferencesProducerMethodsComparator
- Inherits:
-
Object
- Object
- CrossLanguageSpotter::CrossLanguageReferencesProducerMethodsComparator
- Defined in:
- lib/crosslanguagespotter/figures_evaluator.rb
Overview
It compare different methods, each methods can be instantiated different times using different parameters
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
map per class, per params of the figures obtained agains the given gold set.
Instance Method Summary collapse
- #add(clazz, parameters) ⇒ Object
-
#initialize(gold_set, project) ⇒ CrossLanguageReferencesProducerMethodsComparator
constructor
A new instance of CrossLanguageReferencesProducerMethodsComparator.
Constructor Details
#initialize(gold_set, project) ⇒ CrossLanguageReferencesProducerMethodsComparator
Returns a new instance of CrossLanguageReferencesProducerMethodsComparator.
20 21 22 23 24 |
# File 'lib/crosslanguagespotter/figures_evaluator.rb', line 20 def initialize(gold_set,project) @gold_set = gold_set @results = Hash.new {|h,k| h[k]={}} @project = project end |
Instance Attribute Details
#results ⇒ Object (readonly)
map per class, per params of the figures obtained agains the given gold set
18 19 20 |
# File 'lib/crosslanguagespotter/figures_evaluator.rb', line 18 def results @results end |
Instance Method Details
#add(clazz, parameters) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/crosslanguagespotter/figures_evaluator.rb', line 26 def add(clazz,parameters) producer = clazz.new(parameters) observed_set = producer.produce_set(@project) fe = FiguresEvaluator.new(@gold_set,observed_set) result = fe.all_figures @results[clazz][parameters] = result result end |