Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tmpl nl mobility #439

Merged
merged 1 commit into from
Jun 19, 2023
Merged

Tmpl nl mobility #439

merged 1 commit into from
Jun 19, 2023

Conversation

bosd
Copy link
Collaborator

@bosd bosd commented Nov 30, 2022

With these templates you will be able to process 95% of dutch fuel station receipts.
Additionnaly:

  • ANWB Road assistance
  • ipparking
  • ns rail invoices
  • parkmobile parking app

@bosd bosd force-pushed the tmpl-nl-mobility branch 2 times, most recently from f549fa6 to 67ce81a Compare February 5, 2023 21:03
@bosd bosd marked this pull request as ready for review February 5, 2023 21:07
@rmilecki
Copy link
Collaborator

rmilecki commented Feb 6, 2023

What's the point of that commented out code repeated in so many templates?

# below code is wrong pump name and with product field
#    line: .(?P<product>\w*).?\s+.\s.\s+\d+.\d{0,2}\n.?\s+.(?P<name>POMP.*) (?P<qty>\d+.\d{2})\s. .\s+€ (?P<price_unit>\d.\d{3})
# Above one modified for file without line breaks
#    line: .(?P<product>\w*).?\s+.\s.\s+\d+.\d{0,2}.*.?\s+.(?P<name>POMP.*) (?P<qty>\d+.\d{2})\s. .\s+€ (?P<price_unit>\d.\d{3})
# same as above optimized for (non optimized string)
#    line: .(?P<product>(\w+(?:\S|[.]\w\w+|\n)*)).?\s+.\s.\s+\d+.\d{0,2}.*.?\s+.(?P<name>POMP.*) (?P<qty>\d+.\d{2})\s. .\s+€ (?P<price_unit>\d.\d{3})

@bosd
Copy link
Collaborator Author

bosd commented Feb 6, 2023

What's the point of that commented out code repeated in so many templates?

I'll have a look at it again.
I've started making these templates a while ago. Back then I assumed that 378 got merged.
But that PR did not get merged. There have been some alternative pr's since that one.

Need to look at it again, if the alternative pr's are now providing the same functionality.

@bosd
Copy link
Collaborator Author

bosd commented Feb 6, 2023

Interesting to add..
Some of these templates are for recognizing tickets from POS systems.
That is a particular challenging task. Because the receipts need to be scanned and processed by tesseract ocr.
I am able to achieve some impressive results. Really usable. So I am willing to provide these as an example here.
However, the results are still inconsistent.

By that I mean, with the same input file, same processing command, the result can be different.
Therefore not suitable for using them as an exact unit test match.

Currently tesseract is untested see #109 .
Since then tesseract has improved a lot. It is usable, we can try to make a unittest for it.
Maybe under ideal conditions we could get 100% repeatative results..
Alhough I am not sure.
Is there a way to add a non blocking test.?
So when it fails, it would not block the whole github actions cycle?

@bosd bosd marked this pull request as draft February 12, 2023 23:14
@bosd bosd force-pushed the tmpl-nl-mobility branch 2 times, most recently from 9af985e to de6647b Compare March 19, 2023 09:23
@bosd bosd force-pushed the tmpl-nl-mobility branch 3 times, most recently from 2df45f8 to 2212fb5 Compare June 19, 2023 08:10
@bosd
Copy link
Collaborator Author

bosd commented Jun 19, 2023

I appoligize for all the activity in this PR.
I tried to fix the future warning. But it was not introduced by these commits.
Eventually found it, and fix is in #516

This PR has been sitting here for quite some while.
It is one of the items I want to get off my task list.
So, Will make this ready to be merged.

If one of these templates needs update. I will do that in micro commits / PR's.
Going to sqaush all the commits here. And merge this one.

update

Fixups

Fixups

Fixups

Fixups
@bosd bosd marked this pull request as ready for review June 19, 2023 10:16
@bosd bosd merged commit ba866df into invoice-x:master Jun 19, 2023
@bosd bosd deleted the tmpl-nl-mobility branch June 19, 2023 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants