def line_parameters(segment):
    """
    Deduces from a segment lines (slope and  intercept) parameters passing through this segment

    :param segment: input segment
    :return: a dict with two linears parameters : slope AND y_intercept
    """
    (x_a, y_a), (x_b, y_b) = segment
    if x_b != x_a:
        a = (y_b - y_a) / (x_b - x_a)
        b = y_a - x_a * a
    else:
        a = 'VERTICAL'
        b = x_a
    return {'slope': a, 'intercept': b}
