Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Siudalski authored and Tomasz Siudalski committed Nov 23, 2023
1 parent 4dc958f commit dbe8f04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions models/model_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ def convert_to_int(s):
if not s:
return 0

s = s.upper() # Convert to uppercase for case insensitivity
s = s.upper()
roman_numerals = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}

if s.isdigit():
return int(s) # If the input is already an integer, return it
return int(s)

result = 0
prev_value = 0
Expand Down
2 changes: 1 addition & 1 deletion paper_model_to_ttl.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def convert_paper_model_to_graph(article_data: PaperModel):
for i, author in enumerate(article_data.authors):
author_ = URIRef(bn + f"author_{gen_hash(author.name)}")
add_to_graph(g, author_, RDF.type, schema.Person, to_literal=False)
add_to_graph(g, author_, schema.name, author.name, datatype=XSD.string)
add_to_graph(g, author_, schema.name, author.given_name + " " + author.family_name, datatype=XSD.string)
add_to_graph(g, author_, schema.givenName, author.given_name, datatype=XSD.string)
add_to_graph(g, author_, schema.familyName, author.family_name, datatype=XSD.string)
if author.affiliations:
Expand Down

0 comments on commit dbe8f04

Please sign in to comment.