Abstract
Word embeddings is a text representation technique capable of capturing syntactic and semantic linguistic patterns and of representing each word as an n-dimensional dense vector. In the domain of legal texts, there are trained word embeddings in languages like English, Polish, and Chinese. However, to the best of our knowledge, there are no embeddings based on Portuguese (Brazilian and European) legal texts. Given that, our research question is: does the specificity and size of the text corpus used for a word embedding training contribute to a more successful classification? To answer the question, we train word embeddings models in the legal domain with different levels of specificity and size. Then we evaluate their impact on text classification. To deal with the different levels of specificity, we collect text documents from different courts of the Brazilian Judiciary, in hierarchical order. We used these text corpora to train a word embeddings model (GloVe) and then had then evaluated while classifying processes with a deep learning model (CNN). In a context perspective, the results show that in word embeddings trained on smaller corpora sizes, text specificity has a higher impact than for large sizes. Also, in a corpus size perspective, the results demonstrate that the greater the corpus size in embeddings training, the better are the results. However, this impact decreases as the corpus size increases until a point where more words in the corpus have little impact on the results.
T. R. Dal Pont and I. C. Sabo—This research was supported by grants from CNPq (National Council for Scientific and Technological Development) and CAPES (Coordination for the Improvement of Higher Education Personne).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Code and Word Embeddings available at https://github.com/thiagordp/embeddings_in_law_paper.
References
Brazilian Federal Constitution (1988). http://www.planalto.gov.br/ccivil_03/constituicao/constituicao.htm
Ptwiki dump progress on 20191120 (2019). http://wikipedia.c3sl.ufpr.br/ptwiki/20191120/
Aggarwal, C.C.: Machine Learning for Text, 1st edn. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-73531-3
Aggarwal, C.C., Zhai, C. (eds.): Mining Text Data, 27th edn. Springer, Boston (2012). https://doi.org/10.1007/978-1-4614-3223-4
Alami, N., Meknassi, M., En-nahnahi, N.: Enhancing unsupervised neural networks based text summarization with word embedding and ensemble learning. Expert Syst. Appl. 123, 195–211 (2019)
Aubaid, A.M., Mishra, A.: Text classification using word embedding in rule-based methodologies: a systematic mapping. TEM J. 7(4), 902–914 (2018)
Bojanowski, P., Grave, E., Joulin, A., Mikolov, T.: Enriching word vectors with subword information. Trans. Assoc. Comput. Linguist. 5, 135–146 (2016)
Braz, F.A., et al.: Document classification using a Bi-LSTM to unclog Brazil’s supreme court. In: NeurIPS Workshop on Machine Learning for the Developing World (ML4D), 8 December 2018
Cardoso, E.F., Silva, R.M., Almeida, T.A.: Towards automatic filtering of fake reviews. Neurocomputing 309, 106–116 (2018)
Chalkidis, I., Kampas, D.: Deep learning in law: early adaptation and legal word embeddings trained on large corpora. Artif. Intell. Law 27(2), 171–198 (2019). https://doi.org/10.1007/s10506-018-9238-9
Chocron, P., Pareti, P.: Vocabulary alignment for collaborative agents: a study with real-world multilingual how-to instructions. In: Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI-18, International Joint Conferences on Artificial Intelligence Organization, pp. 159–165, July 2018
Christensen, H.: HC Corpora (2016). https://web.archive.org/web/20161021044006/http://corpora.heliohost.org/
Cintra, A.C.d.A., Grinover, A.P., Dinamarco, C.R.: Teoria geral do processo. Malheiros (2011)
Cohen, P.R.: Empirical Methods for Artificial Intelligence. MIT Press, Cambridge (1995)
Hartmann, N., Fonseca, E., Shulby, C., Treviso, M., Rodrigues, J., Aluisio, S.: Portuguese word embeddings: evaluating on word analogies and natural language tasks (Section 3), August 2017
JusBrasil: JusBrasil. Conectando pessoas à justiça (2020). https://www.jusbrasil.com.br/home
Kim, Y.: Convolutional neural networks for sentence classification. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), vol. 2017-January, pp. 1746–1751. Association for Computational Linguistics, Stroudsburg, September 2014
Kowsari, K., Meimandi, J., Heidarysafa, M., Mendu, S., Barnes, L., Brown, D.: Text classification algorithms: a survey. Information 10(4), 150 (2019)
Kumar, G.R., Mangathayaru, N., Narasimha, G.: Intrusion detection using text processing techniques. In: Proceedings of the The International Conference on Engineering & MIS 2015 - ICEMIS 2015. ACM Press (2015)
Lai, S., Liu, K., He, S., Zhao, J.: How to generate a good word embedding. IEEE Intell. Syst. 31(6), 5–14 (2016)
Marlessonn: News of the Brazilian newspaper (2019). https://www.kaggle.com/marlesson/news-of-the-site-folhauol
Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. In: 1st International Conference on Learning Representations, ICLR 2013 - Workshop Track Proceedings, pp. 1–12, January 2013
Peng, H., et al.: Large-scale hierarchical text classification with recursively regularized deep graph-CNN. In: Proceedings of the 2018 World Wide Web Conference, WWW 2018, pp. 1063–1072. International World Wide Web Conferences Steering Committee, Republic and Canton of Geneva (2018)
Pennington, J., Socher, R., Manning, C.: Glove: global vectors for word representation. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), vol. 19, pp. 1532–1543. Association for Computational Linguistics, Stroudsburg (2014)
Rodrigues, R.C., Rodrigues, J., de Castro, P.V.Q., da Silva, N.F.F., Soares, A.: Portuguese language models and word embeddings: evaluating on semantic similarity tasks. In: Quaresma, P., Vieira, R., Aluísio, S., Moniz, H., Batista, F., Gonçalves, T. (eds.) PROPOR 2020. LNCS (LNAI), vol. 12037, pp. 239–248. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-41505-1_23
Santos, H., Woloszyn, V., Vieira, R.: BlogSet-BR: a Brazilian Portuguese blog corpus. In: Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018). European Language Resources Association (ELRA), Miyazaki (2018)
Sheikhalishahi, S., Miotto, R., Dudley, J.T., Lavelli, A., Rinaldi, F., Osmani, V.: Natural language processing of clinical notes on chronic diseases: systematic review. JMIR Med. Inform. 7(2), e12239 (2019)
da Silva, N.C., et al.: Document type classification for Brazil’s supreme court using a convolutional neural network. In: 10th International Conference on Forensic Computer Science and Cyber Law (ICoFCS), Sao Paulo, Brazil, October 2018
Smywiński-Pohl, A., Lasocki, K., Wróbel, K., Strzałta, M.: Automatic construction of a polish legal dictionary with mappings to extra-legal terms established via word embeddings. In: Proceedings of the Seventeenth International Conference on Artificial Intelligence and Law - ICAIL 2019. ACM Press (2019)
STF: Supremo Tribunal Federal (2020). http://portal.stf.jus.br/
STJ: STJ - Jurisprudência do STJ (2020). https://scon.stj.jus.br/SCON/
Tan, L.: Old newspapers (2020). https://www.kaggle.com/alvations/old-newspapers
Tatman, R.: Brazilian literature books (2017). https://www.kaggle.com/rtatman/brazilian-portuguese-literature-corpus
TJSC: Jurisprudência Catarinense - TJSC (2020). http://busca.tjsc.jus.br/jurisprudencia/
Uysal, A.K.: An improved global feature selection scheme for text classification. Expert Syst. Appl. 43, 82–92 (2016)
Wang, S., Zhou, W., Jiang, C.: A survey of word embeddings based on deep learning. Computing 102(3), 717–740 (2019)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Dal Pont, T.R., Sabo, I.C., Hübner, J.F., Rover, A.J. (2020). Impact of Text Specificity and Size on Word Embeddings Performance: An Empirical Evaluation in Brazilian Legal Domain. In: Cerri, R., Prati, R.C. (eds) Intelligent Systems. BRACIS 2020. Lecture Notes in Computer Science(), vol 12319. Springer, Cham. https://doi.org/10.1007/978-3-030-61377-8_36
Download citation
DOI: https://doi.org/10.1007/978-3-030-61377-8_36
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-61376-1
Online ISBN: 978-3-030-61377-8
eBook Packages: Computer ScienceComputer Science (R0)