示例#1
0
def lookup_relation(label):
    label = label.replace('_', ' ')

    # Return the cached label -> URI or None
    if label in relations.label_relation_lookup():
        return relations.label_relation_lookup()[label]
    else:
        return None
示例#2
0
    def __init__(self, writer=None):
        if writer is None:
            writer = TurtleRdfWriter()

        self.writer = writer
        self.include_subject_info = False
        self.ecomap = EcoMap()
        self._emit_header_done = False
        self.uribase = writer.base
        self.ecomap.mappings()
        self.bad_chars_regex = re.compile("[^\.:_\-0-9a-zA-Z]")
        self.ro_lookup = dict(relations.label_relation_lookup())