S-Match : an algorithm and an implementation of semantic matching 1

We think of Match as an operator which takes two graph-like structures and produces a mapping between those nodes of the two graphs that correspond semantically to each other. Semantic matching is a novel approach where semantic correspondences are discovered by computing and returning as a result, the semantic information implicitly or explicitly codified in the labels of nodes and arcs. In this paper we present an algorithm implementing semantic matching, and we discuss its implementation within the S-Match system. We also test S-Match against three state of the art matching systems. The results, though preliminary, look promising, in particular for what concerns precision and recall. 1. Semantic matching Preliminary to the definition of semantic matching is the definition of concept of/at a node, which, in turn, is based on the notion of concept of/at a label. Let us analyze these two notions in turn, starting from the second. The trivial but key observation is that labels in classification hierarchies are used to define the set of documents one would like to classify under the node holding the label. In other words, a label has an intended meaning, which is what this label means in the world. However, when using labels for classification purposes, we use them to denote the set of documents which talk about their intended meaning. This consideration allows us to define the “concept of/at a label” as “the set of documents that are about what the label means in the world”. Trees add structure which allows us to perform the classification of documents more effectively. Thus, we have that “the concept of/at a node” is “the set of documents that we would classify under this node”, given it has a certain label and it is positioned in a certain place in the tree. We can now proceed to the definition of semantic matching. Let a mapping element be a 4-tuple < IDij, n1i, n2j, R >, i=1,. ,N1; j=1,. ,N2; where IDij is a unique identifier of the given mapping element; n1i is the i-th node of the first graph, N1 is the number of nodes in the first graph; n2j is the j-th node of the second graph, N2 is 1 Long version in Proceedings of the European Semantic Web Symposium, LNCS 3053, pp. 61-75, 2004. Full version and the description of the schemas tested can be found at: http://www.dit. unitn.it/~accord/ Dagstuhl Seminar Proceedings 04391 Semantic Interoperability and Integration http://drops.dagstuhl. de/opus/volltexte/2005/37 the number of nodes in the second graph; and R specifies a semantic relation which holds between the concepts of nodes n2j and n1i. Possible semantic relations are: equivalence (=), more general ( ), less general ( ), mismatch (⊥), overlapping ( ). Thus, for instance, the concepts of two nodes are equivalent if they have the same extension, they mismatch if their extensions are disjoint, and so on for the other relations. Semantic matching can then be defined as the following problem: given two graphs G1, G2 compute the N1 × N2 mapping elements <IDij, n1i, n2j, R′ >, with n1i ∈ G1, i=1,. ,N1, n2j ∈ G2, j=1,. ,N2 and R′ the strongest semantic relation holding between the concepts of nodes n1i, n2j. 2. Semantic matching algorithm The S-Match algorithm is organized in the following four macro steps: − Step 1: for all labels in the two trees, compute concepts at labels − Step 2: for all nodes in the two trees, compute concepts at nodes − Step 3: for all pairs of labels in the two trees, compute semantic relations among concepts denoted by labels − Step 4: for all pairs of nodes in the two trees, compute semantic relations among concepts at nodes Let us consider for instance the two trees depicted in Figure 1a. Fig. 1. Two trees (a). The matrix of semantic relations between concepts at labels in the trees (b). The matrix of semantic relations between the concepts at nodes in the trees (matching result) (c). During Step 1 we try to capture the meaning of the labels in the trees. In order to perform this we first tokenize the complex labels. For instance “Wine and Cheese” from Figure 1 becomes <Wine, and, Cheese>. Then we lemmatize tokens; and “Images” becomes “image”. Then, an Oracle (at the moment we use WordNet 2.0 as an Oracle) is queried in order to obtain the senses of the lemmatized tokens. Afterwards, these senses are attached to the atomic concepts. Finally, the complex concepts are built from the atomic ones. Thus, the concept of label Wine and Cheese, CWine and Cheese is computed as CWine and Cheese = <wine, {sensesWN#4}>&<cheese, {sensesWN#4}>, where <cheese, {sensesWN#4}> is taken to be the union of the four WordNet senses. Step 2 takes into account the structural schema properties. The logical formula for a concept at node is constructed, most often as the conjunction of the formulas in the concept path to the root. Element level semantic matchers are applied during Step 3. They determine the semantic relations holding between the atomic concepts at labels. For example, from WordNet we can derive the information that image and picture are synonyms. Therefore, the equivalence relation between concepts at labels (CImages =