How can one automate the extraction of a relevant title from a given document (docx, pdf, etc..)?

Some thoughts:

  • Intuitively likely to be the first line in the text
  • Cannot be something like a date, "all rights reserved", "Harvard University - Faculty of Law" etc.
  • Might be in the footer
  • The human brain solves this immediately (by filtering out common names and numbers)

I'm using textract in python to extract the whole text, which limits the solution to be based on text only. Let me know if you are familiar with any other packages.


1 Answer 1


The automate the extraction of a title is an example of extractive summarization. It is typically solved with a combination of supervised and sem-supervised learning. More recently Deep Learning models with attention have been giving state-of-the-art results.

You'll need labeled to train your own model or used established packages such as symy.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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