def check_text_similarity(a_dom, b_dom, cutoff):
a_words = list(tree_words(a_dom))<EOL>b_words = list(tree_words(b_dom))<EOL>sm = WordMatcher(a=a_words, b=b_words)<EOL>if sm.text_ratio() >= cutoff:<EOL><INDENT>return True<EOL><DEDENT>return False<EOL>
Check whether two dom trees have similar text or not.