This is a multi-part message in MIME format. --------------060004070707050900070107 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sandy Rozhon wrote: >On 17 Feb 2005 at 9:03, Lorin Lund wrote: > > > >>I have a script (program) written that will extract the OBIT: data. >>This is a preliminary program. It doesn't "plop into events". Partly >>because I am unclear about what you mean by 'plop into events'. But >>this program will produce a file of the OBIT: data. >> >> > >Ok, I've had some time to cogitate on what I meant by "plop into >events" and this is what I had in mind. Nearly every obit that I >have is in a standardized format of one type or another. Here is an >example fo type #1: > >OBIT: Name: Gasior, Stanley >Date: Feb 10 1947 >Source: Cleveland Press; Cleveland Necrology File, Reel #028. >Notes: Gasior, Stanley, late residence, 1213 Denison Ave., beloved >brother of Julia Godek and Albert Gasior. Funeral services Wed., Feb. >12, from A. J. Tomon & Sons Funeral Home, 2144 W. 14 St., at 8:30 and >at 9 a. m. at St. Barbara's Church. > >This is an example of type #2 (which may appear as one line or two: > >GASIOR, RUDOLPH A : Husband of Helen (Obit.). Plain Dealer 15 Jun, >1980, pg. 15 sec. B > >or > >GASIOR, RUDOLPH A : Husband of Helen (Obit.). >Plain Dealer 15 Jun, 1980, pg. 15 sec. B > >Now what I would like is that if an OBIT tag exists, then put in a >citation as an "Individual Source". I simply use the source name >OBIT since the 99.9% all come from the same city. The text of the >longer type of obit could go into "actual text". The shorter type >would probably just go in the page field, date field, and comments >for the name. > > > >>If you are interested in pursuing this let me know. Also, to run this >>script requires some >>other files. If you have a high speed Internet connection the easiest >>way to get those >>files is to download and install the 'J' computer language from >>http://www.jsoftware.com/download/j503a.exe >> >> > >Fortunately, I have cable access...I'll take a look at the 'J' files. > Let me know if my task seems too complicated. > >Thanks, >Sandy > > Here are 3 scripts for different parts of the obit -> event project. They all want to read a GEDCOM file. This should be a file of your whole dataset. Since I didn't know the SrcRin of the source record you wanted these citations tied to I wrote this little script (note_obit_finds.ijs) to look for a Source with 'OBIT' in the title. It should prompt you to make a change to 'note_obit.ijs' to set the correct SrcRin. Note_obit.ijs will create a GEDCOM file (in the same folder as the one it read - the name will have '-obt' tacked on the end - before the '.ged') If you are familiar with GEDCOM you might want to puruse it directly or load it into a new, empty PAF file. This isn't a finished product because this script only addresses the first form. But it will give you something to analyze to see if I got it right, to see if this script catches all the records you intended it to catch .... It also produces a log file: '\change.log'. This will be 'C:\change.log' unless you install J on some other drive. The third script, 'note_obit2.ijs' is an exploration expedition to help me understand the second form better. It produces a file with '-obt2' stuck in the filename but it really isn't a gedcom file. For every individual that has a '(Obit.)' or '(Obit)' or '(Obit,)' (just in case you have some typos) in the notes it extracts the name section and the Notes section. I would have put in other possible typo variations in the search but I'm not very good at guessing what variations might arise. Some of the questions I had in mind to explore by this means are: 1) Is the name (in all caps) that precedes the colon the same or different from the name of the individual whose notes this occurs in. (I.E. are these kind of entries always references to evidence of relationship to someone else) 2) Is there always a blank line before and after such entries. 3) Does the '1 line' form ever wrap to multiple lines in the export to GEDCOM process? But more important than these questions are the ones that don't occur to me to ask. Viewing this file will probably raise many other questions and provide the answers to all or most of them. --------------060004070707050900070107 Content-Type: text/plain; name="note_obit_finds.ijs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="note_obit_finds.ijs" NB. load 'files' load 'regex' OBIT_Rins =: '' PRBLM_Rins =: '' ChgLog =: '' main =: 3 : 0 fn =: wd 'mbopen "" "\zhold" "*.ged"' aa =: (1!:1) <fn f =. LF,'0 ' b =. 1, _1}. f E. aa perInd each b <;.1 aa if. 0 = #ChgLog do. wdinfo 'Didn''t find any Source records',LF,'with "OBIT" in the title.' else. if. 1 = +/ ','=ChgLog do. wdinfo 'Change @S7@ in note_obit.ijs to @',}.ChgLog,'@ on line 64' end. end. ) perInd =: 3 : 0 if. +/ ' INDI' E. y. do. '' return. end. if. +/ '1 SOUR PAF' E. y. do. '' return. end. if. +/ '1 HUSB ' E. y. do. '' return. end. if. +/ '1 WIFE ' E. y. do. '' return. end. if. 0 = +/ ' SOUR' E. y. do. '' return. end. Rin =: 3}. 50{. y. j =. Rin i. '@' Rin =: j{.Rin b =. '1 TITL ' E. y. a =. b <;.1 y. if. 0 = +/'OBIT' E. >{.a do. '' return. end. if. #ChgLog do. wdinfo 'I can''t determine which Source',LF,'record to link to for OBIT records.' end. ChgLog =: ChgLog,',',Rin ) main 0 --------------060004070707050900070107 Content-Type: text/plain; name="note_obit.ijs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="note_obit.ijs" NB. load 'files' load 'regex' OBIT_Rins =: '' PRBLM_Rins =: '' ChgLog =: '' main =: 3 : 0 fn =: wd 'mbopen "" "\zhold" "*.ged"' aa =: (1!:1) <fn f =. LF,'0 ' b =. 1, _1}. f E. aa ab =. ; perInd each b <;.1 aa ab (1!:2) < '-obt.ged',~ _4}.fn ChgLog (1!:2) <'\change.log' ) perInd =: 3 : 0 if. 0 = +/ ' INDI' E. y. do. y. return. end. YI =: y. Rin =: 3}. 50{. y. j =. Rin i. '@' Rin =: j{.Rin NB. Y =: y. f =. LF,'1 ' b =. 0, _1}. f E. y. a =. (b i. 1) {. y. a , ; perlev1 each b <;.1 y. ) perlev1 =: 3 : 0 OBIT =: 0 if. 0 = '1 NOTE' -: 6{.y. do. y. return. end. if. 0 = +/b =. ' OBIT:' E. y. do. y. return. end. OBIT =: 1 NB. YL1 =: y. j =. b i. 1 t0 =. (j-6){.y. t =. (j-6)}.y. NB. T =: t b =. '^2 CONT [A-Z]+:' rxE t if. 0 = $b do. t9 =. end. tp =. b<;.1 t if. +/b do. if. 0{b do. echo 'starts with 1 total: ',": n =. +/b if. n>1 do. r =. transform1 >0{tp t0,(; }. tp),r return. else. t0, transform1 t return. end. else. echo 'doesn''t start with 1, total: ',":+/b y. return. end. else. echo 'found nothing' y. return. end. ) transform1a =: <;.(_1) 0 : 0 |1 SOUR @S7@ 2 PAGE |2 NOTE | 2 DATA 3 TEXT |3 DATE | ) transform1 =: 3 : 0 if. 0 = #y. do. '' return. end. NB. YT =: y. b =. '2 CONT Date:' E. y. b =. b + '2 CONT Source:' E. y. b =. 1,}.b + '2 CONT Notes:' E. y. NB. echo '$b';($b);' $y.';$y. D =: b <;.1 y. NB. +/ D '2 CONT Notes:'&E. each D a =. ; +/ each '2 CONT Notes:'&E. each D try. a =. ('2 CONT';'4 CONT') rxrplc X =: 14 }. ; a # D catch. '' return. end. p =. ; +/ each '2 CONT Source:'&E. each D p =. 15}. ; p # D if. 91 < # p do. wdinfo 'Tell Lorin that we have a page # field',LF,'that is too long. See RIN: ',Rin end. if. +/ '2 CON' E. p do. wdinfo 'It looks like we might have a Source: entry',LF,'that takes more than one line. See RIN ',Rin end. d =. ; +/ each '2 CONT Date:'&E. each D d =. 13}. ; d # D R =. (>0{transform1a),p,(>1{transform1a),' ',(>2{transform1a),a,(>3{transform1a),d,(>4{transform1a) ChgLog =: ChgLog,'vvv ============',Rin,'==============',LF,y.,'-------------------------------',LF,R,'^^^ ===========================',LF R ) main 0 --------------060004070707050900070107 Content-Type: text/plain; name="note_obit2.ijs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="note_obit2.ijs" NB. load 'files' load 'regex' OBIT_Rins =: '' PRBLM_Rins =: '' ChgLog =: '' main =: 3 : 0 fn =: wd 'mbopen "" "\zhold" "*.ged"' aa =: (1!:1) <fn f =. LF,'0 ' b =. 1, _1}. f E. aa ab =. ; perInd each b <;.1 aa ab (1!:2) < '-obt2.ged',~ _4}.fn ) perInd =: 3 : 0 if. 0 = +/ ' INDI' E. y. do. '' return. end. Name =: '' Rin =: 3}. 50{. y. j =. Rin i. '@' Rin =: j{.Rin NB. Y =: y. f =. LF,'1 ' b =. 0, _1}. f E. y. a =. (b i. 1) {. y. a , ; perlev1 each b <;.1 y. ) perlev1 =: 3 : 0 if. '1 NAME ' -: 7{. y. do. Name =: y. '' return. end. OBIT =: 0 if. 0 = '1 NOTE' -: 6{.y. do. '' return. end. if. +/('(Obit.)' E. y.)+('(Obit)' E. y.)+('(Obit,)' E. y.) do. Name,LF, y. return. end. '' ) main 0 --------------060004070707050900070107--