legal-nlp-guide
NLP techniques for legal text analysis, case law mining, and contracts
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill legal-nlp-guide --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Legal NLP Guide A skill for applying natural language processing techniques to legal texts. Covers legal document classification, named entity recognition for legal entities, contract clause extraction, case law similarity search, and court opinion summarization using modern NLP tools. ## Legal Text Characteristics Legal language presents unique NLP challenges: - **Long documents**: Court opinions average 5,000-20,000 tokens; contracts can exceed 50,000 - **Domain-specific vocabulary**: Terms of art with precise legal meanings (e.g., "consideration", "estoppel") - **Complex syntax**: Multi-clause sentences with nested qualifications and cross-references - **Citation networks**: Dense cross-referencing between cases, statutes, and regulations - **Temporal reasoning**: Effective dates, amendments, and retroactivity ## Legal Text Classification ### Document Type Classification ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch # Legal-BERT: domain-adapted BERT for legal text model_name = "nlpaueb/legal-bert-base-uncased" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForSequenceClassification.from_pretrained( mod
- Legal Text Characteristics
- Legal Text Classification
- Document Type Classification
- Topic Classification for Case Law
- Named Entity Recognition
- Legal NER Categories
- Citation Extraction and Parsing
- Contract Analysis
- Clause Extraction and Classification
- Case Similarity and Legal Search
- Embedding-Based Case Retrieval
- Legal Datasets and Benchmarks
- Tools and Resources
What does the legal-nlp-guide skill do?
NLP techniques for legal text analysis, case law mining, and contracts
How do I install it?
Run `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill legal-nlp-guide --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From brycewang-stanford/Auto-Empirical-Research-Skills, a repository with 3,244 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.