0

A lawyer friend of mine has thousands of files in PDF and Word format. He would like to extract the name and email addresses from these files, preferably in a CSV or Excel format. The files are not in a consistent structure/layout either.

Can someone suggest paid or free software to handle this task?

1 Answer 1

1

I would use a python solution.

If the word files are in .docx format then python has a number of libraries such as docxpy and docx that allow extracting the text from word docx files. (In one utility that I use for processing word files I use python to use word to convert any .doc files to a temporary .docx format file).

In computer generated PDF files the text is also available and can be extracted using the python pdfminer library - otherwise you are looking at using OCR which is error prone.

Once you have the text content of the file the python regex or re libraries makes short work of locating email addresses and, given that the name elements probably follow a predictable placement and pattern they can almost certainly also be located.

Output to .csv format is simple with the csv library and there are also libraries for writing to excel format directly.

All of the above are Free, Gratis & Open Source and will run under multiple operating systems - it just needs someone to do a few hours work - while there is a lot of help online there are also books that can help such as Automate the Boring Stuff with Python. I am not the author or in any other way associated with this book!

3
  • Python is some kind of programming language and not really a software. I am not shure that a lawyer has programming skills.
    – convert
    Commented Jan 20, 2022 at 20:33
  • My experience is that most lawyers are smart people and python is widely mentioned as a language that is quick to pick up - I am reasonably sure that they could, possibly with a little help, make use of the software mentioned above successfully. Commented Jan 21, 2022 at 18:18
  • I have not said that lawyers are stupied or something like that, but programming is something complete diferent, that what lawyers do. And Python is a realy strange programming language, not easy to learn even for people with programming knowledge.
    – convert
    Commented Jan 21, 2022 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.