Hi Amy,
You can certainly write a regular expression that will take the taxonomy and break it apart at the triple dashes. If there are always 3 items, then its pretty easy to capture the data and then massage it into the shape that you want:
find: (.*)---(.*)---(.*)
replace: 650 #7$a $1 $x $2 $x $3 $$2
that's roughly the idea, but I am not sure if find/replace is what you want or if you should be using add fields...I guess that depends on where the taxonomy is coming from? Is it already in a Marc field in the file with your records?
Note that in the replacement string above the $a will come out looking just like that, but the $1 is actually a reference to the text that was discovered inside the first set of parentheses in the find string. In the example you gave you had your finished string end with $2.My replacement string ends with $$2 which is kind of wierd, but the two dollar signs basically condense down to 1, with no special meaning, and the 2 comes through unmolested.
I just pasted these into the find/replace utility in MarcEdit and ran it on your examples, and got results that look pretty close. Make sure to check the box in this control called "Use Regular Expressions" or it won't work at all. Also, if you sometimes have more or less than 3 categories, or they are seperated by a variable number of dashes, the find and replace string may need adjustment.
Hope this helps!
Andy Helck
Wilkinson Public Library
Telluride CO 81435
________________________________________
From: MarcEdit support in technical and instructional matters [[log in to unmask]] On Behalf Of Amy Nadell [[log in to unmask]]
Sent: Monday, October 11, 2010 11:18 AM
To: [log in to unmask]
Subject: [MARCEDIT-L] Anyone worked with faceted subjects in 650?
Does anyone have any examples of translating a hierarchal taxonomy into
a MARC record preferably a 650 field?
For example:
Facet---Constraint level 1---Constraint level 2
Biology---Animal biology---Animal diversity and evolution
Could be?:
650 #7$a Biology $x Animal biology $x Animal diversity and evolution. $2
Fortis College
Any other suggestions, or online catalogs I could look at?
Thanks,
Amy Laurel
Fortis College, Phoenix
LRC Manager
________________________________________________________________________
This message comes to you via MARCEDIT-L, a Listserv(R) list for technical and instructional support in MarcEdit. If you wish to communicate directly with the list owners, write to [log in to unmask] To unsubscribe, send a message "SIGNOFF MARCEDIT-L" to [log in to unmask]
________________________________________________________________________
This message comes to you via MARCEDIT-L, a Listserv(R) list for technical and instructional support in MarcEdit. If you wish to communicate directly with the list owners, write to [log in to unmask] To unsubscribe, send a message "SIGNOFF MARCEDIT-L" to [log in to unmask]
|