def sequence_tag_accuracy_scoring(y_true, y_pred):
    """Accuracy score which calculates the number of tags that were predicted
        correctly.

    Args:
        y_true (list): A sequence of true expected labels
        y_pred (list): A sequence of predicted labels

    Returns:
        float: The tag-level accuracy when comparing the predicted labels \
            against the true expected labels
    """
    y_true_flat = [tag for seq in y_true for tag in seq]
    y_pred_flat = [tag for seq in y_pred for tag in seq]

    total = len(y_true_flat)
    if not total:
        return 0

    matches = sum(
        1
        for (y_true_tag, y_pred_tag) in zip(y_true_flat, y_pred_flat)
        if y_true_tag == y_pred_tag
    )

    return float(matches) / float(total)