reeset

Feb 062016
 

Would this be the super bowl edition? Super-duper update? I don’t know – but I am planning an update. Here’s what I’m hoping to accomplish for this update (2/7/2016):

MarcEdit (Windows/Linux)

· Z39.50/SRU Enhancement: Enable user defined profiles and schemas within the SRU configuration. Status: Complete

· Z39.50/SRU Enhancement: Allow SRU searches to be completed as part of the batch tool. Status: ToDo

· Build Links: Updating rules file and updating components to remove the last hardcode elements. Status: Complete

· MarcValidators: Updating rules file Status: Complete

· RDA Bug Fix: 260 conversion – rare occasions when {} are present, you may lose a character Status: Complete

· RDA Enhancement: 260 conversion – cleaned up the code Status: Complete

· Jump List Enhancement: Selections in the jump list remain highlighted Status: Complete

· Script Wizard Bug Fix: Corrected error in the generator that was adding an extra “=” when using the conditional arguments. Status: Complete

MarcEdit Linux

· MarcEdit expects the /home/[username] to be present…when it’s not, the application data is being lost causing problems with the program. Updating this so allow the program to drop back to the application directory/shadow directory. Status: Testing

MarcEdit OSX

· RDA Fix [crash error when encountering invalid data] Status: Testing

· Z39.50 Bug: Raw Queries failing Status: Complete

· Command-line MarcEdit: Porting the Command line version of marcedit (cmarcedit). Status: Testing

· Installer – Installer needs to be changed to allow individual installation of the GUI MarcEdit and the Command-line version of MarcEdit. These two version share the same configuration data Status: ToDo

–tr

 Posted by at 5:09 am
Jan 252016
 

I’ve posted an update for all versions – changed noted here:

The significant change was a shift in how the linked data processing works.  I’ve shifted from hard code to a rules file.  You can read about that here: http://blog.reeset.net/archives/1887

If you need to download the file, you can get it from the automated update tool or from: http://marcedit.reeset.net/downloads.

–tr

 Posted by at 10:04 pm
Jan 252016
 

One of the changes in the current MarcEdit update is the introduction of a linked data rules file to help the program understand what data elements should be processed for automatic URL generation, and how that data should be treated.  The Rules file is found in the Configs directory and is called: linked_data_profile.xml

 

image

image

The rules file is pretty straightforward.  At this point, I haven’t created a schema for it, but I will to make defining data easier.  Until then, I’ve added references in the header of the document to note fields and values. 

Here’s a small snippet of the file:

<?xml version=”1.0″ encoding=”UTF-8″?>
<marcedit_linked_data_profile>
  <!–
    rules block:
        top level: field
            Attributes:
                type: authority, bibliographic, authority|bibliographic
            tag (required):
                Value: Field value
                Description: field to process
            subfield (required):
                Value: Subfield codes
                Description: subfields to use for matching
            index (optional):
                Values: subfield code or empty
                Description: field that denotes index
            atomize(optional):
                Values: 1 or empty
                Description: determines if field should be broken up for uri disambiguation
            special_instructions (optional):
                Values: name|subject|mixed
                Description: special instructions to improve normalization for names and subjects. 
            uri (required):
                Values: subfield code to include a url
                Description: Used to determine which subfield is used to embed a URI
            vocab (optional):
                Values (see supported vocabularies section)
                Description: when no index is supplied, you can predefine a supported index
               
               
  Supported Vocabularies:
    Value: lcshac
    Description: LC Childrens Subjects
   
    Value: lcdgt
    Description: LC Demographic Terms
   
    Value: lcsh
    Description: LC Subjects
   
    Value: lctmg
    Description: TGM
   
    Value: aat
    Description: Getty Arts and Architecture Thesaurus
   
    Value: ulan
    Description: Getty ULAN
   
    Value: lcgft
    Description: LC Genre Forms
  
   Value: lcmpt
   Descirption: LC Medium Performance Thesaurus
  
   Value: naf
   Description: LC NACO Terms
  
   Value: naf_lcsh
   Description: lcsh/naf combined indexes.
  
   Value: mesh
   Description: MESH indexes
    –>
  <rules>
    <field type=”bibliographic”>
      <tag>100</tag>
      <subfields>abcdqnp</subfields>
      <uri>0</uri>
      <special_instructions>name</special_instructions>
    </field>
    <field type=”bibliographic”>
      <tag>110</tag>
      <subfields>abcdqnp</subfields>
      <uri>0</uri>
      <special_instructions>name</special_instructions>
    </field>
</rules>
</marcedit_linked_data_profile>

The rules file is pretty straightforward.  You have a field where you define a type.  Acceptable values are: authority, bibliographic, authority|bibliographic.  This tells the tool which type of record the process rules apply to.  Second you define a tag, subfields to process when evaluating for linking, a uri field (this is the subfield used when outputting the URI, special instructions (if there are any), where the field is atomized (i.e., broken up so that you have one concept per URI), and vocab (to preset a default vocabulary for processing).  So for example, say a user wanted to atomize a field that currently isn’t defined as such – they would just find the processing block for the field and add: <atomize>1</atomized> into the block – and that’s it.

The idea behind this rules file is to support the work of a PCC Task Force while they are testing embedding of URIs in MARC records.  By shifting from a compiled solution to a rules based solution, I can provide immediate feedback and it should make the process easier to customize and test. 

An important note – these rules will change.  They are pretty well defined for bibliographic data, but authority data is still being worked out. 

–tr

 Posted by at 10:01 pm
Jan 162016
 

There have been a number of workshops and presentations that I’ve seen floating around that talk about ways of using MarcEdit and OpenRefine together when doing record editing.  OpenRefine, for folks that might not be familiar, use to be known as Google Refine, and is a handy tool for working with messy data.  While there is a lot of potential overlap between the types of edits available between MarcEdit and OpenRefine, the strength of the tool is that it allows you to access your data via a tabular interface to easily find variations in metadata, relationships, and patterns.

For most folks working with MarcEdit and OpenRefine together, the biggest challenge is moving the data back and forth.  MARC binary data isn’t supported by OpenRefine, and MarcEdit’s mnemonic format isn’t well suited for import using OpenRefine’s import options as well.  And once the data has been put into OpenRefine, getting back out and turned into MARC can be difficult for first time users as well.

Because I’m a firm believe that uses should use the tool that they are most comfortable with – I’ve been talking to a few OpenRefine users trying to think about how I could make the process of moving data between the two systems easier.  And to that end, I’ll be adding to MarcEdit a toolset that will facilitate the export and import of MARC (and MarcEdit’s mnemonic) data formats into formats that OpenRefine can parse and easily generate.  I’ve implemented this functionality in two places – one as a standalone application found on the Main MarcEdit Window, and one as part of the MarcEditor – which will automatically convert or import data directly into the MarcEditor Window.

Exporting Data from MarcEdit

As noted above, there will be two methods of exporting data from MarcEdit into one of two formats for import into OpenRefine.  Presently, MarcEdit supports generating either json or tab delimited format.  These are two formats that OpenRefine can import to create a new project.

image
OpenRefine Option from the Main Window

image
OpenRefine Export/Import Tool.

If I have a MARC file and I want to export it for use in OpenRefine – I would using the following steps:

  1. Open MarcEdit
  2. Select Tools/OpenRefine/Export from the menu
  3. Enter my Source File (either a marc or mnemonic file)
  4. My Save File – MarcEdit supports export in json or tsv (tab delimited)
  5. Select Process

This will generate a file that can used for importing into OpenRefine.  A couple notes about that process.  When importing via tab delimited format – you will want to unselect options that does number interpretation.  I’d also uncheck the option to turn blanks into nulls and make sure the option is selected that retains blank rows.  These are useful on export and reimport into MarcEdit.  When using Json as the file format – you will want to make sure after import to order your columns as TAG, Indicators, Content.  I’ve found OpenRefine will mix this order, even though the json data is structured in this order.

Once you’ve made the changes to your data – Select the export option in OpenRefine and select the export tab delimited option.  This is the file format MarcEdit can turn back into either MARC or the mnemonic file format.  Please note – I’d recommend always going back to the mnemonic file format until you are comfortable with the process to ensure that the import process worked like you expected.

And that’s it.  I’ve recorded a video on YouTube walking through these steps – you can find it here:

This if course just shows how to data between the two systems.  If you want to learn more about how to work with the data once it’s in OpenRefine, I’d recommend one of the many excellent workshops that I’ve been seeing put on at conferences and via webinars by a wide range of talented metadata librarians.

*** Update****

In addition to the addition of the tool, I’ve set it up so that this tool can be selected as one of the user defined tools on the front page for quick access.  This way, if this is one of the tools you use often, you can just get right to it.

MarcEdit's Start Window Preferences with new OpenRefine Data Transfer Tool Option

MarcEdit’s Start Window Preferences with new OpenRefine Data Transfer Tool Option

Main Window with OpenRefine Data Transfer Tool

Main Window with OpenRefine Data Transfer Tool

 Posted by at 6:27 pm
Jan 102016
 

I decided to celebrate my absence from ALA’s Midwinter by doing a little coding.  Smile  I’ve uploaded updates for all versions of MarcEdit, though the Mac version has experienced the most significant revisions.  The changes:

Windows/Linux ChangeLog:

OSX ChangeLog:

You can get the update from the Downloads page (http://marcedit.reeset.net/downloads) or using the automated updating tools within MarcEdit.

Questions,

–tr

 Posted by at 8:39 pm
Jan 102016
 

In the Windows/Linux version — on of the oldest tools has been the ability to validate URLs.  This tool generates a report providing the HTTP status codes returned for URLs in a record set.  This didn’t make the initial migration  — but has been added to the current OSX version of MarcEdit.

To find the resource, you open the main window and select the menu:

MarcEdit Mac: Main Window Menu -- Verify URLs

MarcEdit Mac: Main Window Menu — Verify URLs

Once selected, if works a lot like the Windows/Linux version.  You have two report types (HTML/XML), you can define a title field, you can also set the fields to check.  By default, MarcEdit selects all.  To change this — you just need to add each new field/subfield combination in a new line.

MarcEdit Mac: Verify URLs screen

MarcEdit Mac: Verify URLs screen

Questions, let me know.

–tr

 Posted by at 8:36 pm
Jan 102016
 

One of the functions that didn’t make the initial migration cut in the MarcEditor was the ability to edit the 006/008 in a graphical interface.  I’ve added this back into the OSX version.  You can find it in the Edit Menu:

MarcEdit Mac -- Edit 006/008 Menu Location

MarcEdit Mac — Edit 006/008 Menu Location

Invoking the tool works a little differently than the windows/linux version.  Just put your cursor into the field that you want to edit, and the select Edit.  MarcEdit will then read your record data and generate an edit form based on the material format selected (or the material format from the record if editing).

MarcEdit Mac -- Edit 006/008 Screen

MarcEdit Mac — Edit 006/008 Screen

Questions — let me know.

–tr

 Posted by at 8:30 pm
Jan 092016
 

Couple of interesting questions this week got me thinking about a couple of enhancements to MarcEdit.  I’m not sure these are things that other folks will make use of often, but I can see these being really useful answering questions that come up on the listserv.

The particular question that got me thinking about this today was the following scenario:

The user has two fields – an 099 that includes data that needs to be retained, and then an 830$v that needs to be placed into the 099.  The 830$v has trailing punctuation that will need to be removed. 

Example data:
=099  \\$aELECTRONIC DATA
=830  \\$aSeries Title $v 12-031.

The final data output should be:
=099  \\$aELECTRONIC RESOURCE 12-013
=830  \\$aSeries Title $v 12-031.

With the current tools, you can do this but it would require multiple steps.  Using the current build new field tool, you could create the pattern for the data:
=099  \\$a{099$a} {830$v}

This would lead to an output of:
=099  \\$aELECTRONIC RESOURCE 12-031.

To remove the period – you could use a replace function and fix the $a at the same time.  You could have also made the ELECTRONIC RESOURCE string a constant in the build new field – but the problem is that you’d have to know that this was the only data that ever showed up in the 099$a (and it probably won’t be).

So thinking about this problem, I’ve been thinking about how I might be able to add a few processing “macros” into the pattern language – and that’s what I’ve done.  At this point, I’ve added the following commands:

  • replace(find,replace)
  • trim(chars)
  • trimend(chars)
  • trimstart(chars)
  • substring(start,length)

The way that these have been implemented – these commands are stackable – they are also very ridged in structure.  These commands are case sensitive (command labels are all lower case), and in the places where you have multiple parameters – there are no spaces between the commas. 

So how does this work – here’s some examples (not full patterns):
{099$a.trim(“.”)}
{050$b.replace(“1950”,”1980”).trim(“.”)}
{LDR.substring(6,1)}

As you can see in the patterns, the commands are initialized by adding “.command” to the end of the field pattern.  So how we would apply this to the user story above.  It’s easy:
=099  \\$a{099$a.replace(“DATA”,”RESOURCE”)} {830$v.trimend(“.”)}

And that would be it.  With this single pattern, we can run the replacement on the data in the 099$a and trim the data in the 830$v. 

Now, I realize that this syntax might not be the easiest for everyone right out of the gate, but as I said, I’m hoping this will be useful for folks interested in learning the new options, but am really excited to have this in my toolkit for answering questions posed on the listserv.

This has been implemented in all versions of MarcEdit, and will be part of this weekend’s update.

–tr

 Posted by at 9:17 pm
Jan 062016
 

I noted earlier today that I’d be making a couple MarcEdit updates.  You can see the change logs here:

Please note – if you use the Linked data tools, it is highly recommended that you update.  This update was done in part to make the interactions with LC more efficent on all sides.

You can get the download from the automated update mechanism in MarcEdit or from the downloads page: http://marcedit.reeset.net/downloads

Questions, let me know.

–tr

 Posted by at 8:30 pm