I think about a system which gets XML documents in various structures but with essentially the same data structure in it. For the example, let's assume each document contains data about one or more persons. So the AI would recognize a name. Somewhere else in the document there is the post address of our fictional person. The AI should now "see" the address and conclude, it belongs to our person. Anywhere else, there is a phone number in the document. Again, our AI should see the connection between our person and this phone number.
This wouldn't be a job for an AI if there wasn't a catch. If the task was merely to find and map strings like addresses and phone numbers, we could simply use a regex to match our "target strings". The catch in this scenario would be this: the XML document might contain other data, which does not belong to our person but is a valid phone number for example and thus will match an regex.
Would it be possible for an AI to learn this? If yes, with which framework would someone create such an AI?
Sample XML document:
<?xml version="1.0" encoding="utf-8" ?>
<document>
<data>
<foo>
<bar>
<person>
<name>John Doe</name>
</person>
</bar>
<address>
<street>Main street 1</street>
<city>1111 Twilight town</city>
<country>sample country</country>
</address>
<phone>+123 123 123</phone>
</foo>
<foo>
<bar>
<person>
<name>Jane Doe</name>
</person>
</bar>
<address>
<street>Broadway 42</street>
<city>4521 Traverse town</city>
<country>sample country</country>
</address>
<phone>+123 412123</phone>
</foo>
</data>
<creator>
<!-- Note: While this looks like a valid person, -->
<!-- this data should not be matched by the AI -->
<name>Sam Smith</name>
<office>
<street>Seaside road 5</street>
<city>4521 Traverse town</city>
<country>sample country</country>
</office>
<phone>+123 555 555</phone>
</creator>
</document>
<foo>
parent. For humans it's clear that each<foo>
represents one person. $\endgroup$