Giter VIP home page Giter VIP logo

prom's People

Contributors

felixocker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

prom's Issues

AssertionError: OP with more than one noun

It seems like multiple nouns within rdfs:label statements for OPs can cause an AssertionError: OP with more than one noun:.

As a, hopefully reproducible, minimal example I've used onto-a.owl and onto-fr.owl.
If I change <rdfs:label xml:lang="en">is created by</rdfs:label> to <rdfs:label xml:lang="en">creation has creator</rdfs:label>, I receive the following traceback:

robert@DESKTOP-XXXXXX:~/git/prom/src$ python3.8 prom.py
* Owlready2 * Warning: optimized Cython parser module 'owlready2_optimized' is not available, defaulting to slower Python implementation
checking consistency
----
file://./../data/onto-a.owl
No inconsistencies detected.
----
file://./../data/onto-fr.owl
No inconsistencies detected.
----
Traceback (most recent call last):
  File "prom.py", line 231, in <module>
    prom.run_all()
  File "prom.py", line 207, in run_all
    tbox_matches = self.match_tbox()
  File "prom.py", line 89, in match_tbox
    matches = cbs.main(self.paths[0][1], self.paths[0][0], self.paths[1][1], self.paths[1][0], "semi")
  File "/home/robert/git/prom/src/compare_by_structure.py", line 468, in main
    semantic_combos = get_semantic_elem_combos(iri1, path1, iri2, path2)
  File "/home/robert/git/prom/src/compare_by_structure.py", line 428, in get_semantic_elem_combos
    semantic_matches = cbl.main(iri1, path1, iri2, path2)
  File "/home/robert/git/prom/src/compare_by_labels.py", line 387, in main
    matches.extend(implicit_compare(analyzed_labels_1[counter], analyzed_labels_2[counter], elem_type))
  File "/home/robert/git/prom/src/compare_by_labels.py", line 293, in implicit_compare
    assert len(tokens_by_type(combo[0][2], "NOUN")) == 1, f"OP with more than one noun: {combo[0][0]}"
AssertionError: OP with more than one noun: http://example.org/onto-a.owl#is_created_by
robert@DESKTOP-XXXXXX:~/git/prom/src$

I've initially come across the AssertionError: OP with more than one noun: in a larger ontology with multiple object properties that contain more than two nouns in both the IRIs and rdfs:labels of OPs. Since changing the label causes the error within the minimal example, I assume that within this larger ontology the labels are also the culprits.

It seems like this behavior does not apply to DPs, as I can't reproduce it with them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.