def rule2string(lhs,rhs,isCopy=False):
    """
    Makes a string from a rule. Used in printing and in making a dict of rules and probs.

    Arguments:
    lhs    : string
    rhs    : string list
    isCopy : boolean indicating a copy rule. Only used in cky_constituent_copy
    """
    s = "%s->%s"%(lhs,".".join(rhs))
    if isCopy:
        s+=".copy"
    return s