Closed THinnerichs closed 6 months ago
Currently all problem.examples are of type Vector{Example}, even though they only consist of IOExamples. Typed functions are hence not applicable even though they should be.
problem.examples
Vector{Example}
IOExample
Workaround: map(ex -> ex::IOExample, problem.examples)
map(ex -> ex::IOExample, problem.examples)
What doesn't work as a solution: Substituting the type of vector in the file directly:
problem_strip_numeric_characters_from_cell = Problem(Example[ IOExample(Dict{Symbol, Any}(:_arg_1 => "34653 jim mcdonald"), " jim mcdonald"), IOExample(Dict{Symbol, Any}(:_arg_1 => "price is 500"), " price is "), IOExample(Dict{Symbol, Any}(:_arg_1 => "100 apples"), " apples")])
to
problem_strip_numeric_characters_from_cell = Problem(IOExample[ IOExample(Dict{Symbol, Any}(:_arg_1 => "34653 jim mcdonald"), " jim mcdonald"), IOExample(Dict{Symbol, Any}(:_arg_1 => "price is 500"), " price is "), IOExample(Dict{Symbol, Any}(:_arg_1 => "100 apples"), " apples")])
Now a bug given that HerbData is being deprecated in favor of HerbSpecification.
HerbData
HerbSpecification
Currently all
problem.examples
are of typeVector{Example}
, even though they only consist ofIOExample
s. Typed functions are hence not applicable even though they should be.Workaround:
map(ex -> ex::IOExample, problem.examples)
What doesn't work as a solution: Substituting the type of vector in the file directly:
to