penman.surface

Surface strings, tokens, and alignments.

Epigraphical Markers

class penman.surface.AlignmentMarker(indices, prefix=None)[source]

Bases: penman.epigraph.Epidatum

class penman.surface.Alignment(indices, prefix=None)[source]

Bases: penman.surface.AlignmentMarker

class penman.surface.RoleAlignment(indices, prefix=None)[source]

Bases: penman.surface.AlignmentMarker

Module Functions

penman.surface.alignments(g)[source]

Return a mapping of triples to alignments in graph g.

Parameters

g – a Graph containing alignment data

Returns

A dict mapping Triple objects to their corresponding Alignment objects, if any.

penman.surface.role_alignments(g)[source]

Return a mapping of triples to role alignments in graph g.

Parameters

g – a Graph containing role alignment data

Returns

A dict mapping Triple objects to their corresponding RoleAlignment objects, if any.