def calculateBounds(sentences):
    """Given a list of sentence strings, calculate their bounds as character offsets from 0
    """
    curbound, bounds = 0, []
    for s in sentences:
        bounds.append((curbound, curbound + len(s)))
        curbound += len(s) + 1
    commabounds = [','.join((str(b) for b in bnds)) for bnds in bounds]
    strbounds = '\n'.join(commabounds)
    return strbounds