[OPEN-ILS-GENERAL] Linking bibliographic records to non-LoC authorities using a support script

Václav Jansa vaclav.jansa at gmail.com
Sun Jul 16 11:09:50 EDT 2017


Hi Mike,
thanks for you rapid reply, and sorry for my slow reaction.
In past days I try some testing with minimal number of parameters (and 
some debug prints in script):
I tested, for simplicity, only on one bib record (TCN=5000), with known 
possible link in tag 100$7, to imported authority record

http://eg-test.osvobozena-knihovna.cz/eg/opac/record/5000?contains=contains;_special=1;detail_record_view=0;qtype=identifier%7Ctcn;query=5000;locg=1;expand=marchtml#marchtml

   id  | creator | editor | source | quality |      create_date       |          edit_date           | active | deleted |                             fingerprint                              | tcn_source | tcn_value |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                marc                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |          last_xact_id           | owner | share_depth
------+---------+--------+--------+---------+------------------------+------------------------------+--------+---------+----------------------------------------------------------------------+------------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------+-------------
  5000 |       1 |   1097 |        |      28 | 2011-08-21 19:56:38+02 | 2016-04-15 08:54:58.01372+02 | t      | f       | Title:jezispromodernihocloveka Author:machovec PartName: PartNumber: | Unknown    | 5000      | <record    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"    xmlns="http://www.loc.gov/MARC21/slim"><leader>01287nam a2200313 a 4500</leader><controlfield tag="001">5000</controlfield><controlfield tag="003">CZ-PrJAB</controlfield><controlfield tag="005">20160415065457.0</controlfield><controlfield tag="007">ta</controlfield><controlfield tag="008">910530s1990    xr            000   cze  </controlfield><datafield tag="015" ind1=" " ind2=" "><subfield code="a">cnb000063109</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">80-235-0086-4</subfield><subfield code="q">(v knize neuvedeno ;</subfield><subfield code="q">bro&#x17E;.)</subfield><subfield code="z">80-235-0015-5</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(CZ PrNK)ck9105042</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)24274765</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">ABA001</subfield><subfield code="b">cze</subfield><subfield code="d">ABA001</subfield></datafield><datafield tag="080" ind1=" " ind2=" "><subfield code="a">22</subfield><subfield code="2">undef</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Machovec, Milan,</subfield><subfield code="d">1925-2003</subfield><subfield code="7">jk01073057</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Je&#x17E;&#xED;&#x161; pro modern&#xED;ho &#x10D;lov&#x11B;ka /</subfield><subfield code="c">Milan Machovec</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">V Orbisu vyd. 1.</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">Praha :</subfield><subfield code="b">Orbis,</subfield><subfield code="c">1990</subfield><subfield code="f">(Tiska&#x159;sk&#xE9; z&#xE1;vody)</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">230 s. ;</subfield><subfield code="c">21 cm +</subfield><subfield code="e">errata (1 l.)</subfield></datafield><datafield tag="504" ind1=" " ind2=" "><subfield code="a">Obsahuje biblick&#xE9; odkazy</subfield></datafield><datafield tag="600" ind1="0" ind2="7"><subfield code="a">Je&#x17E;&#xED;&#x161; Kristus</subfield><subfield code="7">ola2002103454</subfield><subfield code="2">czenas</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="a">cit&#xE1;ty</subfield><subfield code="7">fd131832</subfield><subfield code="2">czenas</subfield></datafield><datafield tag="856" ind1="4" ind2="1"><subfield code="u">http://kramerius4.nkp.cz/search/handle/uuid:a9365b30-7b53-11e2-b930-005056827e51</subfield><subfield code="y">Digitalizovan&#xFD; dokument</subfield></datafield><datafield tag="910" ind1=" " ind2=" "><subfield code="a">ABG312</subfield></datafield><datafield tag="964" ind1=" " ind2=" "><subfield code="a">Je&#x17E;&#xED;&#x161; Kristus - osobnost - v&#xFD;znam</subfield></datafield><datafield tag="964" ind1=" " ind2=" "><subfield code="a">Je&#x17E;&#xED;&#x161; Kristus - &#x17E;ivot a u&#x10D;en&#xED; - bible - cit&#xE1;ty a &#xFA;vahy</subfield></datafield><datafield tag="901" ind1=" " ind2=" "><subfield code="a">5000</subfield><subfield code="b">Unknown</subfield><subfield code="c">5000</subfield><subfield code="t">biblio</subfield></datafield></record> | 1460703298.008727590.5316837683 |       |
(1 row)



authority record is imported under ID 9657 (snap from DB):

   id  | creator | editor |          create_date          |           edit_date           | active | deleted | source |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 marc                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |      last_xact_id       | owner | control_set |               heading                |          simple_heading
------+---------+--------+-------------------------------+-------------------------------+--------+---------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+-------+-------------+--------------------------------------+----------------------------------
  9657 |       1 |      1 | 2015-11-14 23:15:48.804847+01 | 2015-11-14 23:15:48.804847+01 | t      | f       |        | <record    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"    xmlns="http://www.loc.gov/MARC21/slim"><leader>     cz  a22     n  4500</leader><controlfield tag="001">9657</controlfield><controlfield tag="003">CZ-PrJAB</controlfield><controlfield tag="005">20040401115636.0</controlfield><controlfield tag="008">000622|n|acNnnnaabn           n a|a     </controlfield><datafield tag="016" ind1="7" ind2=" "><subfield code="a">jk01073057</subfield><subfield code="2">CZ-PrNK</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(CZ PrNK)jk01073057</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">Jaroslav Kunc</subfield><subfield code="b">cze</subfield><subfield code="c">ABA001</subfield><subfield code="d">ABA001</subfield></datafield><datafield tag="046" ind1=" " ind2=" "><subfield code="f">1925</subfield><subfield code="g">2003</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Machovec, Milan,</subfield><subfield code="d">1925-2003</subfield><subfield code="7">jk01073057</subfield></datafield><datafield tag="370" ind1=" " ind2=" "><subfield code="c">&#x10C;esko</subfield></datafield><datafield tag="667" ind1=" " ind2=" "><subfield code="a">Z&#xE1;znam nepro&#x161;el reviz&#xED; podle pravidel RDA.</subfield></datafield><datafield tag="670" ind1=" " ind2=" "><subfield code="a">PNP-LA</subfield></datafield><datafield tag="670" ind1=" " ind2=" "><subfield code="a">&#x10C;TK 16.1.2003</subfield><subfield code="b">datum &#xFA;mrt&#xED;</subfield></datafield><datafield tag="678" ind1="0" ind2=" "><subfield code="a">Narozen 23.8.1925 v Praze, zem&#x159;el 15.1.2003 v Praze. PhDr., CSc., profesor filosofie. Pr&#xE1;ce v oboru filosofie a logiky.</subfield></datafield><datafield tag="901" ind1=" " ind2=" "><subfield code="c">9657</subfield><subfield code="t">authority</subfield></datafield></record> | IMPORT-1447538996.33033 |       |         101 | 100_-_N a machovec milan d 1925 2003 | 100 a machovec milan d 1925 2003
(1 row)

script is limited only for 100$7 match

my %controllees = (
     100 => { 7 => { 100 => '7' },
     },
);

But with enabled debugging (remove # before some debug prints) i see 
only data to check from biblio and no data from authority
(in osrf logs is visible connection for searching in biblio and 
authority too (but only with data array hash)

opensrf at eg-2-12-test:/openils/bin$ authority_control_fields_100_7.pl -s 5000 -e 5000
$VAR1 = undef;
$VAR2 = [
           5000
         ];
5000
$VAR1 = bless( [
                  undef,
                  undef,
                  't',
                  '2011-08-21T19:56:38+0200',
                  1,
                  'f',
                  '2016-04-15T08:54:58+0200',
                  1097,
                  'Title:jezispromodernihocloveka Author:machovec PartName: PartNumber:',
                  5000,
                  '1460703298.008727590.5316837683',
                  '<record    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"    xmlns="http://www.loc.gov/MARC21/slim"><leader>01287nam a2200313 a 4500</leader><controlfield tag="001">5000</controlfield><controlfield tag="003">CZ-PrJAB</controlfield><controlfield tag="005">20160415065457.0</controlfield><controlfield tag="007">ta</controlfield><controlfield tag="008">910530s1990    xr            000   cze  </controlfield><datafield tag="015" ind1=" " ind2=" "><subfield code="a">cnb000063109</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">80-235-0086-4</subfield><subfield code="q">(v knize neuvedeno ;</subfield><subfield code="q">bro&#x17E;.)</subfield><subfield code="z">80-235-0015-5</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(CZ PrNK)ck9105042</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)24274765</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">ABA001</subfield><subfield code="b">cze</subfield><subfield code="d">ABA001</subfield></datafield><datafield tag="080" ind1=" " ind2=" "><subfield code="a">22</subfield><subfield code="2">undef</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Machovec, Milan,</subfield><subfield code="d">1925-2003</subfield><subfield code="7">jk01073057</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Je&#x17E;&#xED;&#x161; pro modern&#xED;ho &#x10D;lov&#x11B;ka /</subfield><subfield code="c">Milan Machovec</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">V Orbisu vyd. 1.</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">Praha :</subfield><subfield code="b">Orbis,</subfield><subfield code="c">1990</subfield><subfield code="f">(Tiska&#x159;sk&#xE9; z&#xE1;vody)</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">230 s. ;</subfield><subfield code="c">21 cm +</subfield><subfield code="e">errata (1 l.)</subfield></datafield><datafield tag="504" ind1=" " ind2=" "><subfield code="a">Obsahuje biblick&#xE9; odkazy</subfield></datafield><datafield tag="600" ind1="0" ind2="7"><subfield code="a">Je&#x17E;&#xED;&#x161; Kristus</subfield><subfield code="7">ola2002103454</subfield><subfield code="2">czenas</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="a">cit&#xE1;ty</subfield><subfield code="7">fd131832</subfield><subfield code="2">czenas</subfield></datafield><datafield tag="856" ind1="4" ind2="1"><subfield code="u">http://kramerius4.nkp.cz/search/handle/uuid:a9365b30-7b53-11e2-b930-005056827e51</subfield><subfield code="y">Digitalizovan&#xFD; dokument</subfield></datafield><datafield tag="910" ind1=" " ind2=" "><subfield code="a">ABG312</subfield></datafield><datafield tag="964" ind1=" " ind2=" "><subfield code="a">Je&#x17E;&#xED;&#x161; Kristus - osobnost - v&#xFD;znam</subfield></datafield><datafield tag="964" ind1=" " ind2=" "><subfield code="a">Je&#x17E;&#xED;&#x161; Kristus - &#x17E;ivot a u&#x10D;en&#xED; - bible - cit&#xE1;ty a &#xFA;vahy</subfield></datafield><datafield tag="901" ind1=" " ind2=" "><subfield code="a">5000</subfield><subfield code="b">Unknown</subfield><subfield code="c">5000</subfield><subfield code="t">biblio</subfield></datafield></record>',
                  28,
                  undef,
                  'Unknown',
                  '5000',
                  undef,
                  undef
                ], 'Fieldmapper::biblio::record_entry' );
$VAR1 = {
           '7' => '100'
         };
Controlling tag: 100 and match tag 100
$VAR1 = [
           '100'
         ];
$VAR2 = [
           {
             'term' => 'jk01073057',
             'subfield' => '7'
           }
         ];
$VAR1 = [];


I am not able to find, what is wrong... can you please add some hints?

Thanks and best regards

Vaclav






On 13.7.2017 16:43, Mike Rylander wrote:
> Hi Vaclav,
>
> The script has an internalized summary of the LoC control set, and
> doesn't load it from the server.  With development, it should be
> possible to teach authority_control_fields.pl how to load the control
> set definition from the database.  That's still on my wish list,
> though.  As with most new features, it's a matter of time and
> priority...
>
> Thanks,
>
> --
> Mike Rylander
>   | President
>   | Equinox Open Library Initiative
>   | phone:  1-877-OPEN-ILS (673-6457)
>   | email:  miker at equinoxinitiative.org
>   | web:  http://equinoxinitiative.org
>
>
> On Thu, Jul 13, 2017 at 6:17 AM, Vaclav Jansa <vaclav.jansa at gmail.com> wrote:
>> Hi,
>>
>> We are trying to automatically link bibliographic records to authority
>> records using the authority_control_fields.pl support script
>> (http://docs.evergreen-ils.org/2.12/_support_scripts.html). We are currently
>> on 2.12.
>>
>> It seems that the script is only aware of the default LoC Control Set as
>> mentioned in Mike's 2014 presentation
>> (http://evergreen-ils.org/wp-content/uploads/2014/04/eg14_Authorities-presentation-EGCON-2014.pdf,slide
>> 19).
>>
>> Is there a way to add custom control sets to the authority_control_fields.pl
>> script? So far we haven't been able to identify the right part of the script
>> which would indicate that only LoC Control Set is taken into account...
>>
>> Thank you in advance for any hints!
>>
>> Vaclav




More information about the Open-ils-general mailing list