luplo.core.extract

Decision extraction from transcripts.

v0.5: stub only — returns empty results. The interface is stable; LLM integration (Claude API) will be swapped in post-v0.5.

Submodules

Functions

extract_decisions(→ list[luplo.core.models.ItemCreate])

Extract structured decisions from a conversation transcript.

extract_glossary_candidates(→ list[tuple[str, str]])

Extract glossary term candidates from text.

Package Contents

async luplo.core.extract.extract_decisions(text: str, *, project_id: str, actor_id: str, work_unit_id: str | None = None) list[luplo.core.models.ItemCreate]

Extract structured decisions from a conversation transcript.

Scans text for decision-like statements and returns ItemCreate objects ready for insertion. The caller (MCP tool or worker) handles the actual create_item calls.

Parameters:
  • text – Raw transcript or conversation text.

  • project_id – Project to scope the extracted items to.

  • actor_id – Actor who authored the transcript.

  • work_unit_id – Optional work unit to attach items to.

Returns:

always returns [].**

Return type:

List of ItemCreate objects. **v0.5

async luplo.core.extract.extract_glossary_candidates(text: str, *, project_id: str) list[tuple[str, str]]

Extract glossary term candidates from text.

Returns (surface_form, context_snippet) pairs. The worker feeds these into the glossary strict-first pipeline for normalisation, matching, and human curation.

Parameters:
  • text – Source text to extract terms from.

  • project_id – Project scope (for future filtering).

Returns:

always returns [].**

Return type:

List of (surface, context) tuples. **v0.5