DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to build a Portuguese legislative text dataset with LLM Legislativo

Load the curated Parquet release with leakage-free train, validation, and test splits for NLP work.

Short answer: Open https://huggingface.co/datasets/BaruqRodrigues/corpus-legislativo-pretraining and read the split and schema description; then install the Hugging Face datasets library with pip install datasets; load the release with from datasets import load_dataset and call it on the Hub repo BaruqRodrigues/corpus-legislativo-pretraining. All steps.

  • Research
  • Intermediate
  • 45 minutes
  • From the README
  • Any agent

Authorization notice. LLM Legislativo is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

Who it is forA data engineer or NLP researcher who needs Brazilian legislative text with splits that do not leak related documents across sets.

The problemLegislative documents are amended and reported on in families, so random splits leak near-duplicate text into the test set.

The outcomeA train, validation, and test dataset built from the published Parquet files, split by family_id.

What you need first

  • A Python environment (the README install section is cut off in the source, so exact setup steps are unconfirmed)
  • Internet access to Hugging Face Hub and GitHub
  • Enough disk space for the Parquet release if you download corpus files (the raw TAR archives total over 360 GiB)
  • Basic familiarity with PyTorch and Hugging Face datasets for the model and corpus steps

Steps

  1. Open https://huggingface.co/datasets/BaruqRodrigues/corpus-legislativo-pretraining and read the split and schema description.
  2. Install the Hugging Face datasets library with pip install datasets. (inferred, check the README)
  3. Load the release with from datasets import load_dataset and call it on the Hub repo BaruqRodrigues/corpus-legislativo-pretraining. (inferred, check the README)
  4. Check that the test split has no family_id that appears in the train split before using the data.

Prompt for your agent

Load the Hugging Face dataset BaruqRodrigues/corpus-legislativo-pretraining and report the number of rows in the train, validation, and test splits. Output a table of counts and one sample record per split. Verify that no family_id appears in both train and test.

Caveat. The README gives the split ratios and the family_id method, but the exact column names are not in the README, so check the dataset card before writing code.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for BaruqueRodrigues/llm-legislativo and "Build a Portuguese legislative text dataset"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer