LegalBERT-th: Development of Legal Q&A Dataset and Automatic Question Tagging
Kannika Wiratchawa, Tanutcha Khunthong, Thanapong Intharah · 2021
Tagging questions according to their topics is useful for internet forum management. In this paper, we use the Bidirectional Encoder Representations from Transformers (BERT) model to categorize posts from Thai legal internet forums. First, We construct our new legal Q&A dataset by scraping the internet, cleaning the data, and annotating the data. Second, We perform transfer learning to let our model learn about the legal language model in general and then fine-tune the model for the law topic classification task. As a result, we have developed a legal Q&A dataset of 12,695 question/answer pairs and a law topic classification model based on BERT with 92% accuracy. Finally, we build a prototype legal internet forum which equipped with the automatic tagging function, law topic classification, to provide a concrete example of how to apply the model in the real situation.