Ejemplo n.º 1
0
"""
This module will aid in reading ELAN files. This aim is to populate an OWL ontology with instances extracted from the ELAN file. 

NOTE:
Though this file creates GOLD entities, the full functionality is not yet implemented. 
"""

# create ontology object and declare uri
gold = Ontology("http://purl.org/linguistics/gold")

# load GOLD remotely
# gold=load('http://purl.org/linguistics/gold')

# may be done locally, for speed
gold.load("file:" + abspath("../examples/inputfiles/gold-2008.owl"))


class ElanReader(object):

    """
    A class for reading Elan eaf files

    """

    def __init__(self):

        # one converter per input file is read
        # (maybe change this to global if multiple files are to be read in a batch?
        # assume file is in XSAMPA, for now
        self.converter = CharConverter("xsampa", "uni")
Ejemplo n.º 2
0
"""
This module will aid in reading Praat files. This aim is to populate an OWL ontology with instances extracted from the Praat file.

NOTE:
Though this file creates GOLD entities, the full functionality is not yet implemented. 
"""

#create ontology object and declare uri
gold=Ontology('http://purl.org/linguistics/gold')

#load GOLD remotely
#gold=load('http://purl.org/linguistics/gold')

#may be done locally, for speed
gold.load('file:'+abspath('../examples/inputfiles/gold-2008.owl'))



class PraatReader():

    """
    A class for parsing and processing Praat TextGrid files
    
    """

#from Termset
#    def __init__(self,ns=u'http://purl.org/linguistics/data/termset/'):
        
#        """
#        Init the termset and set its namespace 
Ejemplo n.º 3
0
"""
This module will aid in reading Praat files. This aim is to populate an OWL ontology with instances extracted from the Praat file.

NOTE:
Though this file creates GOLD entities, the full functionality is not yet implemented. 
"""

#create ontology object and declare uri
gold=Ontology('http://purl.org/linguistics/gold')

#load GOLD remotely
#gold=load('http://purl.org/linguistics/gold')

#may be done locally, for speed
gold.load('file:'+abspath('../examples/inputfiles/gold-2008.owl'))



class PraatReader():

    """
    A class for parsing and processing Praat TextGrid files
    
    """

#from Termset
#    def __init__(self,ns=u'http://purl.org/linguistics/data/termset/'):
        
#        """
#        Init the termset and set its namespace