def term_matches_tokens(text, forms_list, case_sensitive):
    flags = get_tokens_flags(case_sensitive)
    expression = ur'(\b|_)%s(\b|_)' % '(\\b|_)|(\\b|_)'.join(forms_list)
    pattern = re.compile(expression, flags=flags)
    matches = re.findall(pattern, text)
    return len(matches)
Counts the number of occurences of the words in forms_list in the text
dataset/ETHPy150Open bigmlcom/python/bigml/predicate.py/term_matches_tokens