Re: Revised gedcom-relations.n3 file

Dan,

Thanks, I've checked it in.

Tim



Daniel F. Goessling wrote:

>Tim,
>I work for Lynn Stein at Olin College on her Semantic Web research.
>I have been studying cwm and N3.  In the course of working through some
>of the examples on 
>http://www.w3.org/2000/10/swap/Examples.html
>I found that the  gedcom-relations data does not work correctly.  I
>brought this up on #rdfig and Dan Connolly pointed out that the
>gedcom-relations file was using old syntax.  
>So, I revised the file and think I have one which generates correct
>data. The file is attached.  I hope it is useful.  I did not revise the
>Makefile  in the gedcom directory, but I think it can be greatly
>simplified.
>
>Dan Goessling
>
>------------------------------------------------------------------------
>
>#gedcom-relations file 
>#Originally by Jos De Roo
>#Revised by Dan Goessling
>
>@prefix gc: <http://www.daml.org/2001/01/gedcom/gedcom#>.
>@prefix log: <http://www.w3.org/2000/10/swap/log#>.
>@prefix ex: <http://www.daml.org/2000/10/daml-ex#> .
>@prefix : <#>.
>
>:gender = gc:sex.
>
>#"If a child is a child in a family and  a parent is a spouse in the  family, 
>#then the parent is a parent of the child."
>this  log:forAll :child, :family, :parent. {:child gc:childIn :family. :parent gc:spouseIn :family} log:implies {:child gc:parent :parent}.
> 
># "If a child has parent and the parent is male, then then the childs's father is the parent."
>this log:forAll :child, :parent. {:child gc:parent :parent. :parent :gender :M} log:implies {:child gc:father :parent} .
>
>this log:forAll :child, :parent. {:child gc:parent :parent. :parent :gender :F} log:implies {:child gc:mother :parent}. 
>
>this  log:forAll :child, :parent. {:child gc:parent :parent} log:implies {:parent gc:child :child}. 
>
>#"If a child of a parent is male, then the child is the son of the parent."
>this log:forAll :child, :parent. {:child gc:parent :parent. :child :gender :M} log:implies {:parent gc:son :child} . 
>
>this log:forAll :child, :parent. {:child gc:parent :parent. :child :gender :F} log:implies {:parent gc:daughter :child}.
>
>#Rules about grandparents
>this log:forAll :child, :parent, :grandparent. {:child gc:parent :parent. :parent gc:parent :grandparent} log:implies {:child gc:grandparent :grandparent}.
>
>this log:forAll :child, :parent, :grandparent. {:child gc:grandparent :grandparent. :grandparent :gender :M} log:implies {:child gc:grandfather :grandparent}.
>
>this log:forAll :child, :parent, :grandparent. {:child gc:grandparent :grandparent. :grandparent :gender :F} log:implies {:child gc:grandmother :grandparent}.
>
>this log:forAll :child, :grandparent.{:child gc:grandparent :grandparent} log:implies {:grandparent gc:grandchild :child} .
>
>this log:forAll :child, :grandparent. {:child gc:grandparent :grandparent. :child :gender :M} log:implies {:grandparent gc:grandson :child}.
>
>this  log:forAll :child, :grandparent. {:child gc:grandparent :grandparent. :child :gender :F} log:implies {:grandparent gc:granddaughter :child}.
>
>#Rules about siblings and brother and sisters
>#Thanks to DanCon
>#"If child1 is in a family, and child2 is in the family, and child1 is not child2, then child1 and child2 are siblings."
>this log:forAll :child1, :child2, :family. { :child1 gc:childIn :family. :child2 gc:childIn :family. :child1 log:notEqualTo :child2} log:implies { :child1 gc:sibling :child2}.
>
>this log:forAll :child1, :child2. {:child2 gc:sibling :child1} log:implies {:child1 gc:sibling :child2}.
>
>this log:forAll :child, :sibling. { :child gc:sibling :sibling. :sibling :gender :M } log:implies {:child gc:brother :sibling}. 
>
>this log:forAll :child, :sibling. { :child gc:sibling :sibling. :sibling :gender :F } log:implies {:child gc:sister :sibling}.
>
>this log:forAll :child, :sister. {:child gc:sister :sister} log:implies {:child gc:sibling :sister}.
>
>#Husbands and wives. 
>#The authors leave same-sex marriages as an exercise for the student.
>this  log:forAll :spouse1, :spouse2, :family. {:spouse1 gc:spouseIn :family. :spouse2 gc:spouseIn :family. :spouse1 log:notEqualTo :spouse2} log:implies {:spouse1 gc:spouse :spouse2}.
>
>this log:forAll :spouse1, :spouse2. {:spouse2 gc:spouse :spouse1} log:implies {:spouse1 gc:spouse :spouse2}.
>
>this log:forAll :spouse, :husband. {:spouse gc:spouse :husband. :husband :gender :M} log:implies {:spouse gc:husband :husband}.
>
>this log:forAll :spouse, :wife. {:spouse gc:spouse :wife. :wife :gender :F} log:implies {:spouse gc:wife  :wife}.
>
>#Aunts and uncles
>this log:forAll :child, :uncle, :parent. {:child gc:parent :parent. :parent gc:brother :uncle} log:implies {:child gc:uncle :uncle}.
>
>this log:forAll :child, :uncle, :aunt. {:child gc:aunt  :aunt. :aunt gc:spouse :uncle} log:implies {:child gc:uncle :uncle}.
>
>this log:forAll :child, :aunt, :parent. {:child gc:parent :parent. :parent gc:sister :aunt} log:implies {:child gc:aunt :aunt}.
>
>this log:forAll :child, :uncle, :aunt. {:child gc:uncle :uncle. :uncle gc:spouse :aunt} log:implies {:child gc:aunt :aunt}.
>
>#Nieces and Nephews
>this log:forAll :sibling, :child, :parent. {:parent gc:daughter :child. :parent gc:sibling :sibling} log:implies {:sibling gc:niece :child}.
>
>this log:forAll :sibling, :child, :parent. {:parent gc:son :child. :parent gc:sibling :sibling} log:implies {:sibling gc:nephew :child}.
> 
>#First Cousins
>this log:forAll :cousin1, :cousin2, :sibling1, :sibling2. {:cousin1 gc:parent :sibling1. :cousin2 gc:parent :sibling2. :sibling1 gc:sibling :sibling2} log:implies {:cousin1 gc:firstCousin :cousin2}.
>#Second Cousins (new from Dan G)
>this log:forAll :scousin1, :scousin2, :cousin1, :cousin2. {:scousin1 gc:parent :cousin1. :scousin2 gc:parent :cousin2. :cousin1 gc:firstCousin :cousin2} log:implies {:scousin1 gc:secondCousin :scousin2}. 
>
>#ancestors
>this  log:forAll :child, :parent. {:child gc:parent :parent} log:implies {:child gc:ancestor :parent}. 
>
>this log:forAll :child, :parent, :ancestor. {:child gc:parent :parent. :parent gc:ancestor :ancestor} log:implies {:child gc:ancestor :ancestor}.
>
>this log:forAll :child, :ancestor. {:child gc:ancestor :ancestor} log:implies {:ancestor gc:descendent :child}.
>
>#generic cousin
>this log:forAll :descendent1, :descendent2, :sibling1, :sibling2. {:sibling1 gc:sibling :sibling2. :sibling1 gc:descendent :descendent1. :sibling2 gc:descendent :descendent2} log:implies {:descendent1 gc:cousin :descendent2} .
>
>
>
>
>
>
>
>
>  
>

Received on Thursday, 6 June 2002 11:27:56 UTC