def enrich_and_concat(files, out_file): graph = Graph() for sourcefile in files: graph.load(sourcefile, format="turtle") skosify = Skosify() # Enrichments: broader <-> narrower, related <-> related logger.debug("Skosify: Enriching relations") skosify.enrich_relations(graph, False, True, True) with open(out_file + ".tmp", "w") as handle: graph.serialize(handle, format="turtle") os.rename(out_file + ".tmp", out_file) return len(graph)