Options
Solving age-word problems using domain ontology and BERT
Date Issued
04-01-2023
Author(s)
Gupta, Akshay
Kumar, Suresh
Kumar P, Sreenivasa
Abstract
An age word problem (ageWP) typically involves sentences that express relationships between the age of the agents and asks for the age of one of them. Automatically solving ageWPs is a challenging task as we need to tackle temporal relationships between the agent's ages, frame and solve the equations for the required unknowns. To the best of our knowledge, there exists only one ageWP dataset consisting of just 124 examples. The dataset is too small to employ a learning-based solver, mainly consisting of ageWPs with simple temporal relationships. To address this issue, in our earlier work, we designed a description-logic based ontology (ageWP-ont) for the domain of age word problems and utilized it to automatically generate a large number of ageWPs. Sentences in these ageWPs relate the ages of agents in a temporally complex manner. In this paper, we focus on solving these problems. We analyzed an existing learning-based solver of algebraic word-problems that uses a traditional machine learning approach and found that the solver can be adapted to our domain. But we found that this approach does not seem to perform well, perhaps due to the complex nature of the ageWPs. As we have the ontology of the domain on hand, we propose a new approach of utilizing it in the deep-learning based NLU component of the solution. We annotate parts of the ageWP sentences with class-names from ageWP-ont and train a BERT-based language model (LM) that learns to predict the instances for these classes in the given sentences. An RDF graph is populated with these values and serves as a concrete problem-specific instance of the ontology. The dataset for training the LM is automatically generated with the help of ageWP-ont. Finally, for the actual solving of a given ageWP, we make use of its RDF graph and employ Semantic Web Rule Language (SWRL) rules. We implemented the proposed system and achieved 68.8% accuracy. The work demonstrates that combining deep learning with ontologies can give impressive results.