flexicon.code.Discourse package¶
Submodules¶
flexicon.code.Discourse.ConstChartCellTagOperations module¶
- class flexicon.code.Discourse.ConstChartCellTagOperations.ConstChartCellTagOperations(project)[source]¶
Bases:
BaseOperationsOperations for managing per-cell chart tags (
IConstChartTag) – the annotation surface in a constituent chart.Each chart row owns a sequence of cell-parts; a
IConstChartTagis one cell-part subtype. Each tag is positioned in a column (ColumnRA) and references a marker from the project-wide vocabulary (TagRA). The vocabulary itself is managed byConstChartMarkerOperations.Typical workflow:
row = list(chart.RowsOS)[0] col = list(template.ColumnsOS)[1] topic = project.ConstChartMarkers.Find("Topic") tag = project.ConstChartCellTags.Create(row, col, topic) assert project.ConstChartCellTags.GetMarker(tag) is topic
Access via
FLExProject.ConstChartCellTags.- Create(*args, **kwargs)¶
Automatically instantiate and call the method.
- Delete(*args, **kwargs)¶
Automatically instantiate and call the method.
- Find(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetAll(**kwargs)¶
- GetMarker(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetMarker(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetColumn(*args, **kwargs)¶
Automatically instantiate and call the method.
flexicon.code.Discourse.ConstChartClauseMarkerOperations module¶
- class flexicon.code.Discourse.ConstChartClauseMarkerOperations.ConstChartClauseMarkerOperations(project)[source]¶
Bases:
BaseOperationsThis class provides operations for managing clause markers in constituent charts for discourse analysis in FieldWorks projects.
Clause markers identify clausal relationships and dependencies within the discourse structure. They link word groups and mark clause boundaries.
This class should be accessed via FLExProject.ConstChartClauseMarkers property.
Usage:
from flexlibs2 import FLExProject project = FLExProject() project.OpenProject("my project", writeEnabled=True) # Get a row and word group chart = project.ConstCharts.Find("Genesis 1 Analysis") row = project.ConstChartRows.Find(chart, 0) wg = project.ConstChartWordGroups.Find(row, 0) # Create a clause marker marker = project.ConstChartClauseMarkers.Create(row, wg) # Get all markers in a row for marker in project.ConstChartClauseMarkers.GetAll(row): # Process clause marker pass project.CloseProject()
- Create(*args, **kwargs)¶
Automatically instantiate and call the method.
- Delete(*args, **kwargs)¶
Automatically instantiate and call the method.
- Find(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetAll(**kwargs)¶
- GetWordGroup(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetDependentClauses(**kwargs)¶
- AddDependentClause(*args, **kwargs)¶
Automatically instantiate and call the method.
flexicon.code.Discourse.ConstChartMarkerOperations module¶
- class flexicon.code.Discourse.ConstChartMarkerOperations.ConstChartMarkerOperations(project)[source]¶
Bases:
BaseOperationsOperations for managing the project-wide constituent-chart marker vocabulary (
LangProject.DiscourseDataOA.ChartMarkersOA).Markers are
ICmPossibilityitems that categorise content in discourse charts (Topic, Focus, Tail, etc.). They live in a single project-wide CmPossibilityList shared across every chart in the project, and can be organised hierarchically – a “Topic” marker may have “Sentence Topic” and “Contrastive Topic” children.Note: This is distinct from
IConstChartTag, which is the per-cell annotation that references a marker. SeeConstChartCellTagOperationsfor that surface.Access via
FLExProject.ConstChartMarkers:for m in project.ConstChartMarkers.GetAll(): print(project.ConstChartMarkers.GetName(m)) topic = project.ConstChartMarkers.Create("Topic") project.ConstChartMarkers.SetDescription( topic, "Marks the sentence topic" )
- Create(*args, **kwargs)¶
Automatically instantiate and call the method.
- Delete(*args, **kwargs)¶
Automatically instantiate and call the method.
- Find(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetAll(**kwargs)¶
- GetName(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetName(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetDescription(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetDescription(*args, **kwargs)¶
Automatically instantiate and call the method.
flexicon.code.Discourse.ConstChartMovedTextOperations module¶
- class flexicon.code.Discourse.ConstChartMovedTextOperations.ConstChartMovedTextOperations(project)[source]¶
Bases:
BaseOperationsThis class provides operations for managing moved text markers in constituent charts for discourse analysis in FieldWorks projects.
Moved text markers indicate that a word group represents text that has been moved from its canonical position (preposed or postposed) in the discourse structure.
This class should be accessed via FLExProject.ConstChartMovedText property.
Usage:
from flexlibs2 import FLExProject project = FLExProject() project.OpenProject("my project", writeEnabled=True) # Get a word group chart = project.ConstCharts.Find("Genesis 1 Analysis") row = project.ConstChartRows.Find(chart, 0) wg = project.ConstChartWordGroups.Find(row, 0) # Mark as preposed text marker = project.ConstChartMovedText.Create(wg, preposed=True) # Check if preposed if project.ConstChartMovedText.IsPreposed(marker): print("Text is preposed") project.CloseProject()
- Create(*args, **kwargs)¶
Automatically instantiate and call the method.
- Delete(*args, **kwargs)¶
Automatically instantiate and call the method.
- Find(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetAll(**kwargs)¶
- IsPreposed(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetPreposed(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetWordGroup(*args, **kwargs)¶
Automatically instantiate and call the method.
flexicon.code.Discourse.ConstChartOperations module¶
- class flexicon.code.Discourse.ConstChartOperations.ConstChartOperations(project)[source]¶
Bases:
BaseOperationsThis class provides operations for managing constituent charts in a FieldWorks project for discourse analysis.
Constituent charts are used to analyze the structure of texts, showing how clauses, phrases, and other discourse elements are organized. Each chart contains rows that represent segments of the analyzed text.
This class should be accessed via FLExProject.ConstCharts property.
Usage:
from flexlibs2 import FLExProject project = FLExProject() project.OpenProject("my project", writeEnabled=True) # Create a new constituent chart chart = project.ConstCharts.Create("Genesis 1 Analysis") # Get all charts for chart in project.ConstCharts.GetAll(): name = project.ConstCharts.GetName(chart) print(f"Chart: {name}") # Find a specific chart chart = project.ConstCharts.Find("Genesis 1 Analysis") project.CloseProject()
- GetAll(**kwargs)¶
- Create(*args, **kwargs)¶
Automatically instantiate and call the method.
- Delete(*args, **kwargs)¶
Automatically instantiate and call the method.
- Find(*args, **kwargs)¶
Automatically instantiate and call the method.
- FindByHvo(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetName(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetName(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetTemplate(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetTemplate(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetRows(**kwargs)¶
flexicon.code.Discourse.ConstChartRowOperations module¶
- class flexicon.code.Discourse.ConstChartRowOperations.ConstChartRowOperations(project)[source]¶
Bases:
BaseOperationsThis class provides operations for managing constituent chart rows in a FieldWorks project for discourse analysis.
Chart rows represent segments or units of analyzed text within a constituent chart. Each row can contain word groups, labels, and notes describing the discourse structure.
This class should be accessed via FLExProject.ConstChartRows property.
Usage:
from flexlibs2 import FLExProject project = FLExProject() project.OpenProject("my project", writeEnabled=True) # Get a chart chart = project.ConstCharts.Find("Genesis 1 Analysis") # Create a new row row = project.ConstChartRows.Create(chart, label="Verse 1") # Get all rows in a chart for row in project.ConstChartRows.GetAll(chart): label = project.ConstChartRows.GetLabel(row) print(f"Row: {label}") project.CloseProject()
- Create(*args, **kwargs)¶
Automatically instantiate and call the method.
- Delete(*args, **kwargs)¶
Automatically instantiate and call the method.
- Find(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetAll(**kwargs)¶
- GetLabel(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetLabel(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetNotes(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetNotes(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetWordGroups(*args, **kwargs)¶
Automatically instantiate and call the method.
- MoveTo(*args, **kwargs)¶
Automatically instantiate and call the method.
flexicon.code.Discourse.ConstChartWordGroupOperations module¶
- class flexicon.code.Discourse.ConstChartWordGroupOperations.ConstChartWordGroupOperations(project)[source]¶
Bases:
BaseOperationsThis class provides operations for managing word groups in constituent chart rows for discourse analysis in FieldWorks projects.
Word groups represent segments of text being analyzed in a discourse chart. Each word group references a range of segments (words/morphemes) from the analyzed text.
This class should be accessed via FLExProject.ConstChartWordGroups property.
Usage:
from flexlibs2 import FLExProject project = FLExProject() project.OpenProject("my project", writeEnabled=True) # Get a row chart = project.ConstCharts.Find("Genesis 1 Analysis") row = project.ConstChartRows.Find(chart, 0) # Create a word group (referencing text segments) wg = project.ConstChartWordGroups.Create(row, begin_segment, end_segment) # Get all word groups in a row for wg in project.ConstChartWordGroups.GetAll(row): # Process word group pass project.CloseProject()
- Create(*args, **kwargs)¶
Automatically instantiate and call the method.
- Delete(*args, **kwargs)¶
Automatically instantiate and call the method.
- Find(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetAll(**kwargs)¶
- GetBeginSegment(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetBeginSegment(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetEndSegment(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetEndSegment(*args, **kwargs)¶
Automatically instantiate and call the method.
- GetColumn(*args, **kwargs)¶
Automatically instantiate and call the method.
- SetColumn(*args, **kwargs)¶
Automatically instantiate and call the method.