def __n3_to_str(triple):
    """Convert a rdflib RDF triple into a tuple of strings (in N3 format)"""
    s, p, o = triple
    s = s.n3()
    p = p.n3()
    o = o.n3()
    if s.startswith('<') and s.endswith('>'):
        s = s[1:len(s) - 1]
    if p.startswith('<') and p.endswith('>'):
        p = p[1:len(p) - 1]
    if o.startswith('<') and o.endswith('>'):
        o = o[1:len(o) - 1]
    return (s, p, o)