Skip to content
Snippets Groups Projects
Commit ab7b5f37 authored by Philipp Schneider's avatar Philipp Schneider
Browse files

Add function to clean class name string from unnecessary characters

parent 1e111dc7
No related branches found
No related tags found
No related merge requests found
......@@ -37,4 +37,16 @@ def serialize_graph(g, output_file_list):
file_format = output_option['file_format']
g.serialize(destination=output_rdf_path, format=file_format)
print(f'Created {output_rdf_path}')
\ No newline at end of file
print(f'Created {output_rdf_path}')
def clean_class_name_string(input_string):
"""
Cleans string that is to be used as a class name from unwanted characters.
"""
char_list = ["'", '"', '.', '+', ',', '*', '&', '/', '=', '', ';', '¨', '#', '?', '\n']
for char in char_list:
input_string = input_string.replace(char, '')
return input_string
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment