cygri / vocidex

Search over RDF schemas and OWL ontologies
MIT License
11 stars 6 forks source link

Indexing terms other than rdfs:label #8

Open trapperkeeper opened 9 years ago

trapperkeeper commented 9 years ago

Is there a way to configure vocidex to index on other terms (annotation property values) attached to the classes? I've got the basic set-up running, and it works very well. But I can't figure out how to get it to index values other than rdfs:label. Sorry, I know that this isn't an "issue" per se. But I didn't find any other contact method.

cygri commented 9 years ago

The property to be used can't be changed from configuration, but it would be a fairly simple change in the source code. I suppose you already have Vocidex compiled from source with Maven?

trapperkeeper commented 9 years ago

Yes, I did compile with Maven. Could you give me a hint of what class(es) I should look at if I want to grab terms from other properties? Thanks, Todd

Landon Todd Detwiler Structural Informatics Group (SIG) University of Washington

phone: 206-351-7721

On 1/13/15 3:35 PM, Richard Cyganiak wrote:

The property to be used can't be changed from configuration, but it would be a fairly simple change in the source code. I suppose you already have Vocidex compiled from source with Maven?

— Reply to this email directly or view it on GitHub https://github.com/cygri/vocidex/issues/8#issuecomment-69843337.

cygri commented 9 years ago

Check out LabelDescriber.java in the org.deri.vocidex.describers package. The way it works is, it runs the SPARQL query in src/main/resources/queries/term-label.sparql against the input, and uses the first result for ?label as the label. You can modify that query to use other or additional properties besides rdfs:label. Any post-processing is done again in LabelDescriber. Hope that helps!

trapperkeeper commented 9 years ago

It sounds like the query could be altered fairly easily to return more terms, but I'd also want to change the code to index by more than 1 term per class. Doable I'm sure. I'm also looking into SPARQL engines that have term indexing built in. Thanks for the follow-up. Cheers, Todd

Landon Todd Detwiler Structural Informatics Group (SIG) University of Washington

phone: 206-351-7721

On 1/14/15 1:55 AM, Richard Cyganiak wrote:

Check out |LabelDescriber.java| in the |org.deri.vocidex.describers| package. The way it works is, it runs the SPARQL query in |src/main/resources/queries/term-label.sparql| against the input, and uses the first result for |?label| as the label. You can modify that query to use other or additional properties besides |rdfs:label|. Any post-processing is done again in |LabelDescriber|. Hope that helps!

— Reply to this email directly or view it on GitHub https://github.com/cygri/vocidex/issues/8#issuecomment-69892995.