Skip to Content
  • Article
  • Open Access

13 March 2026

23 Pages

Theft Address Extraction and Classification from Chinese Judicial Documents Based on Large Language Model

,
,
,
and
1
Jiangsu Key Laboratory of Soil and Water Processes in Watershed, College of Geography and Remote Sensing, Hohai University, Nanjing 211100, China
2
School of Earth Sciences and Engineering, Hohai University, Nanjing 211100, China
3
Department of Land Resources Management, School of Public Administration, China University of Geosciences, Wuhan 430074, China
*
Author to whom correspondence should be addressed.

Abstract

Judicial documents have become a significant data source for crime geography research, offering advantages in accessibility and scale compared to highly restricted police-recorded crime data. However, extracting crime addresses from these texts is challenging due to sparse, inconsistent, and incomplete address information. Without proper classification, errors in geocoding and spatial analysis can arise, compromising data quality. To address these limitations, we employed large language models (LLMs) and a structured prompt engineering strategy tailored for this task. Specifically, we propose a fine-tuned LLM, named CAEC_LLM, to extract addresses from judicial documents and classify these crime addresses at various categories with different spatial scales. Experimental results demonstrate that the model achieved an F1-score of 0.79 for address extraction and a classification accuracy of up to 0.74 for the best-performing category, significantly outperforming other LLMs. This study makes two primary contributions: (1) designing an address classification scheme specifically for crime addresses, and (2) developing a fine-tuned LLM for extracting and classifying crime addresses from Chinese judicial documents, enabling LLMs to be used to classify crime addresses into different categories on a spatial scale. These advancements facilitate more accurate crime pattern analysis and data-driven urban planning.

1. Introduction

Crime is a complex and evolving social phenomenon, shaped by economic, cultural, and geographical factors [1]. It causes negative societal consequences, undermines community cohesion, and harm individual and collective interests. In this context, accurate crime data is crucial for effective community governance and urban planning. In particular, improving the precision of crime address extraction is essential for understanding spatial crime patterns and supporting data-driven prevention strategies.
Access to detailed crime records and investigation reports is often restricted by strict confidentiality policies. Consequently, many scholars in crime geography turn to judicial documents as their primary data source, given their open access, standardized structure, and wide spatial coverage. Previous research has shown that these documents can serve as a viable alternative to police records for tasks such as hotspot detection and regression analysis at the subdistrict level [2,3,4]. Since the launch of the China Judgments Online platform in 2013, over 130 million judicial documents have been made public, with millions of new records added annually [5]. While these documents provide highly reliable accounts of crime records, extracting location data for individual incidents from such a large volume of documents and filtering out redundant information are particularly difficult. Although prior studies have applied natural language processing (NLP) techniques to derive geolocated events from social media posts and other open-text sources [6,7,8], adopting these techniques to judicial documents poses the following unique challenges.
First, judicial documents are often very long, ranging from several hundreds to thousands of words. They typically include the court name, the defendant’s background, a detailed narrative of the alleged crime, sentencing considerations, and the final judgment. In contrast, the incident addresses may be mentioned very briefly, sometimes comprising only a few characters. This sparsity makes it hard for existing algorithms to identify crime-related addresses amid many irrelevant entities [9].
Second, judicial documents often reference multiple types of addresses, including the defendant’s registered address, permanent residence, arrest location, and the crime scene (see Figure 1). These address types are contextually distinct but lexically highly similar.
Figure 1. Various types of addresses referred to in judicial judgments.
Third, even when addresses are successfully identified, most studies treat them as point features and directly geocode them [10]. Yet, crime-related address expressions vary widely in their spatial semantics, ranging from precise locations (e.g., “Building 5, XX Community”) to linear or areal descriptions (e.g., “along XX Road”) and dynamic scenes (“on a moving bus”). Mapping all these references to point coordinates can introduce substantial positional errors. Moreover, the varying spatial granularity of these addresses reflects different levels of privacy sensitivity and analytical applicability, which underscores the need to classify crime addresses into meaningful spatial types before analysis.
Recent advances in LLMs, such as Deepseek [11] and GPT variants [12,13], have proven effective at extracting sparse and semantically complex information from long texts [14]. However, judicial documents present domain-specific linguistic structures, including highly formalized expressions, nested clauses, and regionally nuanced address descriptions [15]. These characteristics often cause off-the-shelf models to misinterpret the contextual roles of location entities or to overlook crime-related addresses embedded within lengthy procedural narratives.
To address these challenges, we fine-tuned an LLM using Chinese judicial documents to adapt it to the linguistic characteristics of legal texts and the contextual semantics of crime addresses. Guided by a taxonomy grounded in spatial reference theory, this domain-adapted, knowledge-guided model enables accurate extraction and fine-grained classification of crime-related addresses, providing a scalable foundation for multi-level spatial analysis of crime [16,17,18]. This approach enables both fine-grained address recognition and multi-level spatial analysis of crime, providing a scalable foundation for understanding spatial crime patterns from judicial data.
The remainder of this paper is organized as follows. Section 2 reviews the related research on Chinese address recognition and address classification, and establishes the background for using LLM. Section 3 outlines the legal knowledge-guided crime address extraction and classification method. Section 4 describes the dataset and evaluation models. Section 5 provides a comparative analysis of the methods employed. Section 6 discusses the strengths and limitations of our approach, and Section 7 concludes the paper by proposing directions for future research.

4. Research Data and Evaluation Models

4.1. Research Data

The dataset used in this study was collected from the China Judgments Online platform https://wenshu.court.gov.cn/ (accessed on 11 March 2026). This dataset comprises a series of judicial documents from 1986 to 2021, covering various criminal and civil cases ranging from traffic accidents, fraud, to theft. These cases were adjudicated by different courts across China, amounting to millions of judicial documents in total. Each document provides a complete record of a case and the associated trial proceedings. The format of these judicial documents is detailed in Table 2. It should be noted that all content related to judicial documents presented in this paper is a translation of the original Chinese text into an English context. All corpora used in this study consist of judicial documents and their corresponding original Chinese texts. The judicial document dataset includes a range of basic information, such as case type, presiding court, involved parties, disclosure date, prosecuting authority, judgment date, document content, procedural stage of the trial, and case identifier. The location of the crime is contained within the “Main Text” section of the dataset.
Table 2. The basic format for judicial documents.
Figure 6 presents an anonymized excerpt from the core content of the “Main Text” section in a judicial document, along with its English translation. This example is derived from a typical pickpocketing case judgment in the dataset used in this study. The original text is in Chinese, with the crime address entity that the model is expected to identify underlined.
Figure 6. Example of a document summary in the “Main Text” section.
For this study, we filtered and retained only first-instance criminal judgment documents in which the crime type was recorded as “theft”. A preliminary screening of this massive database yielded 835,693 first-instance judicial documents related to theft. This selection ensured uniformity in both legal and narrative expression, reducing semantic variability in crime description. The resulting subset served as the foundation for both the model training and evaluation processes.
To construct a high-quality manually annotated dataset for model development and evaluation under feasible resource constraints, we adopted a stratified sampling strategy. We limited the time range to the period from 2011 to 2021. This 11-year window was selected because it represents a period of sustained growth in the online publication of judicial documents after the platform’s launch, ensuring data availability and relative format consistency. Within this period, we aimed to extract representative samples for annotation. To obtain cross-year samples, we conducted sampling by year, randomly selecting 200 judicial documents from each year between 2011 and 2021 for manual verification and annotation. The annotation process was conducted by four undergraduate students majoring in geographic information science. To ensure the consistency and reliability of the annotations, a structured workflow with clear guidelines was established. First, during a pre-annotation training session, the annotators were provided with a detailed annotation guideline. This guideline explicitly defined a “crime address” as the specific geographical location where the criminal act itself occurred, as described in the narrative, distinguishing it from other locations such as the defendant’s residence or the court. The guideline also elaborated on the eight-category classification scheme (Table 1) and the deterministic, priority-based rule for resolving potential category ambiguity (Lines 348–366). Annotators then practiced on a set of 50 sample documents to align their understanding and address any questions. Second, following the training, each of the 1889 sampled judicial documents was independently annotated by one of the four students. For each document, the annotator was required to: (i) locate and read the paragraph(s) describing the criminal act; (ii) identify and extract the exact text span corresponding to the crime address; (iii) assign the extracted address to one of the eight spatial categories by applying the priority-based classification rule; and (iv) structure the extracted information into JSON format. Finally, all annotation results underwent a comprehensive review. This review involved cross-checking each extracted address against the original document’s narrative to ensure logical consistency and accuracy. During this process, we removed documents from the sampled dataset that could not undergo reliable address recognition (such as cybercrimes involving account transactions and crimes occurring on public transportation vehicles). Ultimately, we identified 1889 judicial documents. This sample size represents a balance between the high cost of manual annotation and the need to build a sufficiently large dataset for training and robustly evaluating complex LLMs.
From the 1889 annotated documents, we performed a fixed split: 1389 documents were used for training CAEC_LLM (with 30% of the data serving as a validation set during model training), and the remaining 500 were reserved as an independent test set. These documents were manually annotated to identify crime locations and categorize each address into the corresponding category. The annotated data is stored in a structured text format, facilitating its submission to LLMs for training and accuracy evaluation. After manual annotation, these 500 test documents contain a total of 972 distinct crime location address entities, which constitute the address-level ground truth for evaluation.
All experiments were conducted on a high-performance computing environment equipped with a NVIDIA RTX4090D GPU (24 GB memory) and 32 GB of system memory. Model fine-tuning was implemented using the LoRA method with LLaMa Factory [47]. Prompt-based experiments were conducted on the same hardware under identical configurations to ensure consistency in model comparison.

4.2. Evaluation of Address Extraction and Classification Results

The performance of crime address extraction was assessed using precision, recall, and F1 score, standard metrics in textual location recognition [48]. True Positive (TP): refers to the number of instances that the model correctly predicts as positive. False Positive (FP): refers to the number of instances that the model incorrectly predicts as positive. False Negative (FN): refers to the number of instances that the model incorrectly predicts as negative. The computational formulas for these metrics are detailed below.
Precision:
Precision = T P T P + F P
Recall:
Recall = T P T P + F N
F1 score:
F 1 = 2 × Precision × Recall Precision + Recall
These metrics quantify the accuracy and robustness of the LoRA-fine-tuned LLM in processing judicial documents.
We compared the performance of the proposed CAEC_LLM with three powerful open-source Chinese LLMs to establish competitive baselines and highlight the effect of domain-specific fine-tuning. GLM4-9B belongs to the same series as our base model, sharing the identical GLM architecture. Qwen2.5-7B and Qwen3-8B are widely recognized and high-performing general-purpose Chinese LLMs. We included both to represent popular baselines of different parameter scales. Qwen3-8B is particularly noted for its enhanced reasoning capabilities, allowing us to investigate whether such architectural optimization benefits this task without domain adaptation. To ensure a fair comparison, all models were evaluated under identical conditions. For each document in the test set of 500 judicial documents, the input was formatted using the exact same prompt template as shown in Figure 5, which includes system instructions and the original document text. The model’s input, output, and evaluation process were all conducted in the Chinese context. The baseline models (GLM4-9B, Qwen2.5-7B, Qwen3-8B) were evaluated in their original, un-fine-tuned state (zero-shot). In contrast, CAEC_LLM is a LoRA fine-tuned version of GLM4-9B. All experiments were run on the same hardware and software stack. A consistent post-processing script was used to parse model outputs, extracting address strings and predicted categories, which were then compared against the same manually annotated ground truth to calculate precision, recall, and F1 scores.

5. Experimental Analysis

5.1. Crime Address Extraction

The first stage of the experiment evaluated the performance of LLMs in extracting crime-related addresses from judicial documents. We validated the performance of four models on the dataset: the original Qwen2.5-7B, GLM4-9B, Qwen3-8B, and CAEC_LLM.
The proposed CAEC_LLM significantly outperforms other models in precision (82%), recall (82%), and F1-score (82%). These results confirm that fine-tuning LLMs with legal knowledge can substantially enhance their capacity to identify crime-related addresses from complex judicial documents (Table 3). In contrast, the precision of the other three models remains around 70%, indicating that approximately 30% of their predictions are false positives. Although Qwen3 has undergone reasoning optimization, its overall performance remains comparable to that of Qwen2.5, with only a slight improvement in recall. The native GLM4-9B model outperforms the Qwen models. However, it exhibits the poorest performance in addressing over-identified issues.
Table 3. Comparison of different models for crime address extraction.
To further evaluate the performance of CAEC_LLM in address extraction, we conducted an in-depth analysis of error cases based on the precision results. These errors can be broadly categorized into the following types: missing address elements, semantic segmentation errors, and hallucinations of LLMs.
Missing Address Elements: As shown in Table 4, this type of error is common in the LLMs’ performance on the dataset. Specifically, the LLM tends to omit certain elements of an address during recognition. These omissions may include information irrelevant to the standard address format or, more critically, the absence of key address components.
Table 4. Examples of missing address elements.
Semantic Segmentation Errors: Format-related errors often occur because judicial documents may simplify the description of multiple addresses on the same street due to a suspect’s repeated criminal activities. For example, in the sentence: “The defendant Li committed theft at the Shaxuan Hair Salon on Wenhong Road, Jiangning District, Nanjing, and at Room 1101, Building 9, Shimao Dream Home,” the model may incorrectly interpret “Shaxuan Hair Salon, Shimao Dream Home, Building 9, Room 1101” as a single address. This type of error stems from the failure of ambiguity resolution in NLP. Legal language and address description methods in judicial documents (such as using commas to separate multiple addresses) often fall outside the scope of the model’s conventional training data, leading to parsing inaccuracies.
Hallucinations in LLMs: In the test set, a small number of errors were caused by model hallucinations. Although such issues are infrequent, they remain noteworthy. For instance, in the text: “At around 21:00 on 31 January 2020, the defendant Xiang entered a store in Nanjing by using a key hidden by an employee under the roller shutter door and stole five marinated pig trotters worth RMB 200,” the only clue regarding the crime location is “Nanjing.” However, influenced by its training data, the model tends to generate more complete addresses and thus outputs “Nanjing Xinjiekou ‘Jiujiuya’ Duck Neck Shop” as the crime location, despite the absence of any related text in the document. Hallucinations in LLMs primarily stem from their generative nature. By learning statistical patterns from massive text data, the model predicts the most probable next word or phrase. When encountering ambiguous, incomplete, or creatively fillable information, the model “guesses” based on learned patterns and generates seemingly plausible but factually incorrect content.
Figure 7 illustrates the performance of various models in recognizing different types of addresses. At the overall performance level, the CAEC_LLM model demonstrated strong capability, achieving the highest F1 scores in categories C2, C3, and C5. However, GLM4 exhibited superior overall performance, attaining the highest F1 scores in C4, C6, and C7, while also leading in precision across multiple categories. In contrast, the Qwen series models showed a distinct “specialization” characteristic, with Qwen2.5 achieving the top F1 score in C1 and Qwen3 showing competitive precision in some instances, though both exhibited significant shortcomings in other categories.
Figure 7. Address extraction results of different types of addresses.
Analyzing classification performance across different categories, C2 (House Number Addresses) and C4 emerged as domains where models performed relatively well. In the C2 category, CAEC_LLM led with the highest F1 score (0.90), while GLM4 and Qwen2.5 achieved perfect precision (1.00) in the C4 category, validating the models’ capability in classifying addresses with distinct characteristics.
In comparison, C3 (Road/Street Segments) and C8 remain highly challenging domains, though the nature of challenges differs. In the C3 category, CAEC_LLM significantly outperformed other models, achieving both the highest precision (0.84) and F1-Score (0.78). Meanwhile, GLM4 and the Qwen series collectively struggled, with precision and recall remaining notably low. For the C8 category, results were mixed: Qwen2.5 achieved notably high precision (0.67) but moderate recall (0.29), while other models showed both low precision and recall, indicating systematic difficulty in accurately identifying these addresses.
In the C7 category, all three models except CAEC_LLM (GLM4, Qwen2.5, Qwen3) achieved perfect precision (1.00). Their recall rates showed significant differences, with GLM4 achieving the highest recall (0.79) while maintaining high precision, thus obtaining the highest F1 score (0.89) in this category. Similarly, in the C6 category, GLM4 again achieved perfect precision (1.00) but moderate recall (0.73), while CAEC_LLM adopted a more balanced strategy, trading a slight precision concession (0.73) for the highest recall (0.82). This trade-off resulted in GLM4 ultimately achieving a higher F1 score (0.85) compared to CAEC_LLM (0.77).

5.2. Crime Address Classification

In the second phase, we evaluated the ability of CAEC_LLM to classify extracted addresses based on spatial scales (As shown in Figure 8). Crime addresses were categorized into eight spatial-scale classes ranging from administrative units (areal features) to vague or directional descriptions. The precision, recall, and F1-score for each category across these four models were examined to show the performance of the proposed method.
Figure 8. Address classification results of different types of addresses.
Figure 8 illustrates the performance of various models in classifying different types of addresses. In terms of overall performance, the CAEC_LLM model demonstrates a significant advantage, achieving the highest or nearly highest F1 scores in most categories (C2, C4, C5, C6, C7), highlighting its robust comprehensive address recognition capability. In contrast, GLM4 and the two Qwen models exhibit considerable performance fluctuations and instability across different tasks.
Analyzing the models’ performance across categories, all models face substantial challenges in C3 (Road/Street Segments) and C8. The C3 category is one of the most unstable across all models. For instance, CAEC_LLM achieves a recall of 0.36 and precision of 0.42, while GLM4 shows a precision of only 0.11 despite a recall of 0.31. Both Qwen2.5 and Qwen3 record precision values below 0.18 in this category (0.11 and 0.18, respectively), indicating the models’ difficulty in consistently and accurately classifying road information. The results for the C8 category are even more severe: Qwen2.5 and Qwen3 completely fail to effectively recognize addresses in this category (F1 = 0), and although CAEC_LLM and GLM4 manage to identify some (recalls of 0 and 0.29, respectively), their extremely low precision values (0 for CAEC_LLM and 0.05 for GLM4) suggest a tendency to misclassify a large number of ambiguous addresses into this category, leading to severe over-identification. Notably, CAEC_LLM fails to correctly identify any C8 instance, resulting in zero precision and recall.
In comparison, C2 (House Number Addresses) and C6 categories are domains where models perform relatively stable and excellently. In the C2 category, CAEC_LLM achieves the highest F1 score (0.74), significantly outperforming other models (GLM4: 0.50, Qwen2.5: 0.32, Qwen3: 0.56), which validates the strong capability of all models in recognizing addresses with explicit numerical identifiers. Similarly, CAEC_LLM leads in the C6 category (F1 = 0.69), while other models show significant divergence in recall rates (GLM4 only 0.23 compared to CAEC_LLM’s 0.73).
For the C7 category, the models’ performance reveals their limitations in handling ambiguous samples. CAEC_LLM maintains high precision (0.66) and recall (0.58), demonstrating robust performance. However, Qwen2.5 completely fails to recognize addresses in this category (precision = 0, recall = 0), and although Qwen3 achieves the highest precision (0.69), its recall is extremely low (0.04). This indicates that, aside from CAEC_LLM, other models either entirely fail to capture the characteristics of the C7 category or become overly conservative to ensure correctness, missing the vast majority of true samples.
Similarly, in the C1 and C5 categories, GLM4 and Qwen3 achieve relatively high recall rates (0.80 for GLM4 in C5 and 0.67 for Qwen3 in C5), but their precision values are notably low (0.23 and 0.28, respectively). However, this strategy does not prove effective in the C1 category, where all models fail to exceed an F1 score of 0.33, suggesting that C1 itself poses an inherent challenge, and the models have yet to identify an effective recognition pattern.
Overall, the results indicate that our proposed address extraction and classification model CAEC_LLM, which combines rule-guided category systems with structured and example-enhanced knowledge injection, significantly enhances the spatial interpretability and analytical value of judicial documents data. This innovation enables LLMs to progress from simple text recognition to reliable, scale-aware spatial reasoning, bridging the gap between NLP and geospatial crime analysis.

6. Discussions

6.1. Interpretation of Experimental Results

Our experimental results reveal both the capabilities and limitations of LLMs in processing spatial information from judicial documents. The performance of CAEC_LLM in categories like C2 (House Number Addresses) and C6 (Institutions/Facilities) can be attributed to their relatively standardized and explicit expressions in legal narratives (e.g., “Room 406, Building 62…”), which aligns with the patterns that LLMs are adept at recognizing from their pre-training. Conversely, the model’s struggle with C3 (Road/Street Segments) and C8 underscores the inherent challenges posed by the semantic complexity of these categories. For instance, road segments are often embedded in lengthy descriptions of movement or events (e.g., “…stole a bicycle along Binjiang Avenue”), requiring deeper narrative understanding beyond simple entity recognition. The poor performance on C8 highlights a fundamental difficulty in distinguishing truly vague locations from contexts where the model lacks sufficient cues, a challenge noted in prior work on informal text geolocation [37]. These findings directly validate the necessity of our task-specific fine-tuning, as the base models consistently underperformed in these nuanced categories, precisely the areas where domain knowledge is most critical.

6.2. Theoretical Significance and Practical Value

This study proposes a systematic taxonomy for classifying crime-related addresses, categorizing them into eight distinct types based on their spatial referencing characteristics. Unlike traditional geocoding methods that uniformly treat all addresses as point features [38,49], this taxonomy effectively identifies diverse spatial entities such as road segments, administrative regions, and vague locations, thereby addressing the limitations of previous approaches in handling complex spatial descriptions. By establishing a correspondence between textual expressions and spatial semantics, this framework not only enhances the structured representation of spatial information but also provides theoretical support for LLMs in comprehending spatial contexts within judicial texts, representing a significant innovation in the field of crime geography analysis.
A reasonable question arising from our work is how to integrate text-based addresses into spatial crime analysis, which typically requires geographic coordinates. We argue that the primary value of this classification lies not in replacing geocoding, but in enabling a semantically aware and scale-appropriate geocoding strategy, thereby significantly improving the quality of the generated spatial data. By moving away from a “one-size-fits-all” point-based geocoding approach, our framework helps mitigate the substantial positional errors that arise from forcing linear, areal, or vague locations into point representations. This, in turn, leads to more accurate crime maps, more reliable hotspot detection, and ultimately, more effective spatial analysis. Therefore, our work does not merely stop at text classification; it provides the necessary spatial semantic metadata aimed at transforming unstructured judicial text into a structured, geographically intelligent database, primed for rigorous crime pattern analysis and evidence-based urban safety planning.
Building on this foundation, the study further introduces a domain-adapted LLM (CAEC_LLM), which enhances the base model’s ability to identify and classify crime-related addresses from judicial documents through instruction fine-tuning in the judicial domain [33]. Experimental results demonstrate that domain-specific training significantly improves the performance of general-purpose LLMs in recognizing and interpreting spatial entities. The dataset used for model training and testing encompasses theft cases from all provinces in mainland China between 2011 and 2021, ensuring broad temporal and spatial representativeness and validating the model’s applicability to theft-related judicial documents nationwide. Compared to multiple unmodified base LLMs, the fine-tuned GLM4 model consistently outperforms across various evaluation metrics, confirming the critical role of domain adaptation in transferring specialized spatial and legal knowledge.
Furthermore, the localized deployment strategy adopted in this study ensures data security while reducing reliance on online services, providing reliable technical support for sensitive scenarios such as law enforcement and public safety.
Although this research primarily focuses on judicial documents related to theft crimes, its methodological framework could be transferable to other types of documents. By adjusting the domain distribution of training data and fine-tuning strategies, the model can be adapted to address extraction needs for other crime categories, such as fraud and violent crimes. More importantly, the “taxonomy & domain adaptation” framework can be extended to geospatial text analysis scenarios beyond the judicial domain, including location descriptions in disaster emergency response and event localization in social media. By replacing the corresponding training corpora and adjusting the classification system, the model can rapidly adapt to new domains, offering a viable pathway for developing a universal geospatial text understanding system.

6.3. Methodological Implications

The proposed framework contributes to bridging the long-standing gap between spatial information science and natural language understanding. Traditional geospatial information extraction methods rely heavily on deterministic rules or gazetteer matching [6,7], which are often inadequate when dealing with heterogeneous, ambiguous, or context-dependent address descriptions. By contrast, the integration of domain-adapted LLMs with a structured address classification system provides a new paradigm for extracting and organizing spatial information embedded in unstructured legal text. This hybrid approach demonstrates that combining symbolic classification logic with the probabilistic reasoning capabilities of LLMs can yield both interpretability and flexibility, which have been difficult to achieve simultaneously in prior research.
This approach aligns with and advances the emerging trend in GIScience towards adaptive, knowledge-guided spatial text analytics. The use of LoRA for efficient domain adaptation [46] provides a scalable blueprint for applying this methodology to other domains where text describes spatial events, such as disaster response [37] or public health monitoring.
Ultimately, this study underscores a broader methodological shift in GIScience: from rule-driven spatial information extraction toward adaptive, context-aware, and semantically enriched understanding of textual data. Such integration of LLM reasoning and geospatial classification not only enhances the precision of spatial data processing but also paves the way for intelligent GIS systems capable of understanding and generating spatial knowledge from unstructured human language.

6.4. Limitations and Future Work

This study demonstrates that fine-tuning can significantly enhance the performance of LLMs in crime address recognition and classification. However, the effectiveness of such models remains contingent upon the quality of the training data employed. Although the dataset covers a wide range of geographic regions and case types, the models may not generalize well to other crime patterns or specific urban environments. This inherent data dependency could potentially limit the generalization capability of the models in broader practical applications. While fine-tuning enables LLMs to acquire domain-specific knowledge, the diversity of cases and the complexity of crime address expressions continue to pose challenges for the models in comprehensively capturing features from judicial documents. Factors such as regional variations in legal language norms and standardized phrasing may introduce biases, thereby affecting the recognition outcomes of LLMs. Future research could focus on expanding the diversity of training data and exploring strategies to enhance the robustness of LLMs in addressing domain-specific linguistic nuances.
Furthermore, a specific sampling bias warrants discussion. We have statistically analyzed and discussed the sampling representativeness of the dataset used in this paper in terms of time, space, and address categories in Supplementary Materials. Although our stratified sampling strategy preserved the rank-order of major cities from the full dataset, the final annotated dataset contains a relatively higher proportion of samples from large metropolitan areas such as Shanghai, Hangzhou, and Chongqing (Supplementary Materials, Table S2). This over-representation of major cities may introduce a systematic bias into the model. Consequently, CAEC_LLM may be more adept at recognizing and classifying address patterns commonly found in densely populated urban centers, which tend to have more standardized and structured address formats (e.g., precise house numbers, well-defined residential compounds). Conversely, its performance could be less robust when applied to judicial documents from smaller cities, towns, or rural areas, where address descriptions may be less formal, rely more on local landmarks, or follow different regional conventions. To mitigate this limitation in future work, we plan to employ a more geographically stratified sampling strategy that explicitly balances representation across different city tiers and rural areas, or to collect targeted data from underrepresented regions to fine-tune a more robust and generalizable model.
Additionally, the classification system we established has its limitations. The current categories are primarily based on an inductive analysis of existing crime address recording patterns and may not fully encompass all emerging or unique forms of location descriptions in the future. As urban forms evolve and crime patterns change, this classification may require further expansion and refinement.

7. Conclusions

This study underscores the critical role of address information in judicial documents for crime geography analysis and validates the feasibility of using LLMs to identify crime-related addresses within these texts. We propose a crime-address knowledge-guided LLM framework, which integrates domain-specific fine-tuning to optimize the LLM’s understanding and utilization of address knowledge. Through this approach, the fine-tuned model not only acquires domain expertise from judicial corpora but also leverages example-based reasoning to accurately interpret and classify diverse address expressions.
Building upon this unified framework, the proposed “CAEC_LLM” demonstrates exceptional performance in identifying and categorizing crime-related addresses, confirming that the integration of domain knowledge and fine-tuning methods significantly enhances extraction accuracy and classification consistency, particularly when dealing with complex or ambiguous address descriptions.
Overall, this study advances the methodological foundation for integrating LLMs with geographic information science. By combining domain-specific learning and model fine-tuning under a unified knowledge-guided paradigm, the proposed model offers a scalable and versatile solution for transforming unstructured legal texts into geospatially meaningful intelligence. This supports more refined crime mapping, spatial decision-making, and broader applications at the intersection of law and geography.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/ijgi15030124/s1, Table S1. Annual distribution of the final dataset (1889 documents). Table S2. Geographic distribution comparison: Full dataset and annotated dataset. Table S3. Address category distribution: Training set and Test set.

Author Contributions

Conceptualization, Xiang Li and Zengli Wang; methodology, Xiang Li; software, Xiang Li; validation, Xiang Li; formal analysis, Xiang Li; investigation, Xiang Li; resources, Zengli Wang; data curation, Xiang Li; writing—original draft preparation, Xiang Li; writing—review and editing, Zengli Wang, Xiaoping Rui, Linfang Ding and Jingjing Li; supervision, Zengli Wang; project administration, Zengli Wang; funding acquisition, Zengli Wang. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Natural Science Foundation of China [No. 42571292], Humanities and Social Science Fund of Ministry of Education of China [No. 22YJAZH108], Fundamental Research Funds for the Central Universities [No. B220201021].

Data Availability Statement

The model code and partial sample datasets used for training and testing in this study have been deposited in a public GitHub repository and can be accessed at https://github.com/letdo1945/Crime_Address_Extraction_and_Classification_Based_on_LLM_Data (accessed on 11 March 2026). The complete original judicial document dataset and the final trained model (CAEC_LLM) can be provided upon request to the author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Büttner, N. Local inequality and crime: New evidence from South Africa. J. Econ. Inequal. 2025, 23, 1337–1385. [Google Scholar] [CrossRef] [Scilit]
  2. Dai, M.; Liu, C. Multi-label classification of chinese judicial documents based on BERT. In Proceedings of the 8th IEEE International Conference on Big Data, Atlanta, GA, USA, 10–13 December 2020; Electr Network; IEEE: New York, NY, USA, 2020. [Google Scholar]
  3. Liu, C.; Hsieh, C. Exploring phrase-based classification of judicial documents for criminal charges in chinese. In Proceedings of the 16th International Symposium on Methodologies for Intelligent Systems, Bari, Italy, 27–29 September 2006; Spring: Berlin/Heidelberg, Germany, 2006; pp. 681–690. [Google Scholar]
  4. Wang, J.; Ma, H.; Zhang, Y.; Yang, L. A case similarity calculation model in case pushing of judicial documents. Comput. Eng. Sci. 2019, 41, 2193. [Google Scholar]
  5. Yin, J. Research on Automatic Summarization Technology for Law-Related Texts. Master’s Thesis, People’s Public Security University of China, Beijing, China, 2025. [Google Scholar]
  6. Gelernter, J.; Balaji, S. An algorithm for local geoparsing of microtext. GeoInformatica 2013, 17, 635–667. [Google Scholar] [CrossRef] [Scilit]
  7. Karimzadeh, M.; Pezanowski, S.; MacEachren, A.M.; Wallgrün, J.O. GeoTxt: A scalable geoparsing system for unstructured text geolocation. Trans. GIS 2019, 23, 118–136. [Google Scholar] [CrossRef] [Scilit]
  8. Wang, J.; Hu, Y. Enhancing spatial and textual analysis with EUPEG: An extensible and unified platform for evaluating geoparsers. Trans. GIS 2019, 23, 1393–1419. [Google Scholar] [CrossRef] [Scilit]
  9. Niu, Z.; Shi, P.; Zhu, Y.; Zhang, S. Research on classification of commodity ultra-short text based on deep random forest. Trans. Beijing Inst. Technol. 2022, 41, 1277–1285. [Google Scholar] [CrossRef]
  10. Wang, R.; Hu, Y.; Zhou, Z.; Yang, K. Tracking flooding phase transitions and establishing a passive hotline with AI-enabled social media data. IEEE Access 2020, 8, 103395–103404. [Google Scholar] [CrossRef] [Scilit]
  11. Guo, D.; Yang, D.; Zhang, H.; Song, J.; Zhang, R.; Xu, R.; Zhu, Q.; Ma, S.; Wang, P.; Bi, X. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv 2025, arXiv:2501.12948. [Google Scholar]
  12. Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A. Language models are few-shot learners. Adv. Neural Inf. Process. Syst. 2020, 33, 1877–1901. [Google Scholar]
  13. Ouyang, L.; Wu, J.; Jiang, X.; Almeida, D.; Wainwright, C.; Mishkin, P.; Zhang, C.; Agarwal, S.; Slama, K.; Ray, A. Training language models to follow instructions with human feedback. In Proceedings of the 36th Conference on Neural Information Processing Systems, New Orleans, LA, USA, 28 November–9 December 2022; Electr Network; IEEE: New York, NY, USA, 2022. [Google Scholar]
  14. Razeghi, Y.; Logan, R.L., IV; Gardner, M.; Singh, S. Impact of pretraining term frequencies on few-shot reasoning. arXiv 2022, arXiv:2202.07206. [Google Scholar] [CrossRef] [Scilit]
  15. Ren, Y.; Han, J.; Lin, Y.; Mei, X.; Zhang, L. An ontology-based and deep learning-driven method for extracting legal facts from Chinese legal texts. Electronics 2022, 11, 1821. [Google Scholar] [CrossRef] [Scilit]
  16. Li, L.; Zhu, Y. Knowledge prompt fine-tuning for event extraction. Comput. Mod. 2024, 7, 36–40. [Google Scholar] [CrossRef]
  17. Liu, P.; Yuan, W.; Fu, J.; Jiang, Z.; Hayashi, H.; Neubig, G. Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv. 2023, 55, 1–35. [Google Scholar] [CrossRef] [Scilit]
  18. Wei, Y.; Chen, Y.; Wang, X.; Fan, J. Information extraction from chinese wheat varieties journal based on large language model. Front. Data Comput. 2025, 7, 175–185. [Google Scholar] [CrossRef]
  19. Hammerton, J. Named entity recognition with long short-term memory. In Proceedings of the Seventh Conference on Natural Language Learning at HLT-NAACL 2003, Edmonton, AB, Canada, 31 May–1 June 2003. [Google Scholar]
  20. Sang, E.F.; De Meulder, F. Introduction to the CoNLL-2003 shared task: Language-independent named entity recognition. arXiv 2003, arXiv:cs/0306050. [Google Scholar] [CrossRef] [Scilit]
  21. Borthwick, A.E. A Maximum Entropy Approach to Named Entity Recognition. Ph.D. Thesis, New York University, New York, NY, USA, 1999. [Google Scholar]
  22. Grishman, R.; Sundheim, B.M. Message understanding conference-6: A brief history. In COLING 1996 Volume 1: The 16th International Conference on Computational Linguistics, Copenhagen, Denmark, 5–9 August 1996; Association for Computational Linguistics: Stroudsburg, PA, USA, 1996; pp. 466–471. [Google Scholar]
  23. Mikheev, A.; Moens, M.; Grover, C. Named entity recognition without gazetteers. In Proceedings of the 9th Conference of the European Chapter of the Association-for-Computational-Linguistics, Bergen, Norway, 8–12 June 1999. [Google Scholar]
  24. Gao, P.; Zhang, X.; Qi, G. Discovering hypernymy relationships in Chinese traffic legal texts. In Proceedings of the Joint International Semantic Technology Conference 2019, Hangzhou, China, 25–27 November 2019; Springer: Berlin/Heidelberg, Germany, 2019. [Google Scholar]
  25. Qi, Y.; Zhai, R.; Wu, F.; Yin, J.; Gong, X.; Zhu, L.; Yu, H. CSMNER: A toponym entity recognition model for chinese social media. ISPRS Int. J. Geo-Inf. 2024, 13, 311. [Google Scholar] [CrossRef] [Scilit]
  26. Shao, W.; Wang, C.; Su, X.; Yan, Z.; Zhang, G.; Zhang, Y.; Li, R. Address entity recognition based on multi-layer knowledge perception. J. Chin. Inf. Process. 2025, 39, 110–118. [Google Scholar]
  27. Hu, X.; Tian, Y.; Nagato, K.; Nakao, M.; Liu, A. Opportunities and challenges of ChatGPT for design knowledge management. Procedia CIRP 2023, 119, 21–28. [Google Scholar] [CrossRef] [Scilit]
  28. Li, Z.; Ning, H. Autonomous GIS: The next-generation AI-powered GIS. Int. J. Digit. Earth 2023, 16, 4668–4686. [Google Scholar] [CrossRef] [Scilit]
  29. Surameery, N.M.S.; Shakor, M.Y. Use chat gpt to solve programming bugs. Int. J. Inf. Technol. Comput. Eng. 2023, 3, 17–22. [Google Scholar] [CrossRef] [Scilit]
  30. Tlili, A.; Shehata, B.; Adarkwah, M.A.; Bozkurt, A.; Hickey, D.T.; Huang, R.; Agyemang, B. What if the devil is my guardian angel: ChatGPT as a case study of using chatbots in education. Smart Learn. Environ. 2023, 10, 15. [Google Scholar] [CrossRef] [Scilit]
  31. Yin, Z.; Li, D.; Goldberg, D.W. Is ChatGPT a game changer for geocoding-a benchmark for geocoding address parsing techniques. In Proceedings of the 2nd ACM SIGSPATIAL International Workshop on Searching and Mining Large Collections of Geospatial Data, Hamburg, Germany, 13 November 2023. [Google Scholar]
  32. Hu, Y.; Wang, J. How do people describe locations during a natural disaster: An analysis of tweets from Hurricane Harvey. arXiv 2020, arXiv:2009.12914. [Google Scholar] [CrossRef] [Scilit]
  33. Huang, Q.; Tao, M.; Zhang, C.; An, Z.; Jiang, C.; Chen, Z.; Wu, Z.; Feng, Y. Lawyer llama technical report. arXiv 2023, arXiv:2305.15062. [Google Scholar] [CrossRef] [Scilit]
  34. Cui, J.; Ning, M.; Li, Z.; Chen, B.; Yan, Y.; Li, H.; Ling, B.; Tian, Y.; Yuan, L. Chatlaw: A multi-agent collaborative legal assistant with knowledge graph enhanced mixture-of-experts large language model. arXiv 2024, arXiv:2306.16092. [Google Scholar] [CrossRef] [Scilit]
  35. Shen, C.; Yue, S.; Liu, S.; Zhou, Y.; Wang, S.; Chen, W.; Xiao, Y.; Li, B.; Song, J.; Shen, X.; et al. Fine-tuning and application of large language model in law domain. Big Data Res. 2024, 10, 12–27. [Google Scholar]
  36. Zhang, Y.; Kwan, M.-P.; Fang, L. An LLM driven dataset on the spatiotemporal distributions of street and neighborhood crime in China. Sci. Data 2025, 12, 467. [Google Scholar] [CrossRef] [Scilit]
  37. Hu, Y.; Mai, G.; Cundy, C.; Choi, K.; Lao, N.; Liu, W.; Lakhanpal, G.; Zhou, R.Z.; Joseph, K. Geo-knowledge-guided GPT models improve the extraction of location descriptions from disaster-related social media messages. Int. J. Geogr. Inf. Sci. 2023, 37, 2289–2318. [Google Scholar] [CrossRef] [Scilit]
  38. Zandbergen, P.A. A comparison of address point, parcel and street geocoding techniques. Comput. Environ. Urban Syst. 2008, 32, 214–232. [Google Scholar] [CrossRef] [Scilit]
  39. Zandbergen, P.A. Geocoding quality and implications for spatial analysis. Geogr. Compass 2009, 3, 647–680. [Google Scholar] [CrossRef] [Scilit]
  40. Zandbergen, P.A. Dasymetric mapping using high resolution address point datasets. Trans. GIS 2011, 15, 5–27. [Google Scholar] [CrossRef] [Scilit]
  41. Kang, M.; Du, Q.; Wang, M. A new method of Chinese address extraction based on address tree model. Acta Geod. Cartogr. Sin. 2015, 44, 99. [Google Scholar]
  42. Shan, S.; Li, Z.; Yang, Q.; Liu, A.; Zhao, L.; Liu, G.; Chen, Z. Geographical address representation learning for address matching. World Wide Web 2020, 23, 2005–2022. [Google Scholar] [CrossRef] [Scilit]
  43. Zhang, C.; Guo, R.; Ma, X.; Kuai, X.; He, B. W-TextCNN: A TextCNN model with weighted word embeddings for Chinese address pattern classification. Comput. Environ. Urban Syst. 2022, 95, 101819. [Google Scholar] [CrossRef] [Scilit]
  44. Zeng, A.; Xu, B.; Wang, B.; Zhang, C.; Yin, D.; Zhang, D.; Rojas, D.; Feng, G.; Zhao, H.; Lai, H.; et al. Chatglm: A family of large language models from glm-130b to glm-4 all tools. arXiv 2024, arXiv:2406.12793. [Google Scholar]
  45. Beltagy, I.; Lo, K.; Cohan, A. SciBERT: A pretrained language model for scientific text. arXiv 2019, arXiv:1903.10676. [Google Scholar] [CrossRef] [Scilit]
  46. Hu, E.J.; Shen, Y.; Wallis, P.; Allen-Zhu, Z.; Li, Y.; Wang, S.; Wang, L.; Chen, W. Lora: Low-rank adaptation of large language models. arXiv 2021, arXiv:2106.09685. [Google Scholar] [CrossRef] [Scilit]
  47. Zheng, Y.; Zhang, R.; Zhang, J.; Ye, Y.; Luo, Z.; Feng, Z.; Ma, Y. Llamafactory: Unified efficient fine-tuning of 100+ language models. arXiv 2024, arXiv:2403.13372. [Google Scholar]
  48. Gritta, M.; Pilehvar, M.T.; Collier, N. Which melbourne? Augmenting geocoding with maps. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Melbourne, Australia, 15–20 July 2018; Association for Computational Linguistics: Stroudsburg, PA, USA, 2018. [Google Scholar]
  49. Chen, Y.; Shang, W.; Wang, H.; Zhang, S.; Bol, P.K. Geocoding the past world: Unearthing coordinates of early China from texts using generative AI. Int. J. Geogr. Inf. Sci. 2025, 141, 781–807. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.