我有一个PDF文件,其中包含了一所大学的时间表,由aSc时间表软件生成。
数据看起来是这样的,


在PDF文件中大约有29个这样的页面。
我希望为程序处理这些数据,因此,我希望它在任何编程语言中都是可读的形式,最好是用C++或Python。
有人能指点我怎么做吗?也许我可以使用某个库来使用C++将这些数据转换为文本文件?
我需要的是这种形式的数据,
假设在C++中,我们有一个名为节的类(一个对象将表示每个节,例如“BCS-1A”的对象或"BCS-7E“对象等等)。
所以,对于BCS-1A
Section Object:
section_name: "BCS-1A" // (section_name is a string data member)
// There will be 7 arrays, each representing one day of the week and each array will be of size 16. One index of the array will represent one time slot of that day. So, in this case,
moday_schedule[16]; // it will be an **linked list** array of 16 size. Each index can be empty or may contain as many slots as possible. Each index represents the time slot in the timetable. For example "0th" index will represent the time slot of 8:45 to 9:15, 16th index will represent 4:15 to 4:40 and etc.
// For example, monday_schedule[0] will be EMPTY.
// monday_schedule[4] will contain an object that will have following information,
// Subject: Digital Logic Design
// Teacher: Mirza Waqar Baig
// Sub-section: None (there is a sub-section in some lectures)
// Room: R-5
// monday_schedule[5] will also contain same information
// monday_schedule[12] will have two objects.
// and both the objects will have an attribute of "Sub-section" as well 发布于 2021-09-18 13:58:59
我编写了一个存储库 on GitHub
我首先使用pdf2image将pdf转换成图像文件,并将这些文件存储在图像文件夹中。
然后使用pytesseract将这些图像转换为txt文件,并将这些txt文件存储在texts文件夹中。
之后,我对文本进行了一些格式化,并以csv格式存储在csvs文件夹中。
https://stackoverflow.com/questions/69232521
复制相似问题