def cleanForIRI(string):
    """Cleans a string to be suitable for use as an IRI (punctation we dont want is removed)"""
    
    iri = ""
    
    for c in string:
        if c.isalnum() or c in ["-", ".", "_", "~"]:
            iri+=c
    return iri