如何解析非英语语言的PDF表格



我使用Camelot和tabula来解析一个包含西里尔字母符号的pdf文件。但在输出的CSV文件中,我得到了一个没有俄语符号的混乱字体。

什么可以帮助我用非英语语言解析pdf表格?

import camelot
file = 'file-name.pdf'
tables = camelot.read_pdf(file, pages = "1-end", encoding='utf-8')

输出:00550529-1295-06-РўРР5。Р

所以,基本上,Camelot在西里尔字母方面做得很好。

pip install camelot-py[cv]
import pandas as pd
import camelot
file = 'file-name.pdf'
tables = camelot.read_pdf(file, pages = "4, 5", encoding='utf-8')
df_p4 = tables[0].df

输出将非常原始,需要清理,但符号不会被破坏,我认为这是一个好结果。

最新更新