Due to my lack of knowledge in deep learning and neural network I need help picking the best approach to tackle a challenge.

I have a dataset with list of words where each word has 4 attributes (x, y, fontSize, textWidth). All words in this dataset are extracted from headers and subheaders in a document.

After training a neural network on this dataset, I need it to find all headers and subheaders in an unseen document that matches the shape of a chart.

Question: Which neural network would work best for this problem?