'listofwords' - dog, cat, mouse, rattrap
'listofterms' -dogbowl, rat, stick
So with the above figures I would like to highlight that 'rat' and 'dog' are common to both lists. Is there a way of comparing values?
So far I have my 2 lists populated - might be different variable names but the concept is the same.
for line in CompareCBR.readlines():
spos = line.find(': - ')
if spos > -1:
epos = line.find('\n')
if epos > -1:
resource = line[spos +4 : epos]
ListofText.append(resource)
for lines in Checkformatches.readlines():
spos1 = lines.find('rdf:ID="')
if spos1 > -1:
epos1 = lines.find('">')
if epos1 > -1:
resources = lines[spos1 +8 : epos1]
print resources
ListofOWLwords.append(resources)
Cheers guys

New Topic/Question
Reply




MultiQuote





|