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

Applying uploaded RDF ontologies not working #12

Open
bhelou opened this issue Aug 7, 2018 · 0 comments
Open

Applying uploaded RDF ontologies not working #12

bhelou opened this issue Aug 7, 2018 · 0 comments

Comments

@bhelou
Copy link

bhelou commented Aug 7, 2018

Hi,

When we upload an RDF ontology (say ontology.xml) to OSS, we have the option of applying it to existing documents. This isn't currently working as expected because in solr_ontology_tagger.py the fields that are updated are only test_xml_ss_preferred_label_ss and test_xml_ss_uri_ss. The field test_xml_ss (which gets turned to a facet) is not updated. To fix this, I've changed

tagdata = add_value_to_facet(facet = target_facet + '_preferred_label_ss', value = preferred_label, data=tagdata)

to

tagdata[target_facet] = preferred_label
tagdata = add_value_to_facet(facet = target_facet + '_preferred_label_ss', value = preferred_label, data=tagdata)

Is it a reasonable fix?

Thanks!
Bassam

PS: As I'm sure you know, there is a difference in how entity_linker tags documents and how solr_ontology_tagger tags documents. (I think) Entity_linker only tags a document if the facet search returns exact matches to a label:

if str(value).lower() == queries[query]['query'].lower():
              match = True

While playing around with OSS, this seems to cause problems when for example a dictionary term is 'hello '. 'hello' will be returned in a facet search but entity_linker won't tag the document because it's not the same as 'hello ' (with the space at the end).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant