Re: [CODE4LIB] date fields

2016-07-11 Thread Trail, Nate
Don't forget that it might be duplicative of the 260 but the 008 has "machine 
readable" date info that may be less specific than the 260 but more uniformly 
entered (or that's the only place there is a date associated with 
publication/release).
Nate

==
Nate Trail
LS/ABA/NDMSO
Library of Congress
n...@loc.gov



-Original Message-
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Joy 
Nelson
Sent: Monday, July 11, 2016 3:19 PM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] date fields

Hi Eric-
Are you planning on storing the 'normalized' dates for ever in the MARC?
i.e. leave the c1900 in the 260$c and have 1900 in another place?

I think what you do depends on your ILS and tools.  My first reaction would be 
to stash the date in an unused subfield in the 260.  If your system allows you 
to add 'non standard' subfields, you could use 260$z to stash it.

But, then I start to think that might rankle some catalogers to have 'non 
standard' date data in the 260 (or 264).  I would probably then look at using 
one of the local use tags.  901-907, 910, or 945-949.  You could be the date in 
$a and even a brief description in a second subfield.
901$a1900$bnormalized date for project XYZ -initials/date

-Joy

On Mon, Jul 11, 2016 at 12:51 PM, Eric Lease Morgan  wrote:

> I’m looking for date fields.
>
> Or more specifically, I have been given a pile o’ MARC records, and I 
> will be extracting for analysis the values of dates from MARC 260$c. 
> From the resulting set of values — which will include all sorts of 
> string values ([1900], c1900, 190?, 19—, 1900, etc.) — I plan to 
> normalize things to integers like 1900. I then want to save/store 
> these normalized values back to my local set of MARC records. I will 
> then re-read the data to create things like timelines, to answer 
> questions like “How old is old?”, or to “simply” look for trends in the data.
>
> What field would y’all suggest I use to store my normalized date content?
>
> —
> Eric Morgan
>



--
Joy Nelson
Director of Migrations

ByWater Solutions  Support and Consulting for Open 
Source Software
Office: Fort Worth, TX
Phone/Fax (888)900-8944
What is Koha? 


[CODE4LIB] LC System Maintenance (beginning 5PM Friday August 28, 2015)

2015-08-27 Thread Trail, Nate
Dear All,

[sorry for cross-postings]

Beginning Friday and continuing through the weekend, LC will perform major 
system maintenance.  All LC systems and websites will be taken offline during 
this time.  This includes ID.LOC.GOV.  Maintenance is scheduled to begin Friday 
28August at 5 PM EDT and to be completed by Monday 19 August at 30AM EDT.

We hope service to ID.LOC.GOV will be restored sooner than the closing of the 
scheduled maintenance window.  

Sorry for the inconvenience.
Nate

-
Nate Trail
Network Development & MARC Standards Office
LS/ABA/NDMSO
LA308, Mail Stop 4402
Library of Congress
Washington DC 20540


Re: [CODE4LIB] LC classifications in structured format?

2015-06-03 Thread Trail, Nate
(Nate Trail here).  Yes, we do have plans to convert all the schedules and 
their tables to linked data, but we’re more focused on other aspects of linked 
data (BIBFRAME) right now…  We might be able to get out a full download of the 
5 we have, but I’m not sure how much good that does. Would it be useful?

I’m glad for your interest.



Nate



-Original Message-
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Karl 
Grossner
Sent: Tuesday, June 02, 2015 11:35 PM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] LC classifications in structured format?



thanks for the responses - queries against 5 classes _are_ possible using the 
linked data search interface, but no bulk download is available (I asked and 
was told no by Mark Trail of LC, and that "the original MARC data is tied up in 
cost recovery statutes").



LCC is also browsable and searchable via the Classification Web service, but no 
downloads.



I'm hoping that someone has done this slog and has made it available. If I wind 
up doing it all (I began with just two letters), I *will* make it freely 
available!


Re: [CODE4LIB] id.loc.gov downloads: freshness?

2015-02-18 Thread Trail, Nate
Our metadata distribution service, CDS, has just produced an annual export of 
Names and Subjects in MARC , so I will be processing them for ID soon.
We appreciate your interest!
Thanks,

Nate
-
Nate Trail
LS/TECH/NDMSO
LA308, Mail Stop 4402
Library of Congress
Washington DC 20540



-Original Message-
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Peter 
Green
Sent: Monday, February 16, 2015 1:29 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: [CODE4LIB] id.loc.gov downloads: freshness?

Does anyone happen to know how often LC's bulk downloads are generated? 
The date currently displayed on the downloads page[1] for each file is
'27 Oct 2014', but it looks like the names[2] and subjects[3] SKOS nt files, at 
least, haven't actually been touched since March 2014.

Thanks,
Peter

1. http://id.loc.gov/download/
2. http://id.loc.gov/static/data/authoritiesnames.nt.skos.gz
3. http://id.loc.gov/static/data/authoritiessubjects.nt.skos.zip


Re: [CODE4LIB] Reconciling corporate names?

2014-09-29 Thread Trail, Nate
The ID.loc.gov site has a good known label service described here under "known 
label retrieval" :
http://id.loc.gov/techcenter/searching.html

Use  Curl and content negotiation to avoid screen scraping, for example, for LC 
Name authorities:

curl -L -H "Accept: application/rdf+xml" 
"http://id.loc.gov/authorities/names/label/Library%20of%20Congress";

Nate

==
Nate Trail
LS/TECH/NDMSO
Library of Congress
n...@loc.gov


-Original Message-
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Simon 
Brown
Sent: Monday, September 29, 2014 9:38 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] Reconciling corporate names?

You could always web scrape, or download and then search the LCNAF with some 
script that looks like:

#Build query for webscraping
query = paste("http://id.loc.gov/search/?q=";, URLencode("corporate name here 
"), "&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2Fnames")

#Make the call
result = readLines(query)

#Find the lines containing "Corporate Name"
lines = grep("Corporate Name, result)

#Alternatively use approximate string matching on the downloaded LCNAF data 
query <- agrep("corporate name here",LCNAF_data_here)

#Parse for whatever info you want
...

My native programming language is R so I hope the functions like paste, 
readLines, grep, and URLencode are generic enough for other languages to have 
some kind of similar thing.  This can just be wrapped up into a for
loop:
for(i in 1:4){...}

Web scraping the results of one name at a time would be SLOW and obviously 
using an API is the way to go but it didn't look like the OCLC LCNAF API 
handled Corporate Name.  However, it sounds like in the previous message 
someone found a work around.  Best of luck! -Simon






On Mon, Sep 29, 2014 at 8:45 AM, Matt Carruthers  wrote:

> Hi Patrick,
>
> Over the last few weeks I've been doing something very similar.  I was 
> able to figure out a process that works using OpenRefine.  It works by 
> searching the VIAF API first, limiting results to anything that is a 
> corporate name and has an LC source authority.  OpenRefine then 
> extracts the LCCN and puts that through the LCNAF API that OCLC has to 
> get the name.  I had to use VIAF for the initial name search because 
> for some reason the LCNAF API doesn't really handle corporate names as 
> search terms very well, but works with the LCCN just fine (there is 
> the possibility that I'm just doing something wrong, and if that's the 
> case, anyone on the list can feel free to correct me).  In the end, 
> you get the LC name authority that corresponds to your search term and 
> a link to the authority on the LC Authorities website.
>
> Anyway,  The process is fairly simple to run (just prepare an Excel 
> spreadsheet and paste JSON commands into OpenRefine).  The only 
> reservation is that I don't think it will run all 40,000 of your names 
> at once.  I've been using it to run 300-400 names at a time.  That 
> said, I'd be happy to share what I did with you if you'd like to try 
> it out.  I have some instructions written up in a Word doc, and the 
> JSON script is in a text file, so just email me off list and I can send them 
> to you.
>
> Matt
>
> Matt Carruthers
> Metadata Projects Librarian
> University of Michigan
> 734-615-5047
> mcarr...@umich.edu
>
> On Fri, Sep 26, 2014 at 7:03 PM, Karen Hanson 
> 
> wrote:
>
> > I found the WorldCat Identities API useful for an institution name 
> > disambiguation project that I worked on a few years ago, though my 
> > goal wasn't to confirm whether names mapped to LCNAF.  The API 
> > response
> includes
> > a LCCN, and you can set it to fuzzy or exact matching, but you would 
> > need to write a script to pass each term in and process the results:
> >
> >
> http://oclc.org/developer/develop/web-services/worldcat-identities.en.
> html
> >
> > I also can't speak to whether all LC Name Authorities are 
> > represented, so there may be a chance of some false negatives.
> >
> > OCLC has another API, but not sure if it covers corporate names:
> > https://platform.worldcat.org/api-explorer/LCNAF
> >
> > I suspect there are others on the list that know more about the 
> > inner workings of these APIs if this might be an option for you... 
> > :)
> >
> > Karen
> >
> > -Original Message-
> > From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf 
> > Of Ethan Gruber
> > Sent: Friday, September 26, 2014 3:54 PM
> > To: CODE4LIB@LISTSERV.ND.EDU
> > Subject: Re: [CODE4LIB] Reconciling corporate names?
> >
> > I would check with the developers of SNAC ( 
> > http://socialarchive.iath.virginia.edu/), as they've spent a lot of 
> > time developing named entity recognition scripts for personal and 
> > corporate names. They might have something you can reuse.
> >
> > Ethan
> >
> > On Fri, Sep 26, 2014 at 3:47 PM, Galligan, Patrick <
> pgalli...@rockarch.org
> > >
> > wrote:
> >
> > > I'm looking to reconcile about 40,000

Re: [CODE4LIB] mapping LCSH from book records to shNNNN codes?

2013-11-12 Thread Trail, Nate
Dan,

You can look up an LCSH term for it's URI using:
http://id.loc.gov/authorities/subjects/label/[known lcsh term]

You are right that not all precoordinated strings are in LCSH, but you can try 
each one separately:

http://id.loc.gov/authorities/subjects/label/Social%20sciences
http://id.loc.gov/authorities/subjects/label/Statistical%20methods
http://id.loc.gov/authorities/subjects/label/Data%20processing

Don't forget url encoding. With content negotiation you can get other formats 
than the html (see the bottom of the page), or if you just want the uri, ask 
for headers only.

Nate

---
Nate Trail
---
LS/TECH/NDMSO
Library of Congress
202-707-2193
n...@loc.gov




-Original Message-
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Dan
Sent: Monday, November 11, 2013 2:34 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: [CODE4LIB] mapping LCSH from book records to sh codes?

Hi, I'm interested in mapping the LCSH topics described in Library of Congress 
book records to the "predefined headings" LCSH thesaurus defined at 
http://id.loc.gov.

For example, the MODS version of the LoC record for isbn 1606238760 contains 
this LCSH info:

  
Social sciences
Statistical methods
Data processing
  

... which maps neatly to "sh2010113695" (Social sciences--Statistical 
methods--Data processing) (see
http://id.loc.gov/search/?q=Social+sciences--Statistical+methods--Data+processing&q=)

However, not all topics map to a single sh code (multiple sh's with the 
same description), and some topics have no sh code at id.loc.gov (e.g. 
"Discourse analysis--Research", even though "Discourse analysis" exists)

Is there a way to retrieve the sh codes directly for a book record? I'm 
currently using the LoC SRU (search/retrieval via URL) service, but it only 
serves verbose, "textual" s that must be mapped separately to a sh 
code (when possible)

Thanks,
Dan


Re: [CODE4LIB] PBCore 2.0 to MARC XML?

2012-11-06 Thread Trail, Nate
That would really dumb down the metadata. DC is very limited.

Nate
---
Nate Trail
---
Network Development and MARC  Standards Office
Technology Policy Mail stop 4402
Library Services 
Library of Congress 
202-707-2193
n...@loc.gov



-Original Message-
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of john 
passmore
Sent: Tuesday, November 06, 2012 10:28 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: Re: [CODE4LIB] PBCore 2.0 to MARC XML?

Ah, that makes sense. I could try  PBCore>Dublin Core>MARC 21.


On Tue, Nov 6, 2012 at 9:01 AM, Tom Keays  wrote:

> PBCore lists a bunch of crosswalk mapping schemes that they've identified.
>
> http://www.pbcore.org/PBCore/PBCore_Mappings.html
>
> Some of them are listed but aren't done yet, including a direct 
> mapping to MARC 21. However, a mapping of PBCore to Dublin Core 
> exists, so you could probably get there by using DC as an intermediate.
>
> http://www.pbcore.org/PBCore/mappings/PBCore-DublinCore_Mapping.html
>
> They also identify the Metadata Advisory Group of the MIT Libraries as 
> a source of mapping information, so you could possibly consult them 
> for help in this project.
>
> http://libraries.mit.edu/guides/subjects/metadata/mappings.html
>
>
> On Mon, Nov 5, 2012 at 2:15 PM, john passmore 
> wrote:
>
> > Hi,
> > Before I start reinventing the wheel, does anyone know of any 
> > stylesheets out there that convert PBCore 2.0 XML 
> >  to MARC XML?
> >
> > Thanks!
> > John
> > WNYC Archives
> >
>


Re: [CODE4LIB] XQuery, XSL, Cocoon question

2011-11-18 Thread Trail, Nate
Marklogic Server supports both xquery and xslt, and they've written an 
extension that allows you to call xquery functions from within xsl stylesheets.

It works quite nicely.
Nate

---
Nate Trail
---
Network Development and MARC  Standards Office
Technology Policy Mail stop 4402
Library Services 
Library of Congress 
202-707-2193
n...@loc.gov


-Original Message-
From: Code for Libraries [mailto:CODE4LIB@LISTSERV.ND.EDU] On Behalf Of Bohyun 
Kim
Sent: Friday, November 18, 2011 9:51 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: [CODE4LIB] XQuery, XSL, Cocoon question

Hi all,

I googled and asked around but couldn't find a satisfactory answer. So hence 
the question.

Does anyone know if it is possible to use XQuery inside an xsl document?  Does 
anyone also know if it is possible to run XQuery files inside a Cocoon sitemap? 
 If you use XQuery, how do you usually use it to get the most mileage out of it?

Thanks!
~Bohyun