def METHOD_NAME(term_type, term):
    stopwords = ['the', 'all', 'a', 'an', 'that', 'of']
    smaller_than = ['smaller than', 'less', 'less than', 'under', 'smaller', 'beneath', 'lower', 'lower than', 'fewer']
    larger_than = ['bigger', 'bigger than', 'larger than', 'larger', 'over', 'above', 'beyond', 'broader', 'broader ',
                   'than', 'more than', 'more']
    try:
        term_tokens = word_tokenize(term)
    except:
        return term
    term_processed = ' '.join(
        [token.lower().strip() for token in term_tokens if token.lower().strip() not in stopwords])
    if term_type == 'comparison':
        smaller_score = max([fuzz.ratio(term_processed, word) for word in smaller_than])
        larger_score = max([fuzz.ratio(term_processed, word) for word in larger_than])
        if smaller_score > larger_score:
            return '<'
        else:
            return '>'
    elif term_type == 'number':
        return re.fullmatch(r'[-0-9.]+', term_processed)[0]
    else:
        return term_processed