Ontologies play a prominent role on the Semantic Web. They make possible the widespread publication of machine understandable data, opening myriad opportunities for automated information processing. However, because of the Semantic Web's distributed nature, data on it will inevitably come from many different ontologies. Information processing across ontologies is not possible without knowing the semantic mappings between their elements. Manually finding such mappings is tedious, error-prone, and clearly not possible at the Web scale. Hence, the development of tools to assist in the ontology mapping process is crucial to the success of the Semantic Web.We describe <sc>glue</sc>, a system that employs machine learning techniques to find such mappings. Given two ontologies, for each concept in one ontology <sc>glue</sc> finds the most similar concept in the other ontology. We give well-founded probabilistic definitions to several practical similarity measures, and show that <sc>glue</sc> can work with all of them. This is in contrast to most existing approaches, which deal with a single similarity measure. Another key feature of <sc>glue</sc> is that it uses multiple learning strategies, each of which exploits a different type of information either in the data instances or in the taxonomic structure of the ontologies. To further improve matching accuracy, we extend <sc>glue</sc> to incorporate commonsense knowledge and domain constraints into the matching process. For this purpose, we show that <i>relaxation labeling</i>, a well-known constraint optimization technique used in computer vision and other fields, can be adapted to work efficiently in our context. Our approach is thus distinguished in that it works with a variety of well-defined similarity notions and that it efficiently incorporates multiple types of knowledge. We describe a set of experiments on several real-world domains, and show that <sc>glue</sc> proposes highly accurate semantic mappings.