Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!hookup!swrinde!pipex!uknet!cf-cm!Ajith.P.Madurapperuma
From: Ajith.P.Madurapperuma@cm.cf.ac.uk (Ajith P Madurapperuma)
Subject: [Q]: Comparing facts from two files
Message-ID: <1995Feb1.222905.28198@cm.cf.ac.uk>
Sender: Ajith.P.Madurapperuma@cm.cf.ac.uk (Ajith P Madurapperuma)
Nntp-Posting-Host: garnet.cm.cf.ac.uk
Organization: University of Wales College of Cardiff, Cardiff, WALES, UK.
X-Newsreader: TIN [version 1.2 PL2]
Date: Wed, 1 Feb 1995 22:29:04 +0000
Lines: 35

Hi, I have got an interesting question. 

I have two separte files with facts such as. 
e.g

  File 1			File 2
=====================          =====================
 emp(1,joe,25)			emp(5,joe,25)
 emp(2,ruth,32)			emp(1,jill,25)
     .					.
     .					.


What I need to do is to compare a fact from file 1 with all the facts in 
file 2 to check wether there are any similar ones or those 
that may have partially similar properties. 
	
I can try to consult both files but then there are no ways to distinguish 
facts from file 1 from facts from file 2. 

One option could be to name the facts with two different
predicate names (say emp1 and emp2). 
 
Is there any efficient way of doing this kind of things. 

Thanks beforehand for any help. 


Ajith
--
scmapm@uk.ac.cf.cm
PhD Research Student
Dept. of Computing Maths (COMMA)
University of Wales College of Cardiff
Cardiff , UK
