Spanish-Language Legal Information Retrieval for Investment Research in Spain: A Comparative Evaluation of NLP Methods

Authors

  • Yu Zhao Faculty of Law, University of Barcelona, 684 Avinguda Diagonal, 08034 Barcelona, Spain

Keywords:

legal natural language processing, investment screening, information retrieval, latent semantic analysis, explainability

Abstract

Investment-law research in Spain requires locating provisions on investor coverage, sensitive technologies, approval procedures and treaty protection across different legal instruments. Motivated by Chinese investment as a prospective use case, this study evaluates a monolingual Spanish task: retrieving designated articles from Spanish-language questions and source texts, without predicting authorisation or generating legal advice. A corpus of 53 main articles from three official instruments and 60 AI-assisted constructed queries is used to compare token overlap, word TF-IDF, character TF-IDF and a 20-component latent semantic analysis model. Character TF-IDF retrieves a designated target within its first three results for 57 of 60 queries, compared with 56 for word TF-IDF and latent semantic analysis and 53 for token overlap; word TF-IDF has the highest mean reciprocal rank, 0.845. Heading removal, deterministic character deletion and an exact lexical-score decomposition expose dependencies that aggregate scores conceal. The results establish a baseline for Spanish-language article location, not Chinese-language or cross-lingual retrieval. Constructed queries, incomplete relevance labels and the absence of independent legal annotation also prevent claims about operational legal accuracy.

References

[1]Spain. Ley 19/2003, de 4 de julio, sobre régimen jurídico de los movimientos de capitales y de las transacciones económicas con el exterior. Consolidated BOE text. https://www.boe.es/buscar/act.php?id=BOE-A-2003-13471

[2]Spain. Real Decreto 571/2023, de 4 de julio, sobre inversiones exteriores. Consolidated BOE text. https://www.boe.es/buscar/act.php?id=BOE-A-2023-15549

[3]Spain and People's Republic of China. Acuerdo para la promoción y protección recíproca de inversiones, hecho en Madrid el 14 de noviembre de 2005. BOE, 8 July 2008. https://www.boe.es/diario_boe/txt.php?id=BOE-A-2008-11511

[4]Gáspár-Szilágyi, S. (2024). When the Dragon comes Home to Roost: Chinese Investments in the EU, National Security, and Investor–State Arbitration. Journal of International Dispute Settlement, 15(2), 195–220. https://doi.org/10.1093/jnlids/idad028

[5]Chalkidis, I., Jana, A., Hartung, D., Bommarito, M., Androutsopoulos, I., Katz, D., & Aletras, N. (2022). LexGLUE: A Benchmark Dataset for Legal Language Understanding in English. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, Volume 1, 4310–4330. https://doi.org/10.18653/v1/2022.acl-long.297

[6]Guha, N., Nyarko, J., Ho, D. E., Ré, C., Chilton, A., Narayana, A., Chohlas-Wood, A., Peters, A., Waldon, B., Rockmore, D. N., Zambrano, D., Talisman, D., Hoque, E., Surani, F., Fagan, F., Sarfaty, G., Dickinson, G. M., Porat, H., Hegland, J., ... Li, Z. (2023). LegalBench: A Collaboratively Built Benchmark for Measuring Legal Reasoning in Large Language Models. Advances in Neural Information Processing Systems, 36, Datasets and Benchmarks Track. https://papers.neurips.cc/paper_files/paper/2023/hash/89e44582fd28ddfea1ea4dcb0ebbf4b0-Abstract-Datasets_and_Benchmarks.html

[7]Pipitone, N., & Alami, G. H. (2024). LegalBench-RAG: A Benchmark for Retrieval-Augmented Generation in the Legal Domain. arXiv preprint, arXiv:2408.10343. https://doi.org/10.48550/arXiv.2408.10343

[8]Zheng, L., Guha, N., Arifov, J., Zhang, S., Skreta, M., Manning, C. D., Henderson, P., & Ho, D. E. (2025). A Reasoning-Focused Legal Retrieval Benchmark. arXiv preprint, arXiv:2505.03970. https://doi.org/10.48550/arXiv.2505.03970

[9]Salton, G., & Buckley, C. (1988). Term-weighting approaches in automatic text retrieval. Information Processing & Management, 24(5), 513–523. https://doi.org/10.1016/0306-4573(88)90021-0

[10]Deerwester, S., Dumais, S. T., Furnas, G. W., Landauer, T. K., & Harshman, R. (1990). Indexing by latent semantic analysis. Journal of the American Society for Information Science, 41(6), 391–407. https://www.microsoft.com/en-us/research/publication/indexing-by-latent-semantic-analysis/

[11]Park, S. (2025). From Human Mapping to Machine Embedding: Uncovering Key Legal Drivers and Deterrents of ISDS Filing Frequencies. Chicago Journal of International Law, 26(1), 219–238. https://cjil.uchicago.edu/print-archive/human-mapping-machine-embedding-uncovering-key-legal-drivers-and-deterrents-isds

[12]Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, É. (2011). Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, 12, 2825–2830. https://jmlr.org/papers/v12/pedregosa11a.html

Downloads

Published

2026-12-05

Data Availability Statement

The published version of this article is permanently archived in Zenodo and can be accessed at:https://doi.org/10.5281/zenodo.24862065

How to Cite

Zhao, Y. (2026). Spanish-Language Legal Information Retrieval for Investment Research in Spain: A Comparative Evaluation of NLP Methods. International Journal of Advanced AI Applications, 3(3), 46-63. https://www.dawnclarity.press/index.php/ijaaa/article/view/231

Similar Articles

41-50 of 71

You may also start an advanced similarity search for this article.