1. A method comprising: converting a medical document, having textual content and rich formatting, into a first XHTML document that retains the textual content and the rich formatting of the medical document, the first XHTML document including a first text string in rich formatting; generating from the first XHTML document a plain text document that retains the textual content and not the rich formatting of the first XHTML document, wherein generating the plain text document comprises extracting text nodes from the first XHTML document and forming the plain text document from the extracted text nodes, the plain text document including the first text string in plain text without rich formatting; generating one or more annotations of the plain text document by applying a natural language understanding (NLU) engine implemented on a processor to the plain text document, the one or more annotations including a first annotation linked to the first text string in the plain text document without rich formatting; and displaying an annotated XHTML document created by applying the one or more annotations of the plain text document to a tokenized XHTML document including the textual content and the rich formatting of the medical document, the tokenized XHTML document including the first text string in rich formatting, wherein displaying the annotated XHTML document comprises displaying the first annotation linked to the first text string in rich formatting in the tokenized XHTML document.