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

Support additional sources for label-display #51

Open
johanwk opened this issue Apr 21, 2024 · 2 comments
Open

Support additional sources for label-display #51

johanwk opened this issue Apr 21, 2024 · 2 comments

Comments

@johanwk
Copy link
Owner

johanwk commented Apr 21, 2024

ELOT will pick up labels for resources defined in the file, as of 405971f.

Add an option to include more sources of identifier/label/attribute lists. Initially, ensure that a premade sparql query can be used to collect content from an endpoint or ontology file.

It's important to allow for several different sources that are merged.

@johanwk
Copy link
Owner Author

johanwk commented Apr 25, 2024

As of 1f5f697, ELOT will display labels for puris in any buffer. This requires retrieving labels first.

Example: retrieve labels from a local endpoint with bfo-core loaded, and from the QUDT public endpoint.

(elot-retrieve-labels-plist "http://localhost:3030/bfo-core/query" "~/tmp/bfotest.el")
(elot-retrieve-labels-plist "https://www.qudt.org/fuseki/qudt/sparql" "~/tmp/qudttest.el")

This produces files ~/tmp/bfotest.el and ~/tmp/qudttest.el containing lists of identifiers and labels, plus some annotations.

To load these for displaying labels, they need to be added to the variable `elot-slurp-global', like this:

(elot-read-slurp-global "~/tmp/bfotest.el" "~/tmp/qudttest.el")

Then to turn label display on, do M-x elot-label-display-setup.

There are some issues with regexps being too long, which can perhaps be fixed.

@johanwk
Copy link
Owner Author

johanwk commented Apr 25, 2024

There's also a useful lookup function, elot-label-lookup, which works even if fontification fails.

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