ParlaIbero

Referencia

Las 34 herramientas

No hace falta llamar a las herramientas: lo hace el agente. Conocerlas ayuda a pedir con precisión y a leer lo que el agente hace. Cada ficha dice qué hace la herramienta, en qué estudio se usa, una petición de ejemplo y sus parámetros, con la descripción que lee el agente.

Los filtros comunes. Casi todas las herramientas de análisis aceptan los mismos: countries, library, date_from y date_to (un año, o una fecha completa), party, sex, speech_only (por defecto, solo el discurso), exclude_chair (sin quien preside) y max_turn_words (sin los turnos más largos, casi siempre documentos leídos).

En esta página
  1. 1Datos, cobertura y cita
  2. 2Frecuencias
  3. 3Grupos: quién habla y cómo
  4. 4Lectura
  5. 5Bibliotecas
  6. 6Redes
  7. 7Lectura de temas
  8. 8SQL, exportación y registro

Datos, cobertura y cita

list_countriesLos 16 conjuntos: DOI, versión, tamaño y si ya están descargados.

Lo que lee el agenteList the 16 ParlaIbero datasets: DOI, published version, size, and whether each one is already downloaded locally (with rows, sessions and date range).

Se usa en: Inicio § 2

Pide

¿Qué parlamentos hay y cuáles tengo ya descargados?

El agente usa list_countries

download_countryDescarga un país de Dataverse (con MD5) y lo carga en la base local.

Lo que lee el agenteDownload a country's dataset from Harvard Dataverse (MD5-verified) and load it into the local database. Skips files already current. Large countries (BR, MX, ES, PT, EC) are 1-1.5 GB: if the client times out, run `parlaibero-mcp download XX` in a terminal instead.

Pide

Descarga Uruguay y Paraguay.

El agente usa download_country

parámetrovalorqué hace
countrystringISO2 code (ES, MX, BR…) or country name
forceboolean = falseRe-download even if the local copy is current
import_from_folderCarga los CSV de ParlaIbero que bajaste a mano.

Lo que lee el agenteLoad ParlaIbero CSV files that were downloaded by hand from Dataverse.

Pide

Importa los CSV de Chile que tengo en ~/Descargas/chile.

El agente usa import_from_folder

parámetrovalorqué hace
folderstringFolder with {ISO}_interventions.csv (and optionally {ISO}_deputies.csv), or with one subfolder per country
coverageLa base de cada periodo: sesiones, palabras, vinculación, años que faltan o son finos.

Lo que lee el agenteData-quality check before interpreting a trend: sessions, rows, speech words, linked and sex-known shares per period, missing years and low-base periods, plus each corpus's linkage figures. Call it before comparing countries or reading peaks.

Se usa en: Inicio § 2

Pide

Antes de comparar Argentina, España, México y Uruguay en 2022 y 2023, dime qué base tiene cada año.

El agente usa coverage

parámetrovalorqué hace
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
byyear | legislature = "year"Period
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
describe_dataEl esquema de las tablas locales y consultas de ejemplo, para escribir SQL.

Lo que lee el agenteSchema of the local DuckDB tables, the countries loaded, and example queries.

Pide

¿Qué columnas tiene la tabla de intervenciones y qué otras tablas hay?

El agente usa describe_data

get_documentationLa documentación depositada con cada país: limitaciones, información del corpus, libro de códigos.

Lo que lee el agenteReturn a documentation file deposited with a country's dataset. Works before the data are downloaded (small files are fetched from Dataverse).

Pide

¿Qué limitaciones conocidas tiene el corpus de Paraguay?

El agente usa get_documentation

parámetrovalorqué hace
countrystringISO2 code (ES, MX, BR…) or country name
documentreadme | data_dictionary | known_limitations | process_report | corpus_info | match_methods | dataset_jsonld = "readme"readme (overview, sources, coverage) · data_dictionary (columns) · known_limitations (caveats) · process_report (how it was built) · corpus_info (machine-readable facts, linkage rates) · match_methods · dataset_jsonld (schema.org metadata)
languageen | es | pt = "en"Language of the markdown documents
how_to_citeLa cita y el DOI de la última versión de un país.

Lo que lee el agenteFormatted citation (latest published version) and DOI of a country's dataset.

Se usa en: Inicio § 5

Pide

Dame la cita del conjunto de Brasil para la bibliografía.

El agente usa how_to_cite

parámetrovalorqué hace
countrystringISO2 code (ES, MX, BR…) or country name

Frecuencias

ngram_viewerFrecuencia anual de palabras o frases, con la base de cada punto; dibuja SVG o HTML.

Lo que lee el agenteGoogle Books Ngram-style viewer: yearly frequency of one or more words or phrases, with the base behind every point (words, sessions) and low-base years flagged. Optionally writes the chart to an SVG or HTML file.

Se usa en: Feminicidio § 2, Feminicidio § 5

Pide

Dibuja «inflación» por millón de palabras en Argentina y Uruguay desde 1990.

El agente usa ngram_viewer

parámetrovalorqué hace
termsstringComma-separated series; '+' sums variants into one series ('corrupción+corrupção'); '*' ends a prefix ('democrati*'). Whole words, case- and accent-insensitive.
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
split_by_countryboolean = falseOne line per term × country instead of pooling the countries
measureper_million | count | interventions_pct = "per_million"per_million: occurrences per million words (comparable across years); count: raw occurrences; interventions_pct: % of interventions using the term
smoothinginteger = 0Centred moving average over ±N years (Google Ngram uses 3)
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
partystringParty label as an ILIKE pattern, e.g. 'PSOE' or '%Frente%'
sexM | FSpeaker's sex (linked deputies only)
speech_onlyboolean = trueOnly rows with dm_speech = 1 (recommended)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
chart_pathstringWrite a chart: '.svg' (static figure for papers and slides) or '.html' (page with hover, dark mode and data table). At most 8 series.
titlestring
languagees | en | pt = "es"Language of the chart labels
overwriteboolean = false
term_counterTotales de un término, por sexo y partido, y su primer y último uso en cada país.

Lo que lee el agenteCounter for one or more terms: occurrences, interventions, sessions, speakers, breakdown by sex and party (with per-million rates), and the FIRST and LAST use in each country, with the intervention id — when a term entered each chamber's vocabulary.

Se usa en: Feminicidio § 1, Pandemia § 1, Bibliotecas § 3

Pide

¿Cuándo se dijo por primera vez «inteligencia artificial» en cada parlamento?

El agente usa term_counter

parámetrovalorqué hace
termsstringComma-separated series; '+' sums variants into one series ('corrupción+corrupção'); '*' ends a prefix ('democrati*'). Whole words, case- and accent-insensitive.
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
partystringParty label as an ILIKE pattern, e.g. 'PSOE' or '%Frente%'
sexM | FSpeaker's sex (linked deputies only)
speech_onlyboolean = trueOnly rows with dm_speech = 1 (recommended)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
term_frequencyFrecuencia agrupada por año, país, legislatura, partido, sexo, orador o sesión.

Lo que lee el agenteHow often a term is used, grouped by year, decade, country, legislature, party, sex, speaker, session type or session: occurrences, interventions using it, total words and occurrences per million words. Same counting as ngram_viewer. by='session' lists the sessions where the term concentrates — a way to find the date of an event in each chamber.

Se usa en: Feminicidio § 3, Marcos § 4

Pide

¿En qué sesiones de Chile se usa más «pensiones»?

El agente usa term_frequency

parámetrovalorqué hace
patternstringWord or phrase; '+' sums variants, '*' ends a prefix
byyear | decade | country | legislature | party | sex | speaker | session_type | session = "year"Grouping dimension
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
partystringParty label as an ILIKE pattern, e.g. 'PSOE' or '%Frente%'
sexM | FSpeaker's sex (linked deputies only)
speech_onlyboolean = trueOnly rows with dm_speech = 1 (recommended)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
max_rowsinteger = 300

Grupos: quién habla y cómo

share_of_voiceCuánto habla cada grupo frente a su peso en el registro de diputados.

Lo que lee el agenteHow much each group speaks compared with its weight in the chamber: share of words (or turns) and of speakers among linked deputies, against the group's share of members on the register in that period, and their ratio (>1 = speaks more than its weight).

Se usa en: Pandemia § 5, Voz y escaños § 1, Voz y escaños § 2, Voz y escaños § 3, Voz y escaños § 5

Pide

Por legislatura, ¿hablan las diputadas de Costa Rica en proporción a su peso?

El agente usa share_of_voice

parámetrovalorqué hace
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
bysex | party = "sex"Group to compare
perlegislature | year | all = "legislature"Period
unitwords | turns = "words"Measure of voice
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
distinctive_wordsLas palabras que más separan dos grupos (log-odds ponderado).

Lo que lee el agenteWords that most distinguish group A from group B (weighted log-odds with an informative Dirichlet prior, Monroe et al. 2008): e.g. women vs men deputies, one party vs another, one period vs another, a library vs the rest of its chambers. Compare within one language.

Se usa en: Pandemia § 4, Voz y escaños § 3, Voz y escaños § 4, Marcos § 3, Bibliotecas § 8

Pide

¿Qué palabras distinguen al Frente Amplio del Partido Nacional en Uruguay desde 2020?

El agente usa distinctive_words

parámetrovalorqué hace
fieldsex | party | period | country | id_dep | libraryWhat separates the two groups
astringGroup A: 'F', a party label, a period '2000-2010', an ISO2 code, an id_dep or a library name
bstringGroup B, same kind as A; omit for 'everyone else'
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
topinteger = 30
min_countinteger = 20

Lectura

kwicConcordancias: el término con su contexto, para leer.

Lo que lee el agenteKeyword in context: concordance lines (left context · match · right context) from a sample of the interventions that use the term, for close reading.

Se usa en: Pandemia § 1, Marcos § 4, Bibliotecas § 3, Bibliotecas § 5, Bibliotecas § 8

Pide

Enséñame diez usos de «seguridad ciudadana» en Ecuador, al azar.

El agente usa kwic

parámetrovalorqué hace
patternstringWord or phrase ('*' ends a prefix), or RE2 regex if regex=true
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
regexboolean = false
whole_wordboolean = true
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
partystringParty label as an ILIKE pattern, e.g. 'PSOE' or '%Frente%'
sexM | FSpeaker's sex (linked deputies only)
ninteger = 40Interventions to sample
widthinteger = 70Characters of context on each side
orderrandom | newest | oldest = "random"random gives a representative sample (reproducible with seed)
seedinteger = 1
collocationsLas palabras que rodean a un término más de lo esperado (log-verosimilitud).

Lo que lee el agenteWords that keep company with a term: over-represented within ±window tokens of it (Dunning log-likelihood). Run with different dates to see how a term's associations shift.

Se usa en: Feminicidio § 6, Marcos § 4

Pide

¿Qué palabras acompañan a «migrantes» en Panamá antes y después de 2018?

El agente usa collocations

parámetrovalorqué hace
patternstringWord or phrase ('*' ends a prefix)
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
partystringParty label as an ILIKE pattern, e.g. 'PSOE' or '%Frente%'
sexM | FSpeaker's sex (linked deputies only)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
windowinteger = 5Tokens on each side
topinteger = 30
min_countinteger = 5
sampleinteger = 5000Interventions sampled
exclude_stopwordsboolean = true
search_textBusca intervenciones con una palabra, frase o expresión regular, con un fragmento.

Lo que lee el agenteFind interventions containing a word, phrase or regex, newest first, with a snippet around the first match and the total number of matching rows. Plain searches ignore case and accents ('nacion' finds 'Nación').

Pide

Busca las intervenciones de Guatemala que mencionan «Ley de Competencia».

El agente usa search_text

parámetrovalorqué hace
patternstringWord or phrase (or RE2 regular expression if regex=true)
countriesarrayISO2 codes to restrict to; omit for every downloaded country
librarystringName of a library (see library_describe): only its interventions; countries default to the library's
regexboolean = false
whole_wordboolean = falsePlain searches: match whole words only
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
partystringParty label as an ILIKE pattern, e.g. 'PSOE' or '%Frente%'
sexM | FSpeaker's sex (linked deputies only)
id_depstring
speech_onlyboolean = trueOnly rows with dm_speech = 1 (recommended)
limitinteger = 20
offsetinteger = 0
get_interventionEl texto completo de una intervención y, si quieres, los turnos de alrededor.

Lo que lee el agenteFull text and metadata of one intervention, optionally with surrounding turns.

Pide

Léeme entera la intervención de Perú que más veces dice «feminicidio», con los dos turnos anteriores.

El agente usa get_intervention

parámetrovalorqué hace
id_intstringIntervention id, e.g. ES0140012300045
contextinteger = 0Also return N turns before and after
get_sessionLos turnos de una sesión, en orden: quién habla, cuánto y cómo empieza.

Lo que lee el agenteMetadata and the ordered list of turns of a session (speaker, party, words, first words of each turn, or the full text).

Se usa en: Feminicidio § 3

Pide

¿Qué se debatió en la sesión UY0070168?

El agente usa get_session

parámetrovalorqué hace
id_sessionstringSession id, e.g. ES0140012
include_textboolean = falseFull text of every turn (can be long)
max_rowsinteger = 300

Bibliotecas

library_createGuarda un subconjunto (un tema, un periodo, un grupo) de uno o varios países.

Lo que lee el agenteCreate a library: a named, saved subset of interventions — on a topic, in a period, of a group — from one or SEVERAL countries, for focused and comparative analysis. Each country gets its own definition (terms, filters, time window), recorded with the edition of the data. Returns the description of what was gathered (see library_describe). Then pass library=<name> to any analysis tool. Equivalent terms across countries are the user's claim: say so when reporting.

Se usa en: Pandemia § 3, Marcos § 1, Bibliotecas § 4, Bibliotecas § 6, Bibliotecas § 9

Pide

Crea una biblioteca con las intervenciones sobre agua de Chile, Perú y México desde 2015.

El agente usa library_create

parámetrovalorqué hace
namestringLibrary name (case-insensitive)
countriesarrayISO2 codes of the chambers it takes (one or several)
termsstringAn intervention enters if it uses ANY of these: comma- or '+'-separated, '*' ends a prefix, whole words, case- and accent-insensitive. Give Spanish AND Portuguese forms when BR or PT are in ('corrupción+corrupção')
regexboolean = falseterms is one RE2 regular expression
min_occurrencesinteger = 1Times the terms must appear in the intervention: 2-3 keeps those that DISCUSS the topic, not those that mention it
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
partystringParty label as an ILIKE pattern, e.g. 'PSOE' or '%Frente%'
sexM | FSpeaker's sex (linked deputies only)
id_depstring
speech_onlyboolean = trueOnly rows with dm_speech = 1 (recommended)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
event_datesobjectAlign on an event: {ISO2: 'YYYY-MM-DD'} per country; each country's window becomes event − days_before … event + days_after (stored as plain dates). To find the dates: term_counter (first use per chamber) or term_frequency(by='session')
days_beforeinteger = 0
days_afterinteger = 0
per_countryobjectPer-country overrides of the settings above, e.g. {'BR': {'terms': 'aborto+interrupção da gravidez'}, 'ES': {'date_from': '2010'}}
labelstringCommon concept the parts share ('abortion'), recorded in every country's definition
descriptionstring
colorstring = "indigo"Colour in the explorer
extendboolean = falseAdd to an existing library of that name instead of failing
library_describeQué hay en una biblioteca, país por país, con avisos para comparar.

Lo que lee el agenteWhat is in a library, per country: interventions, sessions, dates, speakers, words, linkage, share of the chair and of very long turns, years too thin to read as trends, the definitions and the data edition — with warnings for comparing countries. Call it before analysing.

Se usa en: Pandemia § 3, Bibliotecas § 5, Bibliotecas § 7

Pide

Antes de comparar, descríbeme la biblioteca «agua».

El agente usa library_describe

parámetrovalorqué hace
namestringLibrary name; omit to list every library
library_editAñade o quita intervenciones a mano, o les pone notas y etiquetas.

Lo que lee el agenteRefine a library by hand: add or remove interventions, or attach a note and tags to one. Removed interventions stay excluded when the library is rebuilt from its definitions.

Se usa en: Bibliotecas § 7

Pide

Quita de «agua» las intervenciones que solo leen el orden del día.

El agente usa library_edit

parámetrovalorqué hace
namestringLibrary name (case-insensitive)
actionadd | remove | noteadd / remove interventions (by id_ints or by a query), or note one (note and/or tags)
id_intsarrayIntervention ids
sqlstringadd/remove: a read-only SELECT returning a column id_int, e.g. after reading kwic or search_text results
notestringnote: text attached to the intervention (id_ints[0])
tagsarraynote: tags attached to the intervention
library_combineUne, cruza o resta dos bibliotecas.

Lo que lee el agenteA new library from two existing ones (notes and tags travel with the interventions).

Se usa en: Bibliotecas § 4, Bibliotecas § 9

Pide

Haz una biblioteca con lo que está en «agua» y también en «minería».

El agente usa library_combine

parámetrovalorqué hace
namestringName of the NEW library
astringLibrary name (case-insensitive)
bstringLibrary name (case-insensitive)
opunion | intersection | differenceunion (in either), intersection (in both), difference (in a, not in b)
descriptionstring
library_exportExporta una biblioteca al Diarios Explorer: un archivo por país y un índice.

Lo que lee el agenteExport for the Diarios Explorer: one .2replib per country (the explorer holds one country at a time) plus an index (.parlaibero-biblioteca.json) that library_import uses to rebuild the whole comparative library. Each file must be imported in the explorer with ITS country's CSV loaded.

Se usa en: Bibliotecas § 10, Inicio § 5

Pide

Exporta «pandemia» para abrirla en el Diarios Explorer.

El agente usa library_export

parámetrovalorqué hace
namestringLibrary name (case-insensitive)
folderstringDestination folder (absolute, or relative to the client's working directory)
table_formatcsv | parquetAlso write every intervention of the library with its metadata, note and tags
overwriteboolean = false
library_importTrae al MCP las bibliotecas hechas en el Diarios Explorer.

Lo que lee el agenteBring libraries made in the Diarios Explorer into the MCP — several countries' files become one comparative library. Every item is checked against the loaded data (row → intervention, then its date and speaker); whatever does not match is reported, not translated silently.

Pide

Importa las bibliotecas que guardé en ~/explorer como una sola, «educación».

El agente usa library_import

parámetrovalorqué hace
pathsarray.2replib files exported by the explorer (one per country), an index .parlaibero-biblioteca.json, or a folder
namestringName of the new library (default: the one in the files)
forceboolean = falseImport even when the files were written on another version of the data (only items whose date and speaker still match)
library_rebuildRehace una biblioteca sobre una edición nueva de los datos.

Lo que lee el agenteAfter downloading a new edition of a country: rebuild the library on it. Definitions run again; interventions added by hand, combined or imported, and their notes, are found again by their text; exclusions are kept. Reports what came in and what was lost, per country.

Se usa en: Bibliotecas § 10

Pide

He descargado la nueva versión de Perú: reconstruye «pandemia».

El agente usa library_rebuild

parámetrovalorqué hace
namestringLibrary name (case-insensitive)
library_deleteBorra una biblioteca (los datos no se tocan); sin confirmar, solo avisa.

Lo que lee el agenteDelete a library (only the library: the data are not touched). Without confirm=true it only says what would be deleted.

Se usa en: Bibliotecas § 10

Pide

Borra la biblioteca «pruebas».

El agente usa library_delete

parámetrovalorqué hace
namestringLibrary name (case-insensitive)
confirmboolean = falseMust be true: deleting cannot be undone

Redes

cooccurrence_networkRed de palabras de una biblioteca y sus temas: sus palabras características que aparecen juntas, agrupadas con Leiden.

Lo que lee el agenteNetwork of WORDS of a library and its themes: the library's characteristic words and expressions (its lexicon against the rest of the country's corpus), joined when they occur in the same intervention (or fragment) more than chance (signed G², each term's k strongest neighbours, weight = observed/expected), clustered by Leiden into themes. Per theme: terms, coverage, words of the parties (per 1,000 of their words) and the interventions to read first. The Diarios Explorer's method, ported and tested against its code. Writes an interactive HTML, CSV, JSON and a summary. One network per country. Not for people or institutions (comention_network) nor for who names whom (mention_network).

Se usa en: Marcos § 2

Pide

¿De qué temas se habló en la biblioteca «agua» de Chile y qué partidos los usan más?

El agente usa cooccurrence_network

parámetrovalorqué hace
librarystringLibrary name (the network is built on its interventions)
vocabularyinteger = 250Terms of the library's lexicon used as nodes (the most over-used against the rest of the corpus)
unitintervention | fragment = "intervention"Unit of context: the whole intervention, or consecutive fragments of `fragment` tokens
fragmentinteger = 20
neighboursinteger = 10Each term keeps its k strongest edges (by G²)
resolutionnumber = 1.0Leiden resolution γ: higher, more and smaller themes (0.6 / 1 / 1.6 in the explorer)
seedinteger = 1
excludearrayTerms to leave out after reading the themes (any case or accents)
expressionsboolean = trueJoin the corpus's multi-word expressions ('reforma da previdência') into one node (tables of the Diarios Explorer, downloaded once and checked against the loaded dataset)
speech_onlyboolean = trueLeave out stage directions in brackets and upper-case lines (vote lists, headers)
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
output_dirstringABSOLUTE folder for the files
formatsarrayFiles to write in output_dir (default all four)
overwriteboolean = false
max_node_sizenumber = 12Largest node radius in the page, in px on screen (nodes keep their size when zooming); the page has a control
max_edge_widthnumber = 1.5Widest line in the page, in px (lines stay thin: weights are read in the tooltips and tables)
layoutforce | clusters | rings = "force"Layout the page opens with (it can be switched there): 'force'; 'clusters', each group (theme, community, party) as a separate disc, kept apart; 'rings', the Diarios Explorer's centrifugal layout: rings by number of connections (the most connected in the centre), sectors by group
entitiesarrayNot accepted: this network finds its words itself. Actors go to comention_network
comention_networkRed de actores mencionados en la misma intervención, con el sesgo de cada uno entre dos grupos.

Lo que lee el agenteNetwork of ACTORS (people and institutions) mentioned in the same intervention of a library: co (volume), NPMI (affinity), Jaccard, counts by group and each actor's bias between two groups, Leiden communities, centralities, examples (KWIC) and ambiguity warnings. Writes an interactive HTML (light/ dark, accessible, with tables), CSV, JSON and a summary. One network per country. Without `entities` it proposes candidates (proper names, acronyms) and builds nothing until you confirm them. Words and ideas are not actors: their network is cooccurrence_network.

Se usa en: Marcos § 5

Pide

¿Qué instituciones se mencionan juntas en «agua» y cuáles nombra más la oposición?

El agente usa comention_network

parámetrovalorqué hace
librarystringLibrary name (the network is built on its interventions)
entitiesarrayActors [{name, type: persona|institucion, pattern, exclude?}]: people and institutions only (words and ideas are cooccurrence_network's nodes). pattern and exclude are regular expressions (RE2: no look-arounds) over lower-case, accent-free text, e.g. '\bsupremo tribunal|\bstf\b'. A match inside `exclude`, or inside a LONGER match of another actor, does not count ('maria pereira' is not 'pereira'). Omit to get candidates first.
groupsobjectUp to two contrast groups of labels of `group_by`, e.g. {'left': ['PT', 'PSOL'], 'right': ['PL']}; every other label is 'rest'. Case-insensitive. No default: the classification is yours
group_bystring = "party"Column the group labels refer to (party, sex…)
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
min_cointegerMinimum interventions together; default max(5, N/120), reported
min_npminumber = 0.1Minimum NPMI (unrounded)
max_nodesinteger = 60
max_entitiesinteger = 150
kwic_per_entityinteger = 5
seedinteger = 1
pooledboolean = falseOne network for all the library's countries instead of one per country
output_dirstringABSOLUTE folder for the files
formatsarrayFiles to write in output_dir (default all four)
overwriteboolean = false
max_node_sizenumber = 12Largest node radius in the page, in px on screen (nodes keep their size when zooming); the page has a control
max_edge_widthnumber = 1.5Widest line in the page, in px (lines stay thin: weights are read in the tooltips and tables)
layoutforce | clusters | rings = "force"Layout the page opens with (it can be switched there): 'force'; 'clusters', each group (theme, community, party) as a separate disc, kept apart; 'rings', the Diarios Explorer's centrifugal layout: rings by number of connections (the most connected in the centre), sectors by group
mention_networkQuién nombra a quién en el pleno: diputados y actores externos que declares.

Lo que lee el agenteDirected network of who mentions whom in a library: an arrow speaker → deputy (or external actor) counts the speaker's interventions that name them. Names come from the deputies register (in office on the day), by full name anywhere or by surname after a title; homonyms are resolved by the title's gender and the party written next to the name, otherwise listed apart (never guessed). The record's notes in brackets are not counted. Gives in/out strength, PageRank, reciprocity, Leiden communities, a group → group matrix, E-I and asymmetric pairs, and writes an interactive HTML (network and heat map, with tables), CSV, JSON and a summary. One network per country.

Se usa en: Marcos § 6

Pide

En «agua», ¿a quién nombran el oficialismo y la oposición? Declara a la ministra del ramo como actor externo.

El agente usa mention_network

parámetrovalorqué hace
librarystringLibrary name (the network is built on its interventions)
target_scopespeakers | external | both = "both"Who can be mentioned: deputies of the chamber, the external actors given, or both
external_actorsarrayPeople or bodies outside the chamber to count as targets: [{name, aliases: [...], role}]. They are matched first, by any alias, so declaring a homonym of a deputy (a minister, a former adviser) also keeps it from being taken for the deputy
mention_kindsarray'reference' = talking ABOUT someone (default); 'address' = speaking TO them
groupsobjectUp to two contrast groups of labels of `group_by`, e.g. {'left': ['PT', 'PSOL'], 'right': ['PL']}; every other label is 'rest'. Case-insensitive. No default: the classification is yours
group_bystring = "party"Column the group labels refer to (party, sex…)
date_fromstringYYYY or YYYY-MM-DD
date_tostringYYYY or YYYY-MM-DD (inclusive)
exclude_chairboolean = falseLeave out the presiding officer's turns (procedural speech: giving the floor, calling votes)
max_turn_wordsintegerLeave out turns longer than this many words — mostly documents read into the record; 10000 is a sensible check
min_mentionsinteger = 2Minimum interventions per directed edge
min_speakersinteger = 1Minimum distinct speakers mentioning a target
top_ninteger = 60People kept, by total strength
honorificsbooleanWhether 'señor/senhor X' alone counts as naming the deputy X. Default by language, as measured: yes in Spanish, no in Portuguese (in Brazil it names ministers, judges and former presidents as often as members)
seedinteger = 1
validation_sampleinteger = 0Write a random sample of N resolved mentions to check by hand
output_dirstringABSOLUTE folder for the files
formatsarrayFiles to write in output_dir (default all four)
overwriteboolean = false
max_node_sizenumber = 12Largest node radius in the page, in px on screen (nodes keep their size when zooming); the page has a control
max_edge_widthnumber = 1.5Widest line in the page, in px (lines stay thin: weights are read in the tooltips and tables)
layoutforce | clusters | rings = "force"Layout the page opens with (it can be switched there): 'force'; 'clusters', each group (theme, community, party) as a separate disc, kept apart; 'rings', the Diarios Explorer's centrifugal layout: rings by number of connections (the most connected in the centre), sectors by group

Lectura de temas

theme_dossierLa evidencia para leer cada tema de una red de palabras: quién lo sostiene, su perfil por año, las palabras de cada grupo dentro del tema, su estabilidad y pasajes del acta. Escribe una plantilla de codebook.

Lo que lee el agenteThe evidence to READ the themes of a word network, so that a theme is more than a list of words. It rebuilds what the network read and proves it (every theme's interventions equal the file's), then gives per theme: core and bridge terms, links to other themes, who sustains it (speakers, sessions: a theme held by one debate is an episode), its profile by year, the words each group says more inside it (a first hint of frames), its stability when Leiden is re-run, and a reading sample stratified by group and year with passages cut from the record. Writes the dossier (JSON, Markdown) and a codebook template; read each theme with theme=k, fill the codebook (verdict, label, definition, anchors with verbatim quotes, frames with stance) and check it with check_codebook. Method: parlaibero://methods/networks § 4.

Pide

Prepara la lectura de los temas de la red de «agua» de Chile, por partido, y enséñame el dossier del tema 2.

El agente usa theme_dossier

parámetrovalorqué hace
networkstringABSOLUTE path of the <library>_words.json that cooccurrence_network wrote (one per country)
themeintegerA theme's number, as in the page: its full dossier, with the reading sample and its passages. Omit for the overview of all themes (and the files)
sampleinteger = 10Interventions per theme in the reading sample, one per group and year in turn, after the 3 the network ranks first
passagesinteger = 2Passages per intervention, around the densest clusters of the theme's words
windowinteger = 40Words on each side of the theme's words
group_bystring = "party"Column of the groups compared inside each theme (party, sex…)
stability_runsinteger = 20Leiden re-runs with other seeds on the saved graph
seedinteger = 1Seed of the reading sample
output_dirstringABSOLUTE folder; default the network file's
overwriteboolean = false
check_codebookComprueba literalmente contra el acta las citas del codebook que escribe el agente, y saca una muestra ciega para medir su acuerdo con una persona (κ de Cohen).

Lo que lee el agenteChecks a codebook of themes and frames written after reading theme_dossier: its schema and theme numbers, and every anchor against the record (the id exists and is in the library; the quote appears verbatim; it holds the theme's words). Writes a blind sample of passages (no group, no theme) with two empty coding files, one for a person and one for the agent, who codes in a fresh context without the key or the dossier; with both filled (human=, agent=) it gives their agreement (Cohen's κ) and each theme's and frame's share of the coded passages, overall and by group, with Wilson intervals. Method: parlaibero://methods/networks § 4.

Pide

Comprueba el codebook de «agua» y prepárame la muestra ciega de 60 pasajes para codificarla.

El agente usa check_codebook

parámetrovalorqué hace
codebookstringABSOLUTE path of the codebook that theme_dossier wrote, filled
sample_sizeinteger = 60Passages in the blind sample to code, allocated to the groups in proportion to their size
seedinteger = 1Seed of the sample: the same seed draws the same sample
humanstringABSOLUTE path of the sample coded by a person
agentstringABSOLUTE path of the same sample coded by the agent
group_bystring = "party"Column of the groups (party, sex…)
output_dirstringABSOLUTE folder; default the codebook's
overwriteboolean = falseReplace the sample and coding files (they may hold codes)
theme_reportEl informe que interpreta los temas para quien investiga, en .md y .html: el agente escribe el texto y el motor pone las cifras, vuelve a comprobar las citas y dibuja tres figuras con sus tablas.

Lo que lee el agenteThe last step of reading a word network's themes: a report that interprets them for the researcher. Without `report` it writes a spec template (JSON) listing the quotable anchors and every figure as a placeholder; you write the interpretation in it (title, lede, findings, a paragraph after each figure, the themes in blocks with their frames and quotes, caveats, next steps). With `report` it checks the spec (every figure is a placeholder the engine fills, every quote an anchor of the codebook found verbatim in the record now, every codable theme in the report once; bare numbers, missing caveats and names are warned) and, without errors, writes the report as Markdown and HTML (three figures with their tables, the seat of every quote, what is measured and what is reading, the method and the citation) and a _check.json. It refuses a codebook with merge or split verdicts or a network that no longer matches. No language model runs here: the prose is yours. Method: parlaibero://methods/networks § 4.

Pide

Escribe el informe de los temas de «agua»: qué es cada tema, cuánto pesa, en qué años y partidos, y cómo se argumenta, con citas.

El agente usa theme_report

parámetrovalorqué hace
codebookstringABSOLUTE path of the filled codebook (checked with check_codebook)
reportstringABSOLUTE path of the report spec with your interpretation. Omit it to write the spec template next to the codebook
group_bystring = "party"Column of the groups in the figures (party, sex…); a spec keeps its own
languagees | pt | enLanguage of the report; default the country's
output_dirstringABSOLUTE folder; default the codebook's (template) or the spec's (report)
overwriteboolean = falseReplace the spec template (it may hold your text)

SQL, exportación y registro

query_sqlSQL de solo lectura (DuckDB) para todo lo que no hace otra herramienta.

Lo que lee el agenteRun a read-only SQL query (DuckDB dialect). The connection cannot write, read other files or reach the network.

Se usa en: Feminicidio § 4, Pandemia § 1, Pandemia § 2, Voz y escaños § 2, Voz y escaños § 3, Voz y escaños § 4, Marcos § 1, Bibliotecas § 7, Bibliotecas § 8, Bibliotecas § 9

Pide

¿Cuántas sesiones celebró cada parlamento cada año desde 2015?

El agente usa query_sql

parámetrovalorqué hace
sqlstringDuckDB SQL over the tables in describe_data
max_rowsinteger = 200
max_cell_charsinteger = 1000Truncate long text cells
timeout_sinteger = 120
export_resultGuarda el resultado de una consulta en CSV o Parquet para R, Python o Stata.

Lo que lee el agenteSave the full result of a query to CSV or Parquet, to continue in R, Python or Stata. Only the destination folder can be written (or read); nothing else on disk is reachable.

Se usa en: Inicio § 5

Pide

Guarda esa tabla en Parquet en ~/proyecto/datos.

El agente usa export_result

parámetrovalorqué hace
sqlstringOne SELECT over the tables in describe_data
pathstringOutput file, .csv or .parquet (absolute, or relative to the client's working directory)
formatcsv | parquetDefaults to the extension
overwriteboolean = false
query_logLo que se ha ejecutado, con parámetros y versiones; escribe un apéndice de métodos.

Lo que lee el agenteThe analyses run so far (tool, parameters, dataset versions), for reproducibility. Can write a methods appendix ready to adapt.

Se usa en: Inicio § 5

Pide

Escribe el apéndice de métodos de lo que hemos hecho hoy.

El agente usa query_log

parámetrovalorqué hace
lastinteger = 50
methods_pathstringAlso write a Markdown methods note (datasets with DOI and version + every analysis run)
overwriteboolean = false