Automatically Generating H indi W ikipedia Pages Using W ikidata as a Knowledge Graph: A Domain-Specific Template Sentences Approach (2023)

Abstract: This paper presents a method for automatically generating Wikipedia articles in the Hindi language, using Wikidata as a knowledge base. Our method extracts structured information from Wikidata, such as the names of entities, their properties, and their relationships, and then uses this information to generate natural language text that conforms to a set of templates designed for the domain of interest. We evaluate our method by generating articles about scientists, and we compare the resulting articles to machine-translated articles. Our results show that more than 70% of the generated articles using our method are better in terms of coherence, structure, and readability. Our approach has the potential to significantly reduce the time and effort required to create Wikipedia articles in Hindi and could be extended to other languages and domains as well.

## introduction being one of the largest collections of human knowledge, wikipedia is a widely-used, multilingual online encyclopedia that relies on volunteer contributors and an open collaboration model using a wiki-based editing system. while research has shown success in the multilingual aspect of wikipedia, its local language pages, particularly in hindi, are lacking. there are only 149,464 hindi wikipedia pages, with an average length of fewer than 500 words, compared to 54,121,996 pages in english wikipedia. the interlinking of language versions on wikipedia has undergone a significant overhaul with the introduction of wikidata, a unified scheme that utilizes unique numbers to identify entities and their properties. wikidata is a collaboratively edited knowledge base hosted by the wikimedia foundation, offering a common source of open data under a public domain license that can be used by wikimedia projects and others. the data in wikidata is stored in the form of specific ids that serve as the base for the platform. each entity has a unique entity id, which is a number prefixed by a letter. items are prefixed with q (e.g., albert einstein (q937)), properties are prefixed by p (e.g., an instance of (p31)), and lexemes are prefixed by l (e.g., l1). this can be seen in @xcite . the platform also includes a query service called wdqs foot_0 , which allows users to run queries on wikidata's extensive database using an rdf triple store for sparql foot_1 queries against the current data version. a knowledge graph, also known as a semantic network, is a visual representation of connections among real-world entities, such as objects, concepts, events, or situations. the fundamental components of a knowledge graph are nodes, edges, and labels. nodes represent any entity, whether it be a person, place, or thing. edges, on the other hand, indicate the association between two nodes. knowledge graphs are essential tools for effective knowledge management, and wikidata is a prime example of a knowledge graph. in wikidata, scientists (in our case) are the nodes, with information on the scientist as another node and the property as the edge. generating coherent and discourse-related sentence-length natural language text in different languages is now possible due to improved computing power and model capacity. however, generating multiple sentences that display coherence and relevance to a topic remains a challenge, especially in scientific domains, with minimal research done in indian languages like hindi. our approach focuses on generating such human-like hindi wikipedia pages in the scientist domain with a minimum length of 500 words. this project aims to surpass existing projects like lsjbot 3 by generating longer documents that encompass all relevant information. this paper describes a model that generates template sentences using a dataset specifically created from scratch. this dataset incorporates data points from the scientist domain sourced from wikidata. the template sentences are manually crafted with key-value placeholders filled using the dataset's specific data points. following that, the sentences undergo rearrangement based on a rule-based system to generate an article. the paper also introduces this dataset created in hindi and provides detailed insights into the nuances of the template sentences model along with the dataset construction process. this dataset is comprehensive, containing hindi key-value pairs for 17,000 scientists who do not yet have a hindi wikipedia page. we also believe that our approach can be extended to other domains provided relevant translations and data are scraped for processing. ## related work existing methods from @xcite use the high-level structure of humanauthored texts to automatically induce a domain-specific template for the topic structure of a new overview. while @xcite , and @xcite focus on generating sentences, a more challenging and interesting scenario emerges when the goal is to generate multi-sentence texts. @xcite introduces wikiwrite, a system to author new articles on wikipedia automatically by obtaining vector representations of the red-linked entities using a paragraph vector model (le and mikolov, 2014) that computes continuous distributed vector representations of varying-length texts. the representations are then used to identify similar articles that currently exist on wikipedia. @xcite used wikipedia articles in nine languages to identify word translations through keywords and a word alignment algorithm. @xcite proposed to use links to retrieve wikipedia articles in english, similar to an article in 3 https://en.wikipedia.org/wiki/lsjbot german. to the best of our knowledge, the research conducted by @xcite shows the latest work that introduces a unified graph attention network structure for investigating graph-to-text models that combine global and local graph encoders in order to improve text generation. an extensive evaluation of their models demonstrated that the global and local contexts are empirically complementary, and a combination can achieve state-of-theart results on two datasets. these models substantially help in providing and enriching wikipedia pages. although these works carry out some kind of matching across languages and improve english wikipedia, we could not find references on creating wikipedia pages for the hindi language. to the best of our knowledge, we are the first to propose a dataset and evaluate a method in this field. ## method our paper aims to make a hindi wikipedia page citing all vital information important for any domain-specific data point. we assumed that relevant information on the particular data point requested is available on the internet but scattered among several pages. a specific domain (scientists) is selected, and a search for entities within that domain is conducted in the desired language (hindi) using wdqs. this search yields a list of data points related to scientists in the specified domain, which can be downloaded in various formats, such as json (in this case). to make the data more easily readable, the python libraries json and qwikidata are utilized. upon decoding the data, each entity consists of two main components: the child and the child name. the child part contains the wikidata link associated with the entity, while the child name corresponds to the name of the entity as documented in wikidata. to extract the relevant details, the qid is separated from the child and subjected to further processing. we have followed a four-tier process to generate the article: collecting domain specific key-value pairs from wikidata, preprocessing, template sentence generation with data retrieval techniques, features addition & final wikipedia page generation. let us look into each of these in detail. ## results we successfully generated hindi wikipedia pages for scientists who did not have one, despite having pages in other languages. the sample template hindi wikipedia page is publicly available at this link 27 . we compiled all available information on each scientist and incorporated it into their respective hindi wikipedia pages. we have also created a valuable resource in the form of a dataset consisting of 17,000 entities. the dataset is divided into 1,700 files, each containing information on 10 scientists presented as key-value pairs under their respective names. the dataset and the corresponding code can be found at this link. in the next section, we demonstrate how we evaluated our work by comparing it to existing machine translation outputs from english to hindi. ## human evaluation to evaluate our work, we enlisted 20 english-hindi bilinguals and provided them with 2 sets of 50 articles each of 50 scientists. one set is machine-translated using wikipedia's in-built translator, while the second set was created using our template approach. each scientist has been vetted by 3 different workers. we then did a comparative analysis by creating a survey that hinged on 4 key points on a scale of 1-5. these points were based on the word level, sentence level, discourse level, and overall level of the articles, and the results were tabulated. the following link 28 shows the questionnaire for the research survey conducted. out of the 50 articles given, 40 articles that were generated using our method re-ceived more points on the scale compared to the machine-translated articles. the following link displays some of these scientists, with the last column displaying the better output between template driven output & machine translation output. based on the questionnaire that details the intricacies on word, sentence and overall context level, the scores are compared and the results show that our method has indeed produced better results in terms of readability, coherence, and structure of the articles. ## future work we recognize that there is a significant lack of wikipedia pages in other indian languages, such as tamil, telugu, and gujarati, among others. we believe that our methodology can be extended to these languages if the appropriate data is available, pre-processed in accordance with our code requirements, and, if necessary, the template sentences are written or transliterated from hindi to the target language. we also anticipate that a table -to-text machine learning model can be applied to the dataset to generate articles in the required language, which would speed up the process even further. this would eliminate the need to create template sentences as the model would automatically generate the article based on the information in the dataset. however, these generated articles would still require manual vetting due to learning bias. in addition to creating wikipedia pages, we believe that our dataset can be utilized for various linguistic tasks, such as enhancing current machine translation tasks and improving natural language generation models since we provide preprocessed data for 17,000 entities. figure 3 : a screenshot displaying the three different kinds of sentences created using p&c combinations of the keys from the main sentence at the bottom.