# Przetwarzanie tekstów prawnych

EN: **Legal text processing (legal NLP)** · id `legalnlp` · aliases: legal NLP, legal text processing, legal document processing, NLP for law, przetwarzanie języka prawnego

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [AI w prawie](https://aiatlasgraph.com/t/legalai.md) › Przetwarzanie tekstów prawnych

## Description

- PL: Zadania NLP dostosowane do tekstów prawnych: rozpoznawanie encji, strukturyzacja wyroków, streszczanie, anonimizacja oraz modele językowe trenowane na prawie.
- EN: NLP tasks adapted to legal text: entity recognition, judgment structuring, summarisation, anonymisation and language models trained on law.

## In one sentence

- PL: Programy, które czytają wyroki i ustawy: wyłapują nazwiska i sygnatury, dzielą tekst na części, streszczają go i zakrywają dane osób.
- EN: Software that reads rulings and statutes: it picks out names and case numbers, splits the text into parts, summarises it and hides personal data.

## Problem it solves

- PL: Teksty prawne są długie, pisane specyficznym językiem i pełne danych osobowych, więc ogólne narzędzia do tekstu często się na nich gubią.
- EN: Legal texts are long, written in a peculiar language and full of personal data, so general text tools often get lost in them.

## What it does

- PL: Jak doświadczony sekretarz sądowy, który zna układ każdego wyroku i od razu wie, gdzie szukać stron, przepisów i rozstrzygnięcia.
- EN: Like a seasoned court clerk who knows the layout of every ruling and goes straight to the parties, the provisions and the decision.

## Everyday example

- PL: Portal z orzeczeniami publikuje tysiące wyroków miesięcznie; każdy jest wcześniej automatycznie streszczany, opisany hasłami i pozbawiony nazwisk stron.
- EN: A case-law portal publishes thousands of rulings a month; each is first automatically summarised, tagged with topics and stripped of the parties' names.

## This concerns you if you…

- PL: czytasz wyroki lub akty prawne w pracy
- PL: budujesz wyszukiwarkę lub bazę orzeczeń
- PL: chcesz zrozumieć, czego dotyczy wyrok w twojej sprawie
- EN: read rulings or legislation at work
- EN: build a search engine or case-law database
- EN: want to understand what the ruling in your case says

## Keywords

SemEval-2023 LegalEval · legal NER · rhetorical role labelling · legal summarization · court decision anonymization · LEGAL-BERT · SaulLM · LexGLUE · EUR-Lex · legal long-document modelling

## How it works

- PL: Teksty prawne mają stałą strukturę, bardzo długie dokumenty i własne kategorie encji, więc standardowe zadania NLP definiuje się na nowo: z klasami takimi jak sąd, przepis czy precedens oraz z etykietami części wyroku. Stosuje się enkodery transformerowe dostrojone lub dotrenowane na korpusach prawnych, a wyniki zasilają wyszukiwanie, streszczanie i predykcję.
- EN: Legal texts have a fixed structure, very long documents and their own entity categories, so standard NLP tasks are redefined: with classes such as court, provision or precedent and with labels for the parts of a judgment. Transformer encoders fine-tuned or further pretrained on legal corpora are used, and their output feeds retrieval, summarisation and prediction.

## Limits

- PL: Zbiory danych pochodzą głównie z kilku jurysdykcji i są po angielsku, a schematy etykiet różnią się między krajami. Dokumenty przekraczają okna kontekstu, a standardowe metryki słabo oddają ocenę prawników.
- EN: Datasets come mostly from a few jurisdictions and are in English, and label schemes differ between countries. Documents exceed context windows, and standard metrics poorly reflect lawyers' judgment.

## Key terms

- PL: **uzasadnienie**: Część wyroku, w której sąd wyjaśnia powody rozstrzygnięcia.
- PL: **sentencja**: Część wyroku zawierająca samo rozstrzygnięcie sądu.
- PL: **legal NER**: Rozpoznawanie w tekście nazw sądów, przepisów, stron i sygnatur.
- EN: **reasons for judgment**: The part of a ruling where the court explains why it decided as it did.
- EN: **operative part**: The part of a ruling containing only the court's decision.
- EN: **legal NER**: Recognising names of courts, provisions, parties and case numbers in text.

## Know first

- [Wydobywanie informacji z tekstu (nazwy własne, relacje) (Information extraction (named entities and relations))](https://aiatlasgraph.com/t/infoextraction.md)
- [Klasyfikacja tekstu i analiza sentymentu (Text classification and sentiment analysis)](https://aiatlasgraph.com/t/textclassification.md)

## Subtopics (5 direct, 5 in total)

- [Anonimizacja orzeczeń sądowych (Anonymisation of court decisions)](https://aiatlasgraph.com/t/courtanonymization.md): Automatically detecting personal identifiers in court decisions and masking them before publication, and assessing re-identification risk.
- [Modele językowe uczone na tekstach prawnych (Domain-adapted legal language models)](https://aiatlasgraph.com/t/legallm.md): Language models further pretrained or trained from scratch on legal corpora, sometimes with a custom vocabulary and instruction tuning on legal tasks.
- [Podział wyroku na części (role retoryczne) (Rhetorical role labelling of court judgments)](https://aiatlasgraph.com/t/rhetoricalroles.md): Classifying each sentence of a judgment into a functional role such as facts, party arguments, analysis, ratio decidendi and decision.
- [Rozpoznawanie nazw w tekstach prawnych (Legal named entity recognition)](https://aiatlasgraph.com/t/legalner.md): Tagging entities in legal texts with fine-grained domain classes such as court, judge, party, provision, precedent and case number.
- [Streszczanie wyroków i aktów prawnych (Legal document summarisation)](https://aiatlasgraph.com/t/legalsummarization.md): Extractive and abstractive summarisation of long legal documents: judgments, case files and legislation, including multilingual settings.

## Sources

- [SemEval 2023 Task 6: LegalEval – Understanding Legal Texts](<https://arxiv.org/abs/2304.09548>) `modi-semeval2023-legaleval` · by Ashutosh Modi i in.
- [LEGAL-BERT: The Muppets straight out of Law School](<https://arxiv.org/abs/2010.02559>) `chalkidis-legal-bert-2020` · by Ilias Chalkidis, Manos Fergadiotis, Prodromos Malakasiotis, Nikolaos Aletras, Ion Androutsopoulos

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/legalnlp · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
