notas:puntuacion-bnm
puntua.pft
Colocación automática de puntuación en registros MARC de la Biblioteca Nacional de Maestros.
/* ========================================================================
* Colocaci¢n autom tica de puntuaci¢n en registros MARC de la BNM
*
* Uso: mx marc proc=@puntua.pft
*
* Genera como salida un registro con la puntuaci¢n est ndar incorporada
* a los subcampos
*
* Documento auxiliar consultado: Punctuation Cheat Sheet
*
* Fernando G¢mez, enero de 2002
* ========================================================================
*/
'd*',
'a001%',v001,'%',
'a005%',v005,'%',
'a008%',v008,'%',
/* ============ campo 020 ============ */
if p(v020) then
,(,
'a020%',
if right(v020,1)='.' then left(v020,size(v020)-1) else v020, fi,
'%',
,),
fi,
'a040%',v040,'%',
/* ============ campo 080 ============ */
if p(v080) then
,(,
'a080%',v80,'%',
,),
fi,
/* ============ campo 100 ============ */
if p(v100) then
'a100%',
replace(
replace(
replace(v100,'^c',',^c'),
'^d',',^d'),
'^e',',^e'),
if NOT '.)-?!':right(v100,1) then '.' fi,
'%',
fi,
/* ============ campo 110 ============ */
if p(v110) then
'a110%',
replace(
replace(v110,'^b','.^b'),
'^e',',^e'),
if NOT '.)-?!':right(v110,1) then '.' fi,
'%',
fi,
/* ============ campo 111 ============ */
if p(v111) then
'a111% ',
'^a',v111^a,
"^n("v111^n,
if p(v111^d) then
if p(v111^n) then ' :^d' else '^d(' fi,
v111^d,
fi,
if p(v111^c) then
if p(v111^n) OR p(v111^d) then ' :^c' else '^c(' fi,
v111^c,
fi,
if s(v111^n,v111^d,v111^c)>'' then ')',
else if right(v111,1)<>'.' then '.' fi,
fi,
'%',
fi,
/* ============ campo 130 ============ */
if p(v130) then
'a130%',
replace(replace(v130,'^n','.^n'),'^p','.^p'), /* ??? */
'%',
fi,
/* ============ campo 240 ============ */
if p(v240) then
'a240%',
replace(v240,'^n','.^n'), /* ??? */
'%',
fi,
/* ============ campo 245 ============ */
if p(v245) then
'a245%',
replace(
replace(
replace(v245,'^n','.^n'),
'^c',' /^c'),
'^b',s(if NOT v245:' =^b' AND NOT v245:' ;^b' then ' :^b' else '^b' fi)),
/*
v245^*,
"^a",v245^a,
".^n",v245^n,
if p(v245^b) then
if NOT v245:' =^b' AND NOT v245:' ;^b' then ' :^b' else '^b' fi,
v245^b,
fi,
" /^c",v245^c,
*/
if right(v245,1)<>'.' then '.' fi,
'%',
fi,
/* ============ campo 250 ============ */
if p(v250) then
'a250%',v250,'%',
fi,
/* ============ campo 260 ============ */
if p(v260) then
'a260% ', if p(v260^a) then '^' fi,
replace(
replace(
replace(
replace(
replace(
replace(s(if p(v260^a) then v260*3 else v260*2 fi),'^a',' ;^a'),
'^b',' :^b'),
'^c',',^c'),
'^e','^e('),
'^f',s(if p(v260^e) then ' :^f' else '^f(' fi)),
'^g',s(if p(v260^e) OR p(v260^f) then ',^g' else '^g(' fi)),
if s(v260^e,v260^f,v260^g)>'' then ')', fi,
/*
'^a',v260^a,
if p(v260^a) and p(v260^b) then ' :' fi,
if p(v260^b) then '^b',v260^b, fi,
if p(v260^c) then ',^c',v260^c, fi,
*/
if not '.?!-)],':right(v260,1) AND s(v260^e,v260^f,v260^g)='' then '.' fi,
'%',
fi,
/* ============ campo 300 ============ */
if p(v300) then
'a300%',
replace(
replace(v300,'^b',' :^b'),
'^e',' +^e'),
if NOT '.?!-)':right(v300,1) then '.' fi,
'%',
fi,
/* ============ campo 440 ============ */
if p(v440) then
,(,
'a440%',
replace(
replace(v440,'^p','.^p'),
'^v',' ;^v'),
'%',
,),
fi,
/* ============ campo 500 ============ */
if p(v500) then
,(,
'a500%',
v500, if right(v500,1)<>'.' then '.' fi,
'%',
,),
fi,
/* ============ campo 504 ============ */
if p(v504) then
,(,
'a504%',
v504, if NOT '.?!-':right(v504,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 505 ============ */ /* REVISAR */
if p(v505) then
,(,
'a505%',
' ^',
replace(replace(v505*3,'^t',' --^t'),'^r',' /^r'),
if NOT '.?!->':right(v505,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 506 ============ */
if p(v506) then
,(,
'a506%',
v506, if NOT '.?!-':right(v506,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 520 ============ */
if p(v520) then
,(,
'a520%',
v520, if NOT '.?!-':right(v520,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 521 ============ */
if p(v521) then
,(,
'a521%',
v521, if NOT '.?!-':right(v521,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 530 ============ */
if p(v530) then
,(,
'a530%',
v530,
if NOT '.)-?!':right(v530,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 536 ============ */
if p(v536) then
,(,
'a536%',
v536,
'%',
,),
fi,
/* ============ campo 585 ============ */
if p(v585) then
,(,
'a585%',v585,'%',
,),
fi,
/* ============ campo 590 ============ */
if p(v590) then
,(,
'a590%',v590,'%',
,),
fi,
/* ============ campo 591 ============ */
if p(v591) then
,(,
'a591%',v591,'%',
,),
fi,
/* ============ campo 600 ============ */
if p(v600) then
,(,
'a600%',
v600,
if NOT '.)-?!':right(v600,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 610 ============ */
if p(v610) then
,(,
'a610%',
v610,
if NOT '.)-?!':right(v610,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 611 ============ */
/* ============ campo 650 ============ */
if p(v650) then
,(,
'a650%'
v650,
if NOT '.)-?!':right(v650,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 659 ============ */
if p(v659) then
,(,
'a659%',v659,'%',
,),
fi,
/* ============ campo 700 ============ */
if p(v700) then
,(,
'a700%',
replace(
replace(
replace(v700,'^c',',^c'),
'^d',',^d'),
'^e',',^e'),
if NOT '.)-?!':right(v700,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 710 ============ */
if p(v710) then
,(,
'a710%',
replace(
replace(v710,'^b','.^b'),
'^e',',^e'),
if NOT '.)-?!':right(v710,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 711 ============ */
if p(v711) then
(,
'a711% ',
'^a',v711^a,
"^n("v711^n,
if p(v711^d) then
if p(v711^n) then ' :^d' else '^d(' fi,
v711^d,
fi,
if p(v711^c) then
if p(v711^n) OR p(v711^d) then ' :^c' else '^c(' fi,
v711^c,
fi,
if s(v711^n,v711^d,v711^c)>'' then ')',
else if right(v711,1)<>'.' then '.' fi,
fi,
'%',
,),
fi,
/* ============ campo 773 ============ */
/* ============ campo 800 ============ */
if p(v800) then
,(,
'a800%',
replace(
replace(
replace(v800,'^c',',^c'),
'^d',',^d'),
'^e',',^e'),
if NOT '.)-?!':right(v800,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 810 ============ */
if p(v810) then
,(,
'a810%',
replace(
replace(v810,'^b','.^b'),
'^e',',^e'),
if NOT '.)-?!':right(v810,1) then '.' fi,
'%',
,),
fi,
/* ============ campo 856 ============ */
if p(v856) then
,(,
'a856%',v856,'%',
,),
fi,
/* ============ campo 859 ============ */
if p(v859) then
,(,
'a859%',v859,'%',
,),
fi,
if p(v901) then 'a901%',v901,'%', fi,
'a999%',v999,'%',
/* ===================== FIN ==================== */
miscelanea
notas/puntuacion-bnm.txt · Última modificación: por 127.0.0.1
