Knowledge Explorer News
No. 15
1999 August 1

1. standard genealogy files
The new !dump/ged command produces a standard GEDCOM file
which can be read by many genealogy programs. Usage is:

`!read family.ku`
`!dump/ged family.ged`

I have been using the free PAF program, which you can
download from

`Personal Ancestral File 4.0`

2. fast knowledge base loading
Loading knowledge from relations is rather slow. You can use the !dump
command to produce a faster loading knowledge base file. Usage is:

!read family.ku
every p isa person do
!dump $p;
done
!exit

which produces a summary for each person in family.out. Reloading the
knowledge base

!read family.out

is significantly faster.

3. Icon meaning procedures
Another way to increase processing speed is to use Icon
procedures to interpret the meaning of relations & methods.
For example (KEHOME/src/birth.icn):

`# r_birth is relation with`
`# label="birthplace; birthdate; sex; child; mother; father",`
`# format="space:1; time:2; sex:3; person:4; person:5; person:6",`
`# meaning=procedure_birth`

`invocable "procedure_birth"`

`procedure procedure_birth(rname,nvtab)`
`#=====================================`
`local d1,d2,d3,d4,d5,d6, dfam`
`case rname of {`
`"r_birth": {`

`# initialization`
`#--------------#`
`d1 := to_value(nvtab["$1"]) # $1 = birthplace`
`d2 := to_value(nvtab["$2"]) # $2 = birthdate`
`d3 := to_value(nvtab["$3"]) # $3 = sex`
`d4 := to_value(nvtab["$4"]) # $4 = child`
`d5 := to_value(nvtab["$5"]) # $5 = mother`
`d6 := to_value(nvtab["$6"]) # $6 = father`

`dfam := d6||"_"||d5 # $fam = $6_$5`

`# meaning`
`#-------#`
`put_char("attr",d4,"sex",d3) # $4 has sex=$3`
`put_char("attr",d4,"birthplace",d1) # $4 has birthplace=$1`
`put_char("attr",d4,"birthdate",d2) # $4 has birthdate=$2`
`put_char("attr",d4,"parent",d5,"+=") # $4 has parent +=$5`
`put_char("attr",d4,"parent",d6,"+=") # $4 has parent +=$6`
`put_char("attr",d5,"sex","female") # $5 has sex=female`
`put_char("attr",d5,"child",d4,"+=") # $5 has child +=$4`
`put_char("attr",d6,"sex","male") # $6 has sex=male`
`put_char("attr",d6,"child",d4,"+=") # $6 has child +=$4`

`add_unit(dfam,"family") # $fam isa family`
`put_char("attr",dfam,"husband",d6) # $fam has husband=$6`
`put_char("attr",dfam,"wife",d5) # $fam has wife=$5`
`put_char("attr",dfam,"child",d4,"+=") # $fam has child +=$4`
`put_char("attr",d4,"family_child",dfam,"+=") # $4 has family_child +=$fam`
`put_char("attr",d5,"family_spouse",dfam,"+=") # $5 has family_spouse +=$fam`
`put_char("attr",d6,"family_spouse",dfam,"+=") # $6 has family_spouse +=$fam`

`} # end "r_birth"`
`} # end case rname`
`end`