If you don't have to use LCSH... the Agrovoc thesaurus has a term suggester API:

try http://foris.fao.org/agrovoc/

It's actually easier to use than LCSH because the terms are not pre-coordinated.

kc

On 6/5/13 9:58 AM, Joshua Welker wrote:
Hmm, that is pretty smart. I am actually hoping to roll this whole thing into a 
plugin for Wordpress/Drupal, so if possible I want to avoid using anything that 
is going to require server configuration (ie setting up Solr). But I bet I 
could just roll all the LCSH data into an SQLite file and then search it with 
PHP on the server.

This might work. Thanks!

Josh Welker


-----Original Message-----
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Ethan 
Gruber
Sent: Wednesday, June 05, 2013 11:51 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] LOC Subject Headings API

I once put all of the LCSH headings into a local Solr index and used 
TermsComponent to power autosuggest.  It was really fast.

Ethan


On Wed, Jun 5, 2013 at 12:47 PM, Joshua Welker <jwel...@sbuniv.edu> wrote:

I realized since I made that comment that the API is designed to give
the top 10 subject heading suggestions rather than all of them.

So that part is fine. But I am once again unsure if the API will work
for me. I am creating a mashup of several data sources for my
auto-suggest feature, and I am having a hard time dynamically adding
the results from the LOC Suggest API to the existing collection of
data that is used to populate my jQuery UI Autocomplete field.
Ideally, I'd like to be able to have all the LC Subject Heading data
cached on my server so that I can build my autocomplete data source
one time rather than having to deal with dynamically adding, sorting,
etc. But then the problem I run into is that the LCSH master file is so big 
that it basically crashes the server.

That's why I'm thinking I might have to give up on this project.

Josh Welker


-----Original Message-----
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf
Of Michael J. Giarlo
Sent: Wednesday, June 05, 2013 9:59 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] LOC Subject Headings API

Josh,

Can you say more about how the API isn't behaving as you expected it to?

-Mike



On Wed, Jun 5, 2013 at 10:37 AM, Joshua Welker <jwel...@sbuniv.edu> wrote:

I went with this method and made some good progress, but the results
the API was returning were not what I expected. I might have to give
up on this project.

Josh Welker


-----Original Message-----
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf
Of Ethan Gruber
Sent: Wednesday, June 05, 2013 8:22 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] LOC Subject Headings API

You'd write some javascript to query the service with every
keystroke,
e.g.
http://id.loc.gov/authorities/suggest/?q=Hi replies with subjects
beginning with "hi*"  It looks like covo.js supports LCSH, so you
could look into that.

Ethan


On Wed, Jun 5, 2013 at 9:13 AM, Joshua Welker <jwel...@sbuniv.edu>
wrote:
This would work, except I would need a way to get all the subjects
rather than just biology. Any idea how to do that? I tried
removing the querystring from the URL and changing "Biology" in the URL to ""
with no success.

Josh Welker


-----Original Message-----
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On
Behalf Of Michael J. Giarlo
Sent: Tuesday, June 04, 2013 7:05 PM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] LOC Subject Headings API

How about id.loc.gov's OpenSearch-powered autosuggest feature?

mjg@moby:~$ curl http://id.loc.gov/authorities/suggest/?q=Biology
["Biology",["Biology","Biology Colloquium","Biology Curators'
Group","Biology Databook Editorial Board (U.S.)","Biology and
Earth Sciences Teaching Institute","Biology and Management of True
Fir in the Pacific Northwest Symposium (1981 : Seattle,
Wash.)","Biology and Resource Management Program (Alaska
Cooperative Park Studies Unit)","Biology and behavior
series","Biology and environment (Macmillan Press)","Biology and
management of old-growth
forests"],["1
result","1 result","1 result","1
result","1 result","1 result","1 result","1 result","1 result","1
result"],["http://id.loc.gov/authorities/subjects/sh85014203",";
http://id.loc.gov/authorities/names/n79006962",";
http://id.loc.gov/authorities/names/n90639795",";
http://id.loc.gov/authorities/names/n85100466",";
http://id.loc.gov/authorities/names/nr97041787",";
http://id.loc.gov/authorities/names/n85276541",";
http://id.loc.gov/authorities/names/n82057525",";
http://id.loc.gov/authorities/names/n90605518",";
http://id.loc.gov/authorities/names/nr2001011448",";
http://id.loc.gov/authorities/names/no94028058";]]

-Mike



On Tue, Jun 4, 2013 at 7:51 PM, Joshua Welker <jwel...@sbuniv.edu>
wrote:
I did see that, and it will work in a pinch. But the authority
file is pretty massive--almost 1GB-- and would be difficult to
handle in an automated way and without completely killing my web
app due to memory constraints while searching the file. Thanks,
though.
Josh Welker


-----Original Message-----
From: Bryan Baldus [mailto:bryan.bal...@quality-books.com]
Sent: Tuesday, June 04, 2013 6:39 PM
To: Code for Libraries; Joshua Welker
Subject: RE: LOC Subject Headings API

On Tuesday, June 04, 2013 6:31 PM, Joshua Welker
[jwel...@sbuniv.edu]
wrote:
I am building an auto-suggest feature into our library's search
box, and
I am wanting to include LOC subject headings in my suggestions list.
Does anyone know of any web service that allows for automated
harvesting of LOC Subject Headings? I am also looking for name
authorities, for that matter.
Any format will be acceptable to me: RDF, XML, JSON, HTML, CSV...
I have spent a while Googling with no luck, but this seems like
the sort of general-purpose thing that a lot of people would be
interested
in.
I feel like I must be missing something. Any help is appreciated.

Have you seen http://id.loc.gov/ with bulk downloads in various
formats at http://id.loc.gov/download/

I hope this helps,

Bryan Baldus
Senior Cataloger
Quality Books Inc.
The Best of America's Independent Presses
1-800-323-4241x402
bryan.bal...@quality-books.com
eij...@cpan.org
http://home.comcast.net/~eijabb/


--
Karen Coyle
kco...@kcoyle.net http://kcoyle.net
ph: 1-510-540-7596
m: 1-510-435-8234
skype: kcoylenet

Reply via email to