Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jump_to box doesn't work as expected for ontologies which set English as a single naturalLanguage #335

Open
alexskr opened this issue Oct 2, 2024 · 7 comments

Comments

@alexskr
Copy link
Member

alexskr commented Oct 2, 2024

jump_to search box doesn't show results for single language ontologies which set English as the naturalLanguage. Unsetting English fixes the issue.
Screenshot 2024-10-02 at 16 26 34

@alexskr alexskr changed the title multilingual: jump_to box doesn't work as expected for ontologies which set English as a single naturalLanguage multilingual support: jump_to box doesn't work as expected for ontologies which set English as a single naturalLanguage Oct 2, 2024
@syphax-bouazzouni
Copy link
Contributor

Do you have the error logs?

@mdorf
Copy link
Member

mdorf commented Oct 2, 2024

Some additional detail:
https://bioportal.bioontology.org/ontologies/D3O?p=summary

Screenshot 2024-10-02 at 16 17 28

Search entries are below. They DO NOT include the XXX_en attributes:
Screenshot 2024-10-02 at 16 19 33

When searching for lang=en, you get no results:

https://data.bioontology.org/search?q=energy&ontologies=D3O&lang=en
Screenshot 2024-10-02 at 16 22 33

However, when using classes endpoints with lang=en, the prefLabels show up correctly:
https://data.bioontology.org/ontologies/D3O/classes/?lang=en

Screenshot 2024-10-02 at 16 23 39

@mdorf
Copy link
Member

mdorf commented Oct 2, 2024

@syphax-bouazzouni, since the ontology specifically ads "English" as a language, shouldn't we expect to see the "XXX_en" attributes in the index for D3O?

@mdorf
Copy link
Member

mdorf commented Oct 3, 2024

More details:

Here is a sample term declaration in the OWL file (D3O.owl):

    <AnnotationAssertion>
        <AnnotationProperty abbreviatedIRI="rdfs:comment"/>
        <IRI>EnergyMetabolism</IRI>
        <Literal xml:lang="en">A set of metabolic pathways that are involved in the generation and use of energy within an organism, typically through processes like cellular respiration and photosynthesis.</Literal>
    </AnnotationAssertion>
    <AnnotationAssertion>
        <AnnotationProperty abbreviatedIRI="rdfs:label"/>
        <IRI>EnergyMetabolism</IRI>
        <Literal xml:lang="en">Energy Metabolism</Literal>
    </AnnotationAssertion>

As seen below, it defines a label (lang=en) and definition (lang=en). But the the prefLabel is defined as:

@prefLabel={:none=>["Energy Metabolism"]}, 

WHY? I would expect:

@prefLabel={:en=>["Energy Metabolism"]}, 

Below, is the corresponding Class instance in ontologies_linked_data:

#<LinkedData::Models::Class:0x000000010700e120
 @aggregates=[#<struct Goo::Base::AGGREGATE_VALUE attribute=:children, aggregate=:count, value=0>],
 @created=nil,
 @cui=[],
 @definition=
  {:en=>
    ["A set of metabolic pathways that are involved in the generation and use of energy within an organism, typically through processes like cellular respiration and photosynthesis."]},
 @id=#<RDF::URI:0x5064(https://purl.dsmz.de/schema/EnergyMetabolism)>,
 @label={:en=>["Energy Metabolism"]},
 @persistent=true,
 @prefLabel={:none=>["Energy Metabolism"]},
 @prefixIRI=nil,
 @previous_values=nil,
 @semanticType=[],
 @subClassOf=[#<RDF::URI:0x5014(https://purl.dsmz.de/schema/MetabolicPathway)>],
 @synonym=[],
 @unmapped=
  {#<RDF::URI:0x5078(http://www.w3.org/2000/01/rdf-schema#label)>=>{:en=>[#<RDF::Literal:0x508c("Energy Metabolism"@en)>]},
   #<RDF::URI:0x5028(http://www.w3.org/2000/01/rdf-schema#comment)>=>
    {:en=>
, typically through processes like cellular respiration and photosynthesis."@en)>]},
thway)>],
   #<RDF::URI:0x503c(http://www.w3.org/1999/02/22-rdf-syntax-ns#type)>=>[#<RDF::URI:0x50c8(http://www.w3.org/2002/07/owl#Class)>],
   #<RDF::URI:0x5050(http://data.bioontology.org/metadata/def/prefLabel)>=>
    {:none=>[#<RDF::Literal:0x50dc("Energy Metabolism"^^<http://www.w3.org/2001/XMLSchema#string>)>]},
rgyMetabolism)>],
   #<RDF::URI:0x5118(http://data.bioontology.org/metadata/def/mappingLoom)>=>
    {:none=>[#<RDF::Literal:0x512c("energymetabolism"^^<http://www.w3.org/2001/XMLSchema#string>)>]}},
 @xref=nil>

@jonquet
Copy link

jonquet commented Oct 11, 2024

Good point. We should have seen this. Our driving use cases were very much "SKOS" so we missed it.

@jvendetti
Copy link
Member

@alexskr - why was this issue closed? It's still broken in our production environment. See the https://bioportal.bioontology.org/ontologies/CMECS ontology as an example. The ontology declares English as the natural language, and the Jump to box doesn't work:


Screenshot 2024-10-28 at 4 11 00 PM

@jvendetti jvendetti reopened this Oct 28, 2024
@jvendetti jvendetti added the bug label Oct 28, 2024
@alexskr
Copy link
Member Author

alexskr commented Oct 30, 2024

The fix introduced in ncbo/ontologies_linked_data#221 fixed problems with D3O ontology; however, this problem remains unresolved for many ontologies. (AIO, BAO, DTO, CMECS, FYP, OPB, etc)

@jvendetti jvendetti changed the title multilingual support: jump_to box doesn't work as expected for ontologies which set English as a single naturalLanguage jump_to box doesn't work as expected for ontologies which set English as a single naturalLanguage Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants