Hi Gerwin,

>> I was more thinking of a better way of querying my data.
>> I'm new to Jess and do not know all the tricks yet.

Well, your first question said:

>> "This works fine for a small example but when I read in my GEDCOM file of
2700 people a
>> huge amount of (Related ?id1 ?id2) facts are generated and java gives an
out of memory error."

So, I naturally thought to try bumping the heap first.  :-)  How exactly is
your data structured?

>> Can I do more difficult pattern matching in a query and skip the
generation of Related facts?

If you think about it, asserting the fact that two people are related
doesn't tell you much -- carried to the extreme (genetically not necessarily
biblically), we're all related, right?  You can always make the inference
that two people "are related" from much more basic and useful relations.  The
interesting questions arise from "how are two people related?"  For example,
if you want to stay with this predicate calculus-type logic, perhaps you can
rethink your templates and rules along the lines of these relations:

 Female(x)
 Male(x)
 Child(x,y) --> Parent(y,x)
 Married(x,y) --> Spouse(x,y) ^ Spouse(y,x)
 Child(x,y) ^ Male(x) --> Son(x,y)
 Child(x,y) ^ Female(x) --> Daughter(x,y)
 (Brother(x,y) | Sister(x,y)) --> Sibling(x,y) ^ Sibling(y,x)
 Sister(x,y) ^ Mother(y,z) --> Aunt(x,z)
 Brother(x,y) ^ Father(y,z) --> Uncle(x,z)
 Father(x,y) ^ Father(y,z) --> Grandfather(x,z)
 Mother(x,y) ^ Mother(y,z) --> Grandmother(x,z)
 Child(x,y) ^ (Uncle(y,z) | Aunt(y,z)) --> Cousin(x,z)
 (Uncle(x,y) | Aunt(x,y)) ^ Male(y)  --> Nephew(y,x)
 (Uncle(x,y) | Aunt(x,y)) ^ Female(y)  --> Neice(y,x)
 Grandfather(x,z) ^ Father(y,x) --> GreatGrandFather(y,z)
 Grandmother(x,z) ^ Mother(y,x) --> GreatGrandMother(y,z)

 (Child(x,y) | Spouse(x,y) | Parent(x,y) | Sister(x,y) | Mother(x,y) |
Aunt(x,y) | Uncle(x,y) |
     Brother(x,y) | Father(x,y) | Grandfather(x,y) | Grandmother(x,y) |
Cousin(x,y) |
     Nephew(x,y) | Neice(x,y) | GreatGrandFather(x,y) |
GreatGrandMother(x,y)) -->
     Related(x,y)

;; additional predicates here

Reply via email to