Skip to main content

Module frame

Module frame 

Source
Expand description

Frame semantics — basic frame element identification.

A small built-in frame lexicon (BUY, TRANSFER) is matched against lexical triggers (e.g. “bought”, “gave”). When a trigger fires, the surrounding clause is scanned for role fillers using shallow syntactic cues (prepositions “from”/“to”, subject/object position). All extracted elements carry exact byte-span provenance.

Deterministic, WASM-compatible, no LLM.

Structs§

FrameElement
One frame element: a role label and the text filling it, with provenance.
FrameInstance
One instantiated frame (a trigger + its filled elements).

Functions§

extract_frames
Extract frame instances from text.