Skip to content

Update OCRInvoice.py #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update OCRInvoice.py #1

wants to merge 1 commit into from

Conversation

DawsonQi
Copy link

1、发票金额建议去重后再排序提取,这样可以提取出总金额,无税金额,税额;
2、提取的时候建议小数点两边都加上数字的规则,避免出现小数点还有中问的情况:amounts = re.findall('([0-9]?..?)】', invoice2) ==> amounts = re.findall('([0-9]?..[0-9]?)】', invoice2)

1、发票金额建议去重后再排序提取,这样可以提取出总金额,无税金额,税额;
2、提取的时候建议小数点两边都加上数字的规则,避免出现小数点还有中问的情况:amounts = re.findall('([0-9]*?\..*?)】', invoice2) ==> amounts = re.findall('([0-9]*?\..[0-9]*?)】', invoice2)
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.

1 participant