def features(sender=''):
    '''Returns a list of signature features.'''
    return [
        # This one isn't from paper.
        # Meant to match companies names, sender's names, address.
        many_capitalized_words,
        # This one is not from paper.
        # Line is too long.
        # This one is less aggressive than `Line is too short`
        lambda line: 1 if len(line) > TOO_LONG_SIGNATURE_LINE else 0,
        # Line contains email pattern.
        binary_regex_search(RE_EMAIL),
        # Line contains url.
        binary_regex_search(RE_URL),
        # Line contains phone number pattern.
        binary_regex_search(RE_RELAX_PHONE),
        # Line matches the regular expression "^[\s]*---*[\s]*$".
        binary_regex_match(RE_SEPARATOR),
        # Line has a sequence of 10 or more special characters.
        binary_regex_search(RE_SPECIAL_CHARS),
        # Line contains any typical signature words.
        binary_regex_search(RE_SIGNATURE_WORDS),
        # Line contains a pattern like Vitor R. Carvalho or William W. Cohen.
        binary_regex_search(RE_NAME),
        # Percentage of punctuation symbols in the line is larger than 50%
        lambda line: 1 if punctuation_percent(line) > 50 else 0,
        # Percentage of punctuation symbols in the line is larger than 90%
        lambda line: 1 if punctuation_percent(line) > 90 else 0,
        contains_sender_names(sender)
        ]
def features ( sender = '' ) : return [ many_capitalized_words , lambda line : 1 if len ( line ) > TOO_LONG_SIGNATURE_LINE else 0 , binary_regex_search ( RE_EMAIL ) , binary_regex_search ( RE_URL ) , binary_regex_search ( RE_RELAX_PHONE ) , binary_regex_match ( RE_SEPARATOR ) , binary_regex_search ( RE_SPECIAL_CHARS ) , binary_regex_search ( RE_SIGNATURE_WORDS ) , binary_regex_search ( RE_NAME ) , lambda line : 1 if punctuation_percent ( line ) > 50 else 0 , lambda line : 1 if punctuation_percent ( line ) > 90 else 0 , contains_sender_names ( sender ) ]
Returns a list of signature features.