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

[Question] is data extraction supported in flutter? #85

Open
abdallah-odeh opened this issue Jun 2, 2024 · 4 comments
Open

[Question] is data extraction supported in flutter? #85

abdallah-odeh opened this issue Jun 2, 2024 · 4 comments

Comments

@abdallah-odeh
Copy link

abdallah-odeh commented Jun 2, 2024

Is data extraction supported in the Flutter plugin? if so, can you please update the documentation or write here how to use it
thanks in advance

Tasks

Preview Give feedback
No tasks being tracked yet.
@bvirlet
Copy link
Contributor

bvirlet commented Jun 4, 2024

Hello,

At this moment, only the bankDetails structured data extraction is exposed to the Flutter plugin but the next update will expose the other structured data: receipt and businessCard.

Which one is of interest to you?

@bvirlet
Copy link
Contributor

bvirlet commented Jun 5, 2024

Hi there,
The new update of the SDK v5.0.8 has been published, and it exposes the data extraction to Flutter. The documentation is updated to reflect this.

@abdallah-odeh
Copy link
Author

Hello @bvirlet,
that's great to hear, I will update the library and tell you the results

@abdallah-odeh
Copy link
Author

abdallah-odeh commented Jun 23, 2024

Hello @bvirlet
I tried the entity extraction but sadly the results were bad in a way that prevents me from using it for production

Sample 1

Image:

Screenshot 2024-06-23 at 9 01 33 AM

Scan result:

flutter: scans[0][structuredData][receipt][locale]: en-US
flutter: scans[0][structuredData][receipt][amount]: 0.0
flutter: scans[0][structuredData][receipt][category]: other
flutter: scans[0][structuredData][receipt][currency]: USD
flutter: scans[0][structuredData][receipt][date]: 1717578000.0

Issues:

  • the returned amount is 0.0, original amount is 99.0
  • the returned date is in invalid format (double) although I tried to convert DateTime.fromMillisecondsSinceEpoch((result['scans'][0]['structuredData']['receipt']['date'] as double).toInt()) and date returned is 1970-01-20 23:06:18.000
Sample 2

Image:

Screenshot 2024-06-23 at 8 46 19 AM

Scan result:

flutter: scans[0][structuredData][receipt][date]: 1706864400.0
flutter: scans[0][structuredData][receipt][currency]: USD
flutter: scans[0][structuredData][receipt][category]: supermarket
flutter: scans[0][structuredData][receipt][merchant]: nd February
flutter: scans[0][structuredData][receipt][locale]: en-US
flutter: scans[0][structuredData][receipt][amount]: 23.9

Issues:

  • the returned date is same as issue in Sample 1
  • the returned category is wrong, I can't find the word "supermarket" mentioned in the image so I don't know where did it come from, NOTE: I don't use the category but it's still an issue for other users maybe
  • the returned merchant is also wrong, I don't know why it took "nd February" as a merchant name, it's not bold neither headline text, what are the factors the determine this is a merchant name?

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

No branches or pull requests

2 participants