Explain the attention mechanism in NLP and how you might apply it to extract safety warnings from unstructured text logs.