Natural Language Systems

Parsing human intent from unstructured text.

Research into temporal understanding, structured command extraction and natural language interfaces built specifically for Brazilian Portuguese.

Portuguese natural language phrases being parsed into structured data objects by a neural network

Temporal parsing

Converting free-form date and time expressions into structured data.

Brazilian Portuguese

Grammar, slang and cultural context of Brazilian speech.

Recurrence models

Detecting and encoding recurring patterns in natural language.

Intent detection

Classifying tasks, events, deadlines and notes from context.

Multi-task extraction

Splitting and resolving multiple intents from a single input.

Open source

Published as an open library on GitHub under MIT license.

Domini Industries Research
Natural Language Processing · Temporal Reasoning
Research Note · 002

Temporal parsing for Brazilian Portuguese

brazilian-temporal-parser investigates whether a rule-based natural language system can reliably transform free-form Brazilian Portuguese text into structured temporal objects — without relying on large language models or cloud inference.

brazilian-temporal-parser TypeScript · Node.js · date-fns September 7, 2026 Alpha · Active development

Abstract

Most temporal parsing libraries are built around English grammar and calendar conventions. Brazilian Portuguese introduces distinct challenges: relative anchors such as daqui a 2 semanas, fuzzy time idioms such as depois do almoço, recurrence patterns such as quinzenalmente, and list formats that share a single date context across multiple items. This library is a first attempt at addressing those challenges with deterministic, testable rule sets that produce structured objects suitable for calendars, task managers and scheduling applications.

00 Current status

Alpha. APIs will change.

The library is in active development. Core parsing is functional and the public API is usable, but coverage is incomplete and edge cases remain unhandled. Production use is at your own risk.

Active
Core temporal engine is running.

Date, time, and recurrence parsing are implemented and produce structured output for the majority of common Brazilian Portuguese patterns.

Active
Multi-task extraction is available.

parseMultiple can split list-format inputs and inherit a shared date context across all items in a block.

Pending
Test coverage is incomplete.

Adversarial inputs and regional slang variations have not yet been systematically catalogued or benchmarked.

Pending
Stable API is not yet declared.

Method signatures and output shapes may change before 1.0 is reached.

01 Design

Rule-based, not model-based.

The parser operates through a pipeline of pattern matchers applied sequentially to input text. Each matcher is responsible for a specific category of expression: explicit dates, relative anchors, weekday references, fuzzy times, and recurrence signals.

Parsing pipeline
Raw text → Normalizer → Date extractor → Time extractor → Recurrence detector → Intent classifier → Structured object

The explicit choice to avoid language model inference means the parser is fully deterministic, runs offline, has predictable latency, and produces no API costs. The tradeoff is that novel phrasings not covered by existing rules will fail silently or return low-confidence output.

Confidence scores are surfaced on every result so that callers can decide whether to accept, prompt for clarification, or fall back to a manual input path.

02 API surface

Three entry points.

The library exposes three parsing modes. parseAuto is the recommended entry point for most callers; it detects whether the input contains a single expression or a multi-item block and routes accordingly.

// Single expression — recommended
const result = BrazilianTemporalParser.parseAuto(
  'Pagar fatura dia 15/12'
);
// → { type: 'task', title: 'Pagar fatura',
//     startDate: '2025-12-15', confidence: 0.9 }

// Explicit single parse
const event = BrazilianTemporalParser.parse(
  'Reunião amanhã às 14h'
);
// → { title: 'Reunião', type: 'event',
//     startDate: '2025-11-28', startTime: '14:00',
//     confidence: 0.95 }

// Multi-task extraction
const multi = BrazilianTemporalParser.parseMultiple(`
SEGUNDA-FEIRA:
- Academia
- Estudar Inglês
- Comprar pão
`);
// → { hasMultipleTasks: true,
//     items: [ … ] }

Installation requires npm install brazilian-temporal-parser date-fns. The library is written in TypeScript and ships type definitions.

parseAuto(text) parse(text) parseMultiple(text) confidence: 0–1 TypeScript MIT
03 Coverage

What the parser handles today.

The current rule set addresses the most common patterns in Brazilian scheduling language. Each category is implemented with its own matcher and contributes to the final structured output.

Implemented
Relative date anchors.

hoje, amanhã, depois de amanhã, daqui a N dias / semanas / meses resolve against the current date at parse time.

Implemented
Weekday references.

próxima segunda, essa sexta, and bare weekday names resolve to the nearest occurrence in the appropriate direction.

Implemented
Explicit dates.

15/12, 15/12/2025 and written-out forms such as 15 de dezembro are parsed with year inference for partial inputs.

Implemented
Time expressions.

Exact times (14h30, 14:30), fuzzy anchors (depois do almoço, final da tarde, à noite), and time ranges are recognized.

Implemented
Recurrence patterns.

toda sexta, quinzenalmente, a cada 3 dias, mensalmente and similar forms produce a structured recurrence descriptor.

Implemented
Intent classification.

Output type is inferred from context keywords: tarefa, reunião, prazo, lembrete influence whether the result is classified as a task, event, deadline or note.

Planned
Regional and informal variants.

Coverage for informal contractions, regional dialects and voice-to-text artifacts is not yet systematic.

04 Open questions

Problems not yet solved.

Temporal parsing in natural language remains a hard problem because language is ambiguous and usage evolves. Several questions remain open in this research.

Ambiguity
Anaphora and reference resolution.

Inputs such as na próxima semana, terça e quinta require tracking that the weekdays inherit the “next week” anchor from the preceding clause. This is not yet handled reliably across all forms.

Accuracy
Confidence calibration.

The confidence score is currently heuristic. No empirical calibration against a labelled corpus has been performed to verify that a score of 0.9 actually correlates with 90% precision.

Coverage
Voice-to-text artifacts.

Transcription errors and filler words common in spoken Brazilian Portuguese are not currently normalized before parsing.

Scope
Negation and cancellation.

Expressions such as não vai mais ter reunião sexta or cancela o compromisso de amanhã require negative intent detection that is not yet implemented.

This library is an alpha research artifact. No claim of production reliability or complete coverage is made.

05 Evidence

What has been demonstrated.

7 distinct temporal expression categories handled by the current rule set
3 public API entry points — parseAuto, parse, parseMultiple
0ms external API latency — fully offline, no cloud inference required
MIT open-source license — free to use, modify and distribute

Updates

Research Research page published on dominiindustries.com.
Open source Repository published on GitHub — alpha release with core parsing engine.
Feature Multi-task extraction added — parseMultiple with list context inheritance.
Foundation Initial temporal parsing pipeline for dates, times and recurrence patterns.