Comparing Two Sections of Text


I need to compare two sections of text, and have been using the recipe here: How to write a recipe comparing two strings?. However, I would like there to be a model in the loop learning from the label as it relates to only one of the text blocks. How can I achieve this?