Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated excelparser and excel2onto (#336)
* Added choice for sheetname for Concepts, Metadata and ImportedOntologies * Moved definitinon of imported ontologies to separate sheet as input * Added force option to excel2onto and excelparser so that errors are skipped and an ontology is made with the rest. * Better handling of errors in prefLabel, including strings with only spaces. * Updated test, particularly to test that option force handles the errors correctly. * Added test for validity of concept name before proceeding in loop in excelparser * Added som test for invalid parent * Added test of concept whos parent is defined later * Documentation updated * Improved warnings and error messages * Make sure that default base_iri is used if it is not provided by the excel file * Made real microstructure as example for excelparser and moved the test onto.xlsx which should include mistakes that the parser should fix * Excelparser now proceeds if force is true, diregarding concepts that cannot be added due to errors in prefLabel: prefLabels with spaces, concepts that already exist (These are diregarded - it might be good to add an option for these in the future if it should be allowed to change or add to concepts), concepts where prefLabel is completely missing. Concepts missing elucidation OK. Leading and trailing spaces are removed. * If missing or wrong parents, concepts are defined directly under owlready2.Thing * If force: add elucidation as rdfs.comment, add altLAbel as rdfs.label, add example as rdfs.comment * Values converted to string 'nan' are not considered when adding literal Co-authored-by: Jesper Friis <[email protected]> Co-authored-by: Casper Welzel Andersen <[email protected]>
- Loading branch information