Authors - Malgorzata Pankowska, Michal Dimmich, Radosław Pacud, Paweł Lula Abstract - In this study, the authors provide the text anonymization model and present a statistical analysis of the anonymization results. The purpose of this study is to: ensure compliance of data processing with General Data Protection Regulation (GDPR) in the activities of a law firm - removing direct and indirect personal data from documents used for further work of a lawyer as templates and know-how; ensure the protection of professional secrets in the activities of a law firm - removing all identifying data and elements covered by professional secrecy within documents used for further work of a lawyer as templates and know-how, i.e., leaving the names and surnames of the authors of scientific publications that confirm a given view; ensure the protection of personal and identification data when sending documents. The authors concluded that the Long Short Term Memory (LSTM) model application provided high performance results for legal document anonymization