Skip to content

Update OCRInvoice.py - #1

Open
DawsonQi wants to merge 1 commit into
inmine2:mainfrom
DawsonQi:patch-1
Open

Update OCRInvoice.py#1
DawsonQi wants to merge 1 commit into
inmine2:mainfrom
DawsonQi:patch-1

Conversation

@DawsonQi

Copy link
Copy Markdown

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