Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Big Data

Sec. Machine Learning and Artificial Intelligence

Volume 8 - 2025 | doi: 10.3389/fdata.2025.1448785

This article is part of the Research TopicMachine Learning Applications for Digital HumanitiesView all 5 articles

ULBERT: A Domain-Adapted BERT Model for Bilingual Information Retrieval from Pakistan's Constitution

Provisionally accepted
  • 1Islamic University of Madinah, Medina, Saudi Arabia
  • 2University of Sargodha, Sargodha, Punjab, Pakistan

The final, formatted version of the article will be published soon.

To find answers within a country's constitution, it can be incredibly difficult because of its specialized jargon and complex, long-distance connections within the text. Seeing that no automated search tool existed for the Constitution of Pakistan, we decided to build one. This paper introduces our solution: a powerful information retrieval framework built around a custom AI model we call ULBERT. It is designed to serve everyone, from lawyers to citizens, in both English and Urdu. The system works by understanding the meaning behind a query, not just keywords. It compares the user's question to the text of the Constitution to find the best match based on semantic similarity. In testing, ULBERT proved highly effective, finding the correct information 86% of the time for English questions and 73% for Urdu, a significant breakthrough in making this foundational legal document accessible to all.

Keywords: Legal information, BERT, constitution, information retrieval, Cosine similarity, embedding vectors

Received: 13 Jun 2024; Accepted: 26 Aug 2025.

Copyright: © 2025 Abbas, Nawaz, Niazi and Awais. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Waqas Nawaz, Islamic University of Madinah, Medina, Saudi Arabia

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.