def generate_items_segments(segments):
    """
    Generates a segment-wise item index for a list of segments.

    This method is used both by the featurizer as well as by the BaseClassifiers
    to generate a common order of input items.

    >>> segments = ["One,", "but two.", "Though three", "and four."]
    >>> generate_items_segments(segments)
    [1, 2, 3, 4]
    """
    return list(range(len(segments) + 1))[1:]