def do_unstructured_citation(ref):
    """decide if a citation should have an unstructured_citation tag added"""
    if ref.publication_type and ref.publication_type in [
        "confproc",
        "patent",
        "software",
        "thesis",
        "web",
        "webpage",
    ]:
        return True
    if (
        ref.publication_type
        and ref.publication_type in ["preprint"]
        and ref.doi is None
    ):
        return True
    if ref.publication_type and ref.publication_type in ["report"] and ref.isbn is None:
        return True
    return False