Abstract:
Processing legal documents and understanding arrays of law sections has proven to be a challenging task for natural language processing. Determining the relevant law section for a court case often requires expensive consultations with lawyers, which many people cannot afford. Our goal is to create a system that can retrieve the appropriate law sections based on the relevant facts of a court case.To achieve this, we have gathered a comprehensive dataset of Supreme Court Cases from Thailand. Using a combination of machine learning and rule-based systems, we extract the facts from the plaintiff's and defendant's documents, enhancing the document's structure for further NLP analysis. Our proposed approach focuses on a few-shot law retrieval system, using plaintiff facts as input. This allows us to handle the wide range of law sections, including those that are rarely encountered or not present in the training set. Our system performs better than the standard supervised baseline and can handle previously unseen law sections.In summary, our research aims to address the difficulties in processing legal documents and determining relevant law sections for court cases. By creating a more accessible and accurate system, we hope to reduce the need for expensive lawyer consultations and provide a valuable tool for legal professionals and individuals involved in court proceedings.