clemenshelm / chillbill-recognizer

0 stars 0 forks source link

289 weight recognized as price #336

Closed tamacodechi closed 7 years ago

tamacodechi commented 7 years ago

Closes #289

tamacodechi commented 7 years ago

🙀 our right_below method was so lenient that it would allow things well above to get picked up as well!

Here is the new and shiny right_above method 🎉 🎉 I suspect it will soon be too lenient as well but as soon as I apply any limitation (say, the thing above can only be one space above) the test does not pass. Should I limit it with a despotic multiplier which works for this example?

clemenshelm commented 7 years ago

Have you checked that this solution actually solves the problem of the bill? I'm not so sure about it.

tamacodechi commented 7 years ago

Hmm the tests all pass but I ran it through the recognizer, the problem is that a blank space is detected above it. Spoke to @Tr4in about how the artefact filtering will be designed and it seems it will solve this issue 🎈 Blocked by #332

clemenshelm commented 7 years ago

I don't think it's blocked. The problem is rather that the current right_above method will pick up a random word which is located somewhere above on the page, but not necessarily right above the word.

tamacodechi commented 7 years ago

OH! It's picked up the first word to match the criteria which of course is right at the top of the page 🙈 Despotic limiting multiplier it is then 😂

tamacodechi commented 7 years ago

Non despotic multiplier solution, heck yeah! 🙌 I was going to do the quick fix and refactor it later but I think architecturally this makes more sense, especially since some other issues can reply on in_the_same_column

clemenshelm commented 7 years ago

Very nice! 👍