pyperseo/functions.py
def nt2ttl(path_file):
    """
    Data transformation from .nt file to .ttl
    """

    g = Graph()
    g.parse(str(path_file), format="turtle")

    g.namespace_manager.bind('this', URIRef("http://example.org/data/"))
    g.namespace_manager.bind('sio', URIRef("http://semanticscience.org/resource/"))
    g.namespace_manager.bind('obo', URIRef("http://purl.obolibrary.org/obo/"))
    #all_ns = [n for n in g.namespace_manager.namespaces()]
    #print(all_ns)

    splited = path_file.split(sep=".")
    filename = splited[0]
    ttl_path_file = filename + "." + "ttl"

    g.serialize(destination = str(ttl_path_file), format="turtle")

    Data transformation from .nt file to .ttl
    
Data transformation from .nt file to .ttl
Data transformation from . nt file to . ttl
def nt2ttl(path_file):
    g = Graph()
    g.parse(str(path_file), format="turtle")
    g.namespace_manager.bind('this', URIRef("http://example.org/data/"))
    g.namespace_manager.bind('sio', URIRef("http://semanticscience.org/resource/"))
    g.namespace_manager.bind('obo', URIRef("http://purl.obolibrary.org/obo/"))
    splited = path_file.split(sep=".")
    filename = splited[0]
    ttl_path_file = filename + "." + "ttl"
    g.serialize(destination = str(ttl_path_file), format="turtle")
def nt2ttl ( path_file ) : g = Graph ( ) g . parse ( str ( path_file ) , format = "turtle" ) g . namespace_manager . bind ( 'this' , URIRef ( "http://example.org/data/" ) ) g . namespace_manager . bind ( 'sio' , URIRef ( "http://semanticscience.org/resource/" ) ) g . namespace_manager . bind ( 'obo' , URIRef ( "http://purl.obolibrary.org/obo/" ) ) splited = path_file . split ( sep = "." ) filename = splited [ 0 ] ttl_path_file = filename + "." + "ttl" g . serialize ( destination = str ( ttl_path_file ) , format = "turtle" )
Data transformation from .nt file to .ttl
Data transformation from . nt file to . ttl
"""
    Data transformation from .nt file to .ttl
    """ #all_ns = [n for n in g.namespace_manager.namespaces()] #print(all_ns)
path_file