glazing.verbnet.gl_models¶
Generative Lexicon semantic models.
gl_models
¶
VerbNet Generative Lexicon (GL) models.
This module implements VerbNet-GL extensions that enhance VerbNet with Generative Lexicon features including event structure, qualia, and opposition structures for deeper semantic representations.
| CLASS | DESCRIPTION |
|---|---|
GLVerbClass |
VerbNet class with Generative Lexicon features. |
GLFrame |
Frame with GL event structure and qualia. |
Subcategorization |
GL subcategorization with variable assignments. |
SubcatMember |
Subcategorization member with variable. |
EventStructure |
Temporal event decomposition. |
Event |
Single event in event structure. |
Subevent |
Subevent with temporal relations. |
Qualia |
Qualia structure for frame semantics. |
Opposition |
Semantic opposition structure. |
State |
State in opposition structure. |
Examples:
>>> from glazing.verbnet.gl_models import GLVerbClass, GLFrame
>>> gl_class = GLVerbClass(
... verb_class=verb_class,
... gl_frames=[]
... )
Classes¶
Event
pydantic-model
¶
Bases: GlazingBaseModel
Single event in event structure.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
Event identifier (e.g., "e1", "e2").
TYPE:
|
type |
Event type (e.g., "process", "state", "transition").
TYPE:
|
participants |
Mapping from roles to variables.
TYPE:
|
Examples:
>>> event = Event(
... id="e1",
... type="process",
... participants={"Agent": "x", "Theme": "y"}
... )
Fields:
-
id(str) -
type(EventType) -
participants(dict[str, str])
EventStructure
pydantic-model
¶
Bases: GlazingBaseModel
Temporal event decomposition.
| ATTRIBUTE | DESCRIPTION |
|---|---|
events |
List of events.
TYPE:
|
subevents |
List of subevents with temporal relations.
TYPE:
|
Examples:
>>> event_structure = EventStructure(
... events=[Event(id="e1", type="process", participants={})],
... subevents=[]
... )
Fields:
GLFrame
pydantic-model
¶
Bases: GlazingBaseModel
Frame with GL event structure and qualia.
| ATTRIBUTE | DESCRIPTION |
|---|---|
vn_frame |
Base VerbNet frame.
TYPE:
|
subcat |
Subcategorization with variable assignments.
TYPE:
|
qualia |
Qualia structure.
TYPE:
|
event_structure |
Event structure decomposition.
TYPE:
|
opposition |
Opposition structure.
TYPE:
|
Examples:
>>> gl_frame = GLFrame(
... vn_frame=vn_frame,
... subcat=Subcategorization(members=[]),
... event_structure=EventStructure(events=[]),
... qualia=None,
... opposition=None
... )
Fields:
-
vn_frame(VNFrame) -
subcat(Subcategorization) -
qualia(Qualia | None) -
event_structure(EventStructure) -
opposition(Opposition | None)
GLVerbClass
pydantic-model
¶
Bases: GlazingBaseModel
VerbNet class with Generative Lexicon features.
| ATTRIBUTE | DESCRIPTION |
|---|---|
verb_class |
Base VerbNet class.
TYPE:
|
gl_frames |
List of GL frames.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
is_motion_class |
Check if this is a motion verb class. |
is_change_of_possession_class |
Check if this involves possession transfer. |
is_change_of_info_class |
Check if this involves information transfer. |
Examples:
>>> gl_class = GLVerbClass(
... verb_class=verb_class,
... gl_frames=[]
... )
>>> is_motion = gl_class.is_motion_class()
Fields:
Functions¶
is_change_of_info_class() -> bool
¶
Check if this involves information transfer.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if frames involve information transfer. |
Source code in src/glazing/verbnet/gl_models.py
is_change_of_possession_class() -> bool
¶
Check if this involves possession transfer.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if frames involve possession transfer. |
Source code in src/glazing/verbnet/gl_models.py
is_motion_class() -> bool
¶
Check if this is a motion verb class.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if any frame has motion-related semantics or opposition. |
Source code in src/glazing/verbnet/gl_models.py
Opposition
pydantic-model
¶
Bases: GlazingBaseModel
Semantic opposition structure.
| ATTRIBUTE | DESCRIPTION |
|---|---|
type |
Type of opposition (e.g., "motion", "state_change").
TYPE:
|
initial_state |
The initial state.
TYPE:
|
final_state |
The final state.
TYPE:
|
Examples:
>>> opposition = Opposition(
... type="motion",
... initial_state=State(predicate="at_location", args=["x", "source"]),
... final_state=State(predicate="at_location", args=["x", "goal"])
... )
Fields:
Qualia
pydantic-model
¶
Bases: GlazingBaseModel
Qualia structure for frame semantics.
| ATTRIBUTE | DESCRIPTION |
|---|---|
formal |
What type of thing it is.
TYPE:
|
constitutive |
What it's made of.
TYPE:
|
telic |
Purpose or function.
TYPE:
|
agentive |
How it comes about.
TYPE:
|
Examples:
>>> qualia = Qualia(
... formal="object",
... constitutive="material",
... telic="transport",
... agentive="manufacture"
... )
Fields:
-
formal(str | None) -
constitutive(str | None) -
telic(str | None) -
agentive(str | None)
State
pydantic-model
¶
Bases: GlazingBaseModel
State in opposition structure.
| ATTRIBUTE | DESCRIPTION |
|---|---|
predicate |
The state predicate.
TYPE:
|
args |
Arguments to the state predicate.
TYPE:
|
negated |
Whether the state is negated.
TYPE:
|
Examples:
Fields:
-
predicate(str) -
args(list[str]) -
negated(bool)
SubcatMember
pydantic-model
¶
Bases: GlazingBaseModel
Subcategorization member with variable.
| ATTRIBUTE | DESCRIPTION |
|---|---|
role |
Thematic role name.
TYPE:
|
variable |
Variable assignment (e.g., "x", "y", "z").
TYPE:
|
pos |
Part of speech.
TYPE:
|
prep |
Preposition for PP roles.
TYPE:
|
Examples:
Fields:
-
role(ThematicRoleType) -
variable(GLVariable) -
pos(GLSubcatPOS) -
prep(PrepositionValue | None)
Subcategorization
pydantic-model
¶
Bases: GlazingBaseModel
GL subcategorization with variable assignments.
| ATTRIBUTE | DESCRIPTION |
|---|---|
members |
List of subcategorization members.
TYPE:
|
Examples:
>>> subcat = Subcategorization(members=[
... SubcatMember(role="Agent", variable="x", pos="NP"),
... SubcatMember(role="Theme", variable="y", pos="NP")
... ])
Fields:
-
members(list[SubcatMember])
Subevent
pydantic-model
¶
Bases: GlazingBaseModel
Subevent with temporal relations.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
Subevent identifier.
TYPE:
|
parent_event |
Parent event identifier.
TYPE:
|
relation |
Temporal relation (e.g., "starts", "culminates", "results").
TYPE:
|
predicate |
Subevent predicate.
TYPE:
|
args |
Arguments to the subevent.
TYPE:
|
Examples:
>>> subevent = Subevent(
... id="e1.1",
... parent_event="e1",
... relation="starts",
... predicate="motion",
... args=["x", "source", "goal"]
... )
Fields:
-
id(str) -
parent_event(str) -
relation(GLTemporalRelation) -
predicate(str) -
args(list[str])