  The application of natural language processing (NLP) to cancer pathology
reports has been focused on detecting cancer cases, largely ignoring
precancerous cases. Improving the characterization of precancerous adenomas
assists in developing diagnostic tests for early cancer detection and
prevention, especially for colorectal cancer (CRC). Here we developed
transformer-based deep neural network NLP models to perform the CRC
phenotyping, with the goal of extracting precancerous lesion attributes and
distinguishing cancer and precancerous cases. We achieved 0.914 macro-F1 scores
for classifying patients into negative, non-advanced adenoma, advanced adenoma
and CRC. We further improved the performance to 0.923 using an ensemble of
classifiers for cancer status classification and lesion size named entity
recognition (NER). Our results demonstrated the potential of using NLP to
leverage real-world health record data to facilitate the development of
diagnostic tests for early cancer prevention.
