Closed GoogleCodeExporter closed 9 years ago
Actually, nevermind, the 2nd error must be my .xml config mistake.
But PropertyImpl seems to be an problem.
Original comment by ale...@yoxel.com
on 16 Jun 2013 at 5:58
Ok, I switched to target/classes/ dir instead of duke-1.0.jar:
===== GENERATION 0 ===================================
[GeneticConfiguration 0.96 [Property LAST_NAME SoundexComparator 0.44 0.98
[Property FIRST_NAME JaroWinklerTokenized 0.27 0.72 [Property ID Non 0.0 0.0
[Property PHONE NorphoneComparator 0.07 0.86 [Property EMAIL
WeightedLevenshtein 0.09 0.96] # 0
Traceback (most recent call last):
File "genetic.py", line 307, in <module>
f = evaluate(c)
File "genetic.py", line 234, in evaluate
testfile.close()
AttributeError: 'no.priv.garshol.duke.matchers.TestFileListener' object has no
attribute 'close'
Original comment by ale...@yoxel.com
on 16 Jun 2013 at 6:03
Tried to remove that line, new errors. Will need your help here.
===== GENERATION 0 ===================================
[GeneticConfiguration 0.78 [Property LAST_NAME MetaphoneComparator 0.47 0.74
[Property FIRST_NAME JaroWinklerTokenized 0.24 0.53 [Property ID Non 0.0 0.0
[Property PHONE GeopositionComparator 0.27 0.62 [Property EMAIL
WeightedLevenshtein 0.43 0.7] # 0
0.0
[GeneticConfiguration 0.78 [Property LAST_NAME Levenshtein 0.4 0.72 [Property
FIRST_NAME WeightedLevenshtein 0.14 0.53 [Property ID Non 0.0 0.0 [Property
PHONE SoundexComparator 0.33 0.5 [Property EMAIL Levenshtein 0.04 0.5] # 1
0.0
[GeneticConfiguration 0.41 [Property LAST_NAME Levenshtein 0.34 0.94 [Property
FIRST_NAME QGramComparator 0.49 0.93 [Property ID Non 0.0 0.0 [Property PHONE
GeopositionComparator 0.42 0.61 [Property EMAIL JaroWinkler 0.24 0.52] # 2
1.0
BEST SO FAR: 1.0
Traceback (most recent call last):
File "genetic.py", line 319, in <module>
population = sorted(population, key = lambda c: 1.0 - index[c])
File "genetic.py", line 319, in <lambda>
population = sorted(population, key = lambda c: 1.0 - index[c])
KeyError: <__main__.GeneticConfiguration instance at 0x2>
Original comment by ale...@yoxel.com
on 16 Jun 2013 at 6:21
My apologies for the first errors: I'm still working on this script (and its
cousin, active.py).
The last error is kind of funny, though. If you just take the last
configuration there, you've got a configuration that, according to your test
file, is perfect. It always makes the right decision.
That's never happened before, so clearly that code path has never been tested,
and it appears there's a bug. :-)
I've pushed a patch for the problem now. However, I think if the third, totally
random, configuration that is tried comes up with a perfect score, you have a
test file that's too small. You may want to consider using active.py instead,
which doesn't need a test file.
Original comment by lar...@gmail.com
on 18 Jun 2013 at 7:04
This issue was closed by revision 44897db32518.
Original comment by lar...@gmail.com
on 18 Jun 2013 at 7:05
Original issue reported on code.google.com by
ale...@yoxel.com
on 16 Jun 2013 at 5:53