Skip to content

Commit

Permalink
Updating prefixes extraction issue for turtle output
Browse files Browse the repository at this point in the history
  • Loading branch information
eiglesias34 committed Feb 27, 2023
1 parent dd243f3 commit c42d4da
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ You can easily customize your own configurations from the set of features that S

## Version
```
4.6.6.14
4.6.6.15
```

## RML-Test Cases
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.6.6.14
4.6.6.15
9 changes: 6 additions & 3 deletions rdfizer/rdfizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def prefix_extraction(original):
prefixes[elements[2][1:-1].split(">")[0]] = elements[1][:-1]
else:
prefixes[elements[2][1:-1]] = elements[1][:-1]
string_prefixes += prefix
string_prefixes += prefix
elif prefix == "\n":
pass
else:
break
string_prefixes += "\n"
Expand Down Expand Up @@ -1994,7 +1996,6 @@ def semantify_json(triples_map, triples_map_list, delimiter, output_file_descrip

object = None
else:
print("hola")
if triples_map_element.iterator != triples_map.iterator:
parent_iterator = triples_map_element.iterator
child_keys = triples_map.iterator.split(".")
Expand Down Expand Up @@ -4444,7 +4445,6 @@ def semantify(config_path):
cursor.execute(triples_map.query)
row_headers=[x[0] for x in cursor.description]
for row in cursor:
#print(row)
if config[dataset_i]["db"].lower() != "none":
number_triple += executor.submit(semantify_mysql, row, row_headers, triples_map, triples_map_list, output_file_descriptor, config[dataset_i]["host"], int(config[dataset_i]["port"]), config[dataset_i]["user"], config[dataset_i]["password"],config[dataset_i]["db"]).result()
else:
Expand Down Expand Up @@ -4586,10 +4586,13 @@ def semantify(config_path):
else:
if database != "None":
cursor.execute("use " + database)
print("adios")
if triples_map.query == "None":
for query in query_list:
print(query)
cursor.execute(query)
row_headers=[x[0] for x in cursor.description]
print(row_headers)
for row in cursor:
if config[dataset_i]["db"].lower() != "none":
number_triple += executor.submit(semantify_mysql, row, row_headers, triples_map, triples_map_list, output_file_descriptor, config[dataset_i]["host"], int(config[dataset_i]["port"]), config[dataset_i]["user"], config[dataset_i]["password"],config[dataset_i]["db"]).result()
Expand Down
9 changes: 6 additions & 3 deletions rdfizer/rdfizer/semantify.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def prefix_extraction(original):
prefixes[elements[2][1:-1].split(">")[0]] = elements[1][:-1]
else:
prefixes[elements[2][1:-1]] = elements[1][:-1]
string_prefixes += prefix
string_prefixes += prefix
elif prefix == "\n":
pass
else:
break
string_prefixes += "\n"
Expand Down Expand Up @@ -1994,7 +1996,6 @@ def semantify_json(triples_map, triples_map_list, delimiter, output_file_descrip

object = None
else:
print("hola")
if triples_map_element.iterator != triples_map.iterator:
parent_iterator = triples_map_element.iterator
child_keys = triples_map.iterator.split(".")
Expand Down Expand Up @@ -4444,7 +4445,6 @@ def semantify(config_path):
cursor.execute(triples_map.query)
row_headers=[x[0] for x in cursor.description]
for row in cursor:
#print(row)
if config[dataset_i]["db"].lower() != "none":
number_triple += executor.submit(semantify_mysql, row, row_headers, triples_map, triples_map_list, output_file_descriptor, config[dataset_i]["host"], int(config[dataset_i]["port"]), config[dataset_i]["user"], config[dataset_i]["password"],config[dataset_i]["db"]).result()
else:
Expand Down Expand Up @@ -4586,10 +4586,13 @@ def semantify(config_path):
else:
if database != "None":
cursor.execute("use " + database)
print("adios")
if triples_map.query == "None":
for query in query_list:
print(query)
cursor.execute(query)
row_headers=[x[0] for x in cursor.description]
print(row_headers)
for row in cursor:
if config[dataset_i]["db"].lower() != "none":
number_triple += executor.submit(semantify_mysql, row, row_headers, triples_map, triples_map_list, output_file_descriptor, config[dataset_i]["host"], int(config[dataset_i]["port"]), config[dataset_i]["user"], config[dataset_i]["password"],config[dataset_i]["db"]).result()
Expand Down

0 comments on commit c42d4da

Please sign in to comment.