|
|
What steps will reproduce the problem?
1. Run the attached file
2. Argument exception is raised at line 11 (during learn)
What is the expected output? What do you see instead?
I am trying to use Ariel to parse an HTML phone list. The list comes from
Excel, so it's really ugly. Ariel does not deal well with the data
provided, especially if the labeled data has varied structure. The attached
file demonstrates the problem. It attempts to learn from the text placed at
the bottom (after __END__). During learning an exception occurs.
What version of the product are you using? On what operating system?
Ariel 0.1.0 on Win XP, with Ruby 1.8.4.
Please provide any additional information below.
Complete output trace:
>ruby ariel_bug.rb
info: Learning exhaustive rules for node entry with 3 examples
info: Learnt start rules [#<Ariel::Rule:0xacf7858 @landmarks=[["</td>"]],
@exhaustive=true, @direction=:forward>]
info: Learnt end rules, [#<Ariel::Rule:0xad060b0 @landmarks=[["<"]],
@exhaustive=true, @direction=:back>]
info: Learning rules for node phone with 3 examples
info: Learnt start rules [#<Ariel::Rule:0xad421a0 @landmarks=[[">"],
["num", ">"]], @exhaustive=false, @direction=:forward>]
info: Learnt end rules, [#<Ariel::Rule:0x296d028 @landmarks=[["</td>"]],
@exhaustive=false, @direction=:back>]
info: Learning rules for node name with 3 examples
info: Learnt start rules [#<Ariel::Rule:0xad82480 @landmarks=[[">"]],
@exhaustive=false, @direction=:forward>]
c:/ruby/lib/ruby/gems/1.8/gems/ariel-0.1.0/lib/ariel/learner.rb:230:in
`add_new_landmarks': bad value for range (ArgumentError)
from
c:/ruby/lib/ruby/gems/1.8/gems/ariel-0.1.0/lib/ariel/learner.rb:169:in `refine'
from
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`each_with_index'
from
c:/ruby/lib/ruby/gems/1.8/gems/ariel-0.1.0/lib/ariel/learner.rb:168:in `refine'
from
c:/ruby/lib/ruby/gems/1.8/gems/ariel-0.1.0/lib/ariel/learner.rb:91:in
`find_best_rule'
from
c:/ruby/lib/ruby/gems/1.8/gems/ariel-0.1.0/lib/ariel/learner.rb:43:in
`learn_rule'
from
c:/ruby/lib/ruby/gems/1.8/gems/ariel-0.1.0/lib/ariel/labeled_document_loader.rb:30:in
`supervise_learning'
from
c:/ruby/lib/ruby/gems/1.8/gems/ariel-0.1.0/lib/ariel/labeled_document_loader.rb:17:in
`supervise_learning'
from c:/ruby/lib/ruby/gems/1.8/gems/ariel-0.1.0/lib/ariel.rb:64:in
`learn'
from ariel_bug.rb:11
|