Skip to main content

LeSSE—A Semantic Search Engine Applied to Portuguese Consumer Law

  • Conference paper
  • First Online:
Progress in Artificial Intelligence (EPIA 2023)

Abstract

For the rule of law to work well, citizens should know their rights and obligations, especially in a day to day context such as when posing as a consumers. Despite being available online, the Portuguese Consumer law was not accessible to the point of being able easy to insert a sentence written in natural language in a search engine and getting a clear response without first having to scroll through multiple little applicable search results. To solve this issue, we introduce Legal Semantic Search Engine (LeSSE), an information retrieval system that uses a hybrid approach of semantic and lexical information retrieval techniques. The new system performed better than the lexical search system in production.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://dre.pt/dre/home.

  2. 2.

    http://alt.qcri.org/semeval2020/.

  3. 3.

    http://alt.qcri.org/semeval2020/.

  4. 4.

    https://huggingface.co.

  5. 5.

    https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/.

  6. 6.

    https://home.unicode.org.

  7. 7.

    https://pypi.org/project/rank-bm25/.

References

  1. Cer, D., Diab, M., Agirre, E., Lopez-Gazpio, I., Specia, L.: SemEval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In: Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pp. 1–14. ACL, Vancouver, Canada (2017)

    Google Scholar 

  2. Devlin, J., Chang, M.-W., Lee, K., Toutanova, K.: BERT: Pre-training of deep bidirectional transformers for language understanding. In: Proceedings of the 2019 Conference of the North American Chapter of the ACL: Human Language Technologies, vol. 1, pp. 4171–4186. ACL, Minnesota (2019)

    Google Scholar 

  3. Duarte, M., Santos, P.A., Dias, J., Baptista, J.: Semantic norm recognition and its application to portuguese law (2022). arXiv:2203.05425

  4. Gain, B., Bandyopadhyay, D., Saikh, T., Ekbal, A.: Iitp in coliee@ icail: Legal information retrieval using bm25 and bert. In: Competition on Legal Information Extraction/Entailment (2019)

    Google Scholar 

  5. Johnson, J., Douze, M., Jégou, H.: Billion-scale similarity search with GPUs. IEEE Trans. Big Data 7(3), 535–547 (2019)

    Article  Google Scholar 

  6. Kim, M.Y., Rabelo, J., Goebel, R.: Bm25 and transformer-based legal information extraction and entailment. In: Proceedings of the COLIEE Workshop in ICAIL (2021)

    Google Scholar 

  7. Lee, K., Chang, M.-W., Toutanova, K.: Latent retrieval for weakly supervised open domain question answering. In: Proceedings of the 57th Annual Meeting of the ACL (2019)

    Google Scholar 

  8. Marelli, M., Menini, S., Baroni, M., Bentivogli, L., Bernardi, R., Zamparelli, R.: A SICK cure for the evaluation of compositional distributional semantic models. In: Proceedings of the 9th International Conference on Language Resources and Evaluation, LREC 2014 (2014)

    Google Scholar 

  9. Nguyen, H.-T., Thi Vuong, H.-Y., Nguyen, P.M., Dang, B.T., Bui, Q.M., Vu, S.T., Nguyen, C.M., Tran, V., Satoh, K., Le Nguyen, M.: Jnlp team: Deep learning for legal processing in coliee 2020 (2020). arXiv:2011.08071

  10. Reimers, N., Gurevych, I.: Sentence-BERT: Sentence embeddings using siamese BERT-networks. In: EMNLP-IJCNLP 2019–2019 Conference on Empirical Methods in Natural Language Processing and 9th International Joint Conference on Natural Language Processing, Proceedings of the Conference (2020)

    Google Scholar 

  11. Robertson, S.E., Walker, S., Sparck Jones, K., Hancock-Beaulieu, M.M.: Okapi at TREC-3. Proceedings of the Third Text REtrieval Conference (1994)

    Google Scholar 

  12. Rodrigues, J., Gomes, L., Silva, J., Branco, A., Santos, R., Cardoso, H.L., Osório, T.: Advancing neural encoding of portuguese with transformer albertina pt-* (2023). arXiv:2302.13971

  13. Samarinas, C., Hsu, W., Lee, M.L.: Improving evidence retrieval for automated explainable fact-checking. In: Proceedings of the 2021 Conference of the North American Chapter of the ACL: Human Language Technologies: Demonstrations, pp. 84–91 (2021)

    Google Scholar 

  14. Souza, F., Nogueira, R., Lotufo, R.: Bertimbau: Pretrained bert models for Brazilian Portuguese. In: Intelligent Systems Lecture Notes in Computer Science, pp. 403–417 (2020)

    Google Scholar 

  15. Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., Rodriguez, A., Joulin, A., Grave, E., Lample, G.: Llama: Open and efficient foundation language models (2023). arXiv:2305.06721

  16. Wagner Filho, J.A., Wilkens, R., Idiart, M., Villavicencio, A.: The BRWAC corpus: a new open resource for Brazilian Portuguese. In: LREC 2018–11th International Conference on Language Resources and Evaluation (2019)

    Google Scholar 

Download references

Acknowledgements

This work was partially supported by funds from Imprensa Nacional—Casa da Moeda (INCM) and from national funds through Fundação para a Ciência e a Tecnologia (FCT) through projects UIDB/50021/2020, UIDB/04326/2020, UIDP/04326/2020 and LA/P/0101/2020. We would also like to thank INCM and Direção Geral do Consumidor (DGC) for the expert support provided.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to João Dias .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Cordeiro, N.P., Dias, J., Santos, P.A. (2023). LeSSE—A Semantic Search Engine Applied to Portuguese Consumer Law. In: Moniz, N., Vale, Z., Cascalho, J., Silva, C., Sebastião, R. (eds) Progress in Artificial Intelligence. EPIA 2023. Lecture Notes in Computer Science(), vol 14116. Springer, Cham. https://doi.org/10.1007/978-3-031-49011-8_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-49011-8_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-49010-1

  • Online ISBN: 978-3-031-49011-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics