How to extract titles from documents? 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.
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.