(lowercase=False, commas=False)
return tokenizer
Parses whitespace- or comma-separated tokens.

    >>> ana = KeywordAnalyzer()
    >>> [token.text for token in ana("Hello there, this is a TEST")]
    ["Hello", "there,", "this", "is", "a", "TEST"]

    :param lowercase: whether to lowercase the tokens.
    :param commas: if True, items are separated by commas rather than
        whitespace.
Parses whitespace- or comma-separated tokens.
Parses whitespace - or comma - separated tokens .
def KeywordAnalyzer(lowercase=False, commas=False):
    """Parses whitespace- or comma-separated tokens.

    >>> ana = KeywordAnalyzer()
    >>> [token.text for token in ana("Hello there, this is a TEST")]
    ["Hello", "there,", "this", "is", "a", "TEST"]

    :param lowercase: whether to lowercase the tokens.
    :param commas: if True, items are separated by commas rather than
        whitespace.
    """

    if commas:
        tokenizer = CommaSeparatedTokenizer()
    else:
        tokenizer = SpaceSeparatedTokenizer()
    if lowercase:
        tokenizer = tokenizer | LowercaseFilter()
    return tokenizer
def KeywordAnalyzer ( lowercase = False , commas = False ) : if commas : tokenizer = CommaSeparatedTokenizer ( ) else : tokenizer = SpaceSeparatedTokenizer ( ) if lowercase : tokenizer = tokenizer | LowercaseFilter ( ) return tokenizer