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

Add geonames linked data access and usage notes #143

Closed
wants to merge 1 commit into from
Closed

Conversation

elrayle
Copy link
Contributor

@elrayle elrayle commented Apr 29, 2017

Supports search query and term fetch for geonames authority.

NOTE: You must get a username from geonames.org. See README notes for more information.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 756c4f1 on geonames into ** on master**.

@elrayle
Copy link
Contributor Author

elrayle commented May 1, 2017

@jcoyne geonames.rb gets results back from geonames as json. The configuration file added here gets results back as linked data. The json version does not include the URI, but does include the geonames' id which can be used to construct a URI.

Pattern: `http://www.your.host/qa/search/linked_data/geonames?q={?query}&maximumRecords={?maximumRecords}&username={?username}`

Localhost Examples:
<br>http://localhost:3000/qa/search/linked_data/geonames?q=ithaca&username=yourusername
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can QA pass the username so we don't have to expose our username to our javascript clients?

Copy link
Contributor Author

@elrayle elrayle May 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can set the username's default value, which I should probably mark as recommended. Since we dumped the merging code, this means that the entire config file has to be copied to the app and changes made to the copy.

There is a comment in the README at line 673 that states how to do this.
README.md#geonames-linked-data
Look at the note after the param description table.

@jcoyne
Copy link
Member

jcoyne commented May 3, 2017

@elrayle can you explain what you mean by "getting it back as linked data". Are you modeling the results in RDF?

@elrayle
Copy link
Contributor Author

elrayle commented May 26, 2017

The data that comes back from the authority is a serialization of RDF. It is normalized to a structure that is the same as those created from non-RDF serializations, except that it also includes a URI.

@jcoyne
Copy link
Member

jcoyne commented May 26, 2017

@elrayle So, the search functionality is identical and the fetch functionality expects a CGI escaped URI rather than the identifier?

@jcoyne
Copy link
Member

jcoyne commented May 26, 2017

@elrayle I'm a bit concerned that getting search results back as linked data destroys the relevancy as they aren't returned as a rdf:List:

RDF::RDFXML::Reader.open('http://api.geonames.org/search?q=australia&username=demo&type=rdf').each_statement.first
=> #<RDF::Statement:0x3fe94e50086c(<http://sws.geonames.org/2077456/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.geonames.org/ontology#Feature> .)>

@elrayle
Copy link
Contributor Author

elrayle commented Jun 19, 2017

@jcoyne I understand the issue with the linked data results not returned as rdf:list or some other indicator of order.

We are exploring caching authority data, wrapping with a lucene/solr index for search, and providing search results with a predicate that will hold search ranking that can be used for sorting data.

This isn't in place just yet, but will be in the near future. This same basic process will be applied across a number of authorities. We are currently using cached LoC data for our initial implementation test. Geonames is also being targeted for use with this process.

@elrayle
Copy link
Contributor Author

elrayle commented Jul 18, 2018

Instead of creating new authority configuration files in QA itself, the config files are being created in ld4l-labs/linked_data_authorities.

@elrayle elrayle closed this Jul 18, 2018
@elrayle elrayle deleted the geonames branch July 18, 2018 15:54
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

Successfully merging this pull request may close these issues.

None yet

4 participants