def alignment_percentage(document_a, document_b, model):
    """
    Returns the percentage of alignments of `document_a` and `document_b`
    using the model provided.

    - `document_a` and `document_b` are two lists of Sentences to align.
    - `model` can be a YalignModel or a path to a yalign model.
    """

    if len(document_a) == 0 and len(document_b) == 0:
        return 100.0

    align = model.align(document_a, document_b)
    align = [x for x in align if x[0] is not None and x[1] is not None]
    ratio = len(align) / float(max(len(document_a), len(document_b)))
    return round(ratio * 100, 2)