Datasets:
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
booteek pt-PT lexicon
A SQLite lexicon of European Portuguese (pt-PT) unigrams, bigrams (PMI-ranked),
phrases (3/4/5-grams), and diagnostic tokens (pt-PT vs pt-BR variants), derived from
the booteek-ai/fineweb2-bagaco2
corpus (mirror of duarteocarmo/fineweb2-bagaco2).
Built for grounding LLM outputs in European Portuguese (not Brazilian) — Haiku, GPT-4, Gemini all default to pt-BR phrasing when asked for "Portuguese" without aggressive prompting. This lexicon provides a phrase bank + collocation index + diagnostic tokens that applications can query at runtime to:
- Score the pt-PT confidence of generated text
- Detect pt-BR-isms (
vocêvstu,ônibusvsautocarro,acreditarvscrer, …) - Inject collocations and phrases into prompts as few-shot grounding
- Surface under-served pt-PT search vocabulary for SEO/AEO
Provenance
| Field | Value |
|---|---|
| Source corpus | booteek-ai/fineweb2-bagaco2 (all config) |
| Upstream | duarteocarmo/fineweb2-bagaco2 → uonlp/CulturaX (pt split) filtered by duarteocarmo/fasttext-euptvid |
| Docs processed | 1,000,000 |
| Tokens processed | ~390 million |
| Extraction date | 2026-05-13 |
| Extractor | extract-pt-pt-corpus.py v2026-05-13-v2-all-1M |
| Output size | ~17 MB |
Schema
Five tables. Inspect provenance with SELECT key, value FROM meta.
unigrams
CREATE TABLE unigrams (
token TEXT PRIMARY KEY, -- surface form, accents preserved
count INTEGER NOT NULL, -- corpus frequency
doc_freq INTEGER NOT NULL,
pt_pt_score REAL -- avg ptpt_score from upstream
);
bigrams
CREATE TABLE bigrams (
token1 TEXT, token2 TEXT,
count INTEGER NOT NULL,
pmi REAL NOT NULL, -- pointwise mutual information, ≥ 3.0
PRIMARY KEY (token1, token2)
);
phrases
CREATE TABLE phrases (
phrase TEXT PRIMARY KEY,
length INTEGER NOT NULL, -- 3, 4, or 5
count INTEGER NOT NULL,
domain_hint TEXT -- optional: food | service | team | NULL
);
diagnostic_tokens
CREATE TABLE diagnostic_tokens (
token TEXT PRIMARY KEY,
variant TEXT NOT NULL, -- 'pt-PT' | 'pt-BR'
notes TEXT
);
Used at query-time to compute pt-PT confidence and detect pt-BR-isms.
meta
Extraction provenance (source dataset, doc count, token count, extracted_at, extractor_version, license, attribution chain).
Usage
Python
import sqlite3
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="booteek-ai/pt-pt-lexicon",
filename="pt-pt-corpus.sqlite",
repo_type="dataset",
)
db = sqlite3.connect(path)
# Top collocations for "vinho"
rows = db.execute(
"SELECT token2, count, pmi FROM bigrams WHERE token1=? ORDER BY pmi DESC LIMIT 5",
("vinho",),
).fetchall()
# → [('tinto', ...), ('branco', ...), ('verde', ...), ('porto', ...), ...]
TypeScript (via better-sqlite3)
booteek consumes this lexicon via src/lib/lexicon/pt-pt.ts. Surface API:
import {
getTopCollocations,
getCommonPhrases,
ptPtConfidence,
detectPtBrIsms,
} from '@/lib/lexicon/pt-pt';
getTopCollocations('vinho', 5);
// → ['vinho tinto', 'vinho branco', 'vinho do porto', ...]
ptPtConfidence('Apanho o autocarro e ponho a comida no frigorífico.');
// → 0.95 (high pt-PT confidence)
detectPtBrIsms('Vou pegar o ônibus.');
// → [{ token: 'ônibus', variant: 'pt-BR', ptPtAlternative: 'autocarro' }]
Re-extraction
The corpus is built from booteek-ai/fineweb2-bagaco2. See the extraction pipeline in
the booteek monorepo:
scripts/lexicon/extract-pt-pt-corpus.py.
# Full corpus extraction (1M docs, ~90 minutes against pre-cached parquet shards)
.venv/bin/python scripts/lexicon/extract-pt-pt-corpus.py \
--config all \
--max-docs 1000000 \
--min-bigram-pmi 4.0
License
MIT — preserved from the upstream
duarteocarmo/fineweb2-bagaco2
dataset card.
Attribution
Derived from the FineWeb2 Bagaço2 pt-PT slice maintained by Duarte O. Carmo (FOSDEM speaker, pt-PT NLP). Upstream corpus: CulturaX. pt-PT classifier: fasttext-euptvid.
Maintainer
booteek-ai on HuggingFace.
Booteek is Europe's first AI Visibility platform for independent restaurants and bars
(booteek.ai). The lexicon is open under MIT for any pt-PT
NLP work — not specific to hospitality.
- Downloads last month
- 38