pyflexicon 4.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. flexicon/__init__.py +253 -0
  2. flexicon/__init__.pyi +32 -0
  3. flexicon/code/BaseOperations.py +2226 -0
  4. flexicon/code/BaseOperations.pyi +37 -0
  5. flexicon/code/Discourse/ConstChartCellTagOperations.py +200 -0
  6. flexicon/code/Discourse/ConstChartClauseMarkerOperations.py +447 -0
  7. flexicon/code/Discourse/ConstChartMarkerOperations.py +317 -0
  8. flexicon/code/Discourse/ConstChartMovedTextOperations.py +441 -0
  9. flexicon/code/Discourse/ConstChartOperations.py +565 -0
  10. flexicon/code/Discourse/ConstChartRowOperations.py +608 -0
  11. flexicon/code/Discourse/ConstChartWordGroupOperations.py +535 -0
  12. flexicon/code/Discourse/__init__.py +1 -0
  13. flexicon/code/FLExGlobals.py +166 -0
  14. flexicon/code/FLExInit.py +82 -0
  15. flexicon/code/FLExLCM.py +105 -0
  16. flexicon/code/FLExProject.py +4423 -0
  17. flexicon/code/FLExProject.pyi +191 -0
  18. flexicon/code/Grammar/AllomorphOperations.pyi +22 -0
  19. flexicon/code/Grammar/EnvironmentOperations.py +790 -0
  20. flexicon/code/Grammar/EnvironmentOperations.pyi +22 -0
  21. flexicon/code/Grammar/GramCatOperations.py +723 -0
  22. flexicon/code/Grammar/GramCatOperations.pyi +22 -0
  23. flexicon/code/Grammar/InflectionFeatureOperations.py +1831 -0
  24. flexicon/code/Grammar/InflectionFeatureOperations.pyi +22 -0
  25. flexicon/code/Grammar/MorphRuleOperations.py +989 -0
  26. flexicon/code/Grammar/MorphRuleOperations.pyi +22 -0
  27. flexicon/code/Grammar/NaturalClassOperations.py +1150 -0
  28. flexicon/code/Grammar/NaturalClassOperations.pyi +22 -0
  29. flexicon/code/Grammar/POSOperations.py +1245 -0
  30. flexicon/code/Grammar/POSOperations.pyi +28 -0
  31. flexicon/code/Grammar/PhonFeatureOperations.py +889 -0
  32. flexicon/code/Grammar/PhonemeOperations.py +1707 -0
  33. flexicon/code/Grammar/PhonemeOperations.pyi +22 -0
  34. flexicon/code/Grammar/PhonologicalRuleOperations.py +1531 -0
  35. flexicon/code/Grammar/PhonologicalRuleOperations.pyi +22 -0
  36. flexicon/code/Grammar/StratumOperations.py +362 -0
  37. flexicon/code/Grammar/__init__.py +24 -0
  38. flexicon/code/Grammar/adhoc_prohibition.py +290 -0
  39. flexicon/code/Grammar/affix_template.py +523 -0
  40. flexicon/code/Grammar/affix_template_collection.py +398 -0
  41. flexicon/code/Grammar/compound_rule.py +405 -0
  42. flexicon/code/Grammar/compound_rule_collection.py +244 -0
  43. flexicon/code/Grammar/phonological_rule.py +520 -0
  44. flexicon/code/Grammar/prohibition_collection.py +301 -0
  45. flexicon/code/Grammar/rule_collection.py +288 -0
  46. flexicon/code/Lexicon/AllomorphOperations.py +1169 -0
  47. flexicon/code/Lexicon/EtymologyOperations.py +1275 -0
  48. flexicon/code/Lexicon/EtymologyOperations.pyi +22 -0
  49. flexicon/code/Lexicon/ExampleOperations.py +1669 -0
  50. flexicon/code/Lexicon/ExampleOperations.pyi +22 -0
  51. flexicon/code/Lexicon/LexEntryOperations.py +3203 -0
  52. flexicon/code/Lexicon/LexEntryOperations.pyi +29 -0
  53. flexicon/code/Lexicon/LexReferenceOperations.py +1459 -0
  54. flexicon/code/Lexicon/LexReferenceOperations.pyi +22 -0
  55. flexicon/code/Lexicon/LexSenseOperations.py +3875 -0
  56. flexicon/code/Lexicon/LexSenseOperations.pyi +29 -0
  57. flexicon/code/Lexicon/MSAOperations.py +632 -0
  58. flexicon/code/Lexicon/PronunciationOperations.py +1070 -0
  59. flexicon/code/Lexicon/PronunciationOperations.pyi +22 -0
  60. flexicon/code/Lexicon/SemanticDomainOperations.py +1337 -0
  61. flexicon/code/Lexicon/SemanticDomainOperations.pyi +22 -0
  62. flexicon/code/Lexicon/VariantOperations.py +1154 -0
  63. flexicon/code/Lexicon/VariantOperations.pyi +22 -0
  64. flexicon/code/Lexicon/__init__.py +0 -0
  65. flexicon/code/Lexicon/allomorph.py +409 -0
  66. flexicon/code/Lexicon/allomorph_collection.py +255 -0
  67. flexicon/code/Lexicon/morphosyntax_analysis.py +435 -0
  68. flexicon/code/Lexicon/msa_collection.py +316 -0
  69. flexicon/code/Lists/AgentOperations.py +827 -0
  70. flexicon/code/Lists/AgentOperations.pyi +22 -0
  71. flexicon/code/Lists/ConfidenceOperations.py +282 -0
  72. flexicon/code/Lists/ConfidenceOperations.pyi +22 -0
  73. flexicon/code/Lists/LocalizedListsOperations.py +334 -0
  74. flexicon/code/Lists/OverlayOperations.py +560 -0
  75. flexicon/code/Lists/OverlayOperations.pyi +22 -0
  76. flexicon/code/Lists/PossibilityListOperations.py +1548 -0
  77. flexicon/code/Lists/PossibilityListOperations.pyi +22 -0
  78. flexicon/code/Lists/PublicationOperations.py +975 -0
  79. flexicon/code/Lists/PublicationOperations.pyi +22 -0
  80. flexicon/code/Lists/TranslationTypeOperations.py +626 -0
  81. flexicon/code/Lists/TranslationTypeOperations.pyi +22 -0
  82. flexicon/code/Lists/__init__.py +0 -0
  83. flexicon/code/Lists/possibility_item_base.py +490 -0
  84. flexicon/code/Notebook/AnthropologyOperations.py +2111 -0
  85. flexicon/code/Notebook/AnthropologyOperations.pyi +22 -0
  86. flexicon/code/Notebook/DataNotebookOperations.py +2745 -0
  87. flexicon/code/Notebook/DataNotebookOperations.pyi +22 -0
  88. flexicon/code/Notebook/LocationOperations.py +1709 -0
  89. flexicon/code/Notebook/LocationOperations.pyi +22 -0
  90. flexicon/code/Notebook/NoteOperations.py +1055 -0
  91. flexicon/code/Notebook/NoteOperations.pyi +22 -0
  92. flexicon/code/Notebook/PersonOperations.py +1581 -0
  93. flexicon/code/Notebook/PersonOperations.pyi +22 -0
  94. flexicon/code/Notebook/__init__.py +0 -0
  95. flexicon/code/Notebook/annotation.py +554 -0
  96. flexicon/code/Notebook/annotation_collection.py +579 -0
  97. flexicon/code/PythonicWrapper.py +240 -0
  98. flexicon/code/Reversal/ReversalIndexEntryOperations.py +628 -0
  99. flexicon/code/Reversal/ReversalIndexOperations.py +520 -0
  100. flexicon/code/Reversal/__init__.py +1 -0
  101. flexicon/code/Scripture/ScrAnnotationsOperations.py +288 -0
  102. flexicon/code/Scripture/ScrBookOperations.py +530 -0
  103. flexicon/code/Scripture/ScrDraftOperations.py +417 -0
  104. flexicon/code/Scripture/ScrNoteOperations.py +640 -0
  105. flexicon/code/Scripture/ScrSectionOperations.py +525 -0
  106. flexicon/code/Scripture/ScrTxtParaOperations.py +536 -0
  107. flexicon/code/Scripture/__init__.py +1 -0
  108. flexicon/code/Shared/FilterOperations.py +1402 -0
  109. flexicon/code/Shared/MediaOperations.py +1582 -0
  110. flexicon/code/Shared/__init__.py +29 -0
  111. flexicon/code/Shared/catalog.py +533 -0
  112. flexicon/code/Shared/catalog_backed.py +776 -0
  113. flexicon/code/Shared/lcm_constants.py +61 -0
  114. flexicon/code/Shared/rule_patterns.py +98 -0
  115. flexicon/code/Shared/smart_collection.py +316 -0
  116. flexicon/code/Shared/string_utils.py +225 -0
  117. flexicon/code/Shared/wrapper_base.py +227 -0
  118. flexicon/code/System/AnnotationDefOperations.py +1252 -0
  119. flexicon/code/System/AnnotationDefOperations.pyi +22 -0
  120. flexicon/code/System/CheckOperations.py +1470 -0
  121. flexicon/code/System/CheckOperations.pyi +22 -0
  122. flexicon/code/System/CustomFieldOperations.py +1444 -0
  123. flexicon/code/System/CustomFieldOperations.pyi +22 -0
  124. flexicon/code/System/ProjectSettingsOperations.py +1170 -0
  125. flexicon/code/System/ProjectSettingsOperations.pyi +22 -0
  126. flexicon/code/System/WritingSystemOperations.py +1042 -0
  127. flexicon/code/System/WritingSystemOperations.pyi +22 -0
  128. flexicon/code/System/__init__.py +0 -0
  129. flexicon/code/System/context_collection.py +344 -0
  130. flexicon/code/System/phonological_context.py +557 -0
  131. flexicon/code/TextsWords/DiscourseOperations.py +1209 -0
  132. flexicon/code/TextsWords/DiscourseOperations.pyi +22 -0
  133. flexicon/code/TextsWords/FilterOperations.pyi +22 -0
  134. flexicon/code/TextsWords/MediaOperations.pyi +22 -0
  135. flexicon/code/TextsWords/ParagraphOperations.py +740 -0
  136. flexicon/code/TextsWords/ParagraphOperations.pyi +22 -0
  137. flexicon/code/TextsWords/SegmentOperations.py +1254 -0
  138. flexicon/code/TextsWords/SegmentOperations.pyi +22 -0
  139. flexicon/code/TextsWords/TextOperations.py +1036 -0
  140. flexicon/code/TextsWords/TextOperations.pyi +22 -0
  141. flexicon/code/TextsWords/WfiAnalysisOperations.py +1492 -0
  142. flexicon/code/TextsWords/WfiAnalysisOperations.pyi +22 -0
  143. flexicon/code/TextsWords/WfiGlossOperations.py +983 -0
  144. flexicon/code/TextsWords/WfiGlossOperations.pyi +22 -0
  145. flexicon/code/TextsWords/WfiMorphBundleOperations.py +1334 -0
  146. flexicon/code/TextsWords/WfiMorphBundleOperations.pyi +22 -0
  147. flexicon/code/TextsWords/WordformOperations.py +959 -0
  148. flexicon/code/TextsWords/WordformOperations.pyi +22 -0
  149. flexicon/code/TextsWords/__init__.py +0 -0
  150. flexicon/code/__init__.py +7 -0
  151. flexicon/code/__init__.pyi +27 -0
  152. flexicon/code/_context_manager_base.py +57 -0
  153. flexicon/code/exceptions.py +89 -0
  154. flexicon/code/lcm_casting.py +889 -0
  155. flexicon/code/transaction.py +193 -0
  156. flexicon/code/undoable_operation.py +122 -0
  157. flexicon/examples/demo_lexicon.py +102 -0
  158. flexicon/examples/demo_openproject.py +95 -0
  159. flexicon/examples/demo_pos_operations.py +98 -0
  160. flexicon/examples/demo_writing_systems.py +183 -0
  161. flexicon/py.typed +0 -0
  162. flexicon/sync/__init__.py +84 -0
  163. flexicon/sync/conflict_resolvers.py +263 -0
  164. flexicon/sync/dependency_graph.py +396 -0
  165. flexicon/sync/dependency_resolver.py +365 -0
  166. flexicon/sync/diff.py +617 -0
  167. flexicon/sync/engine.py +660 -0
  168. flexicon/sync/export.py +96 -0
  169. flexicon/sync/hierarchical_importer.py +463 -0
  170. flexicon/sync/match_strategies.py +339 -0
  171. flexicon/sync/merge_ops.py +477 -0
  172. flexicon/sync/selective_import.py +352 -0
  173. flexicon/sync/tests/__init__.py +6 -0
  174. flexicon/sync/tests/test_base_operations.py +476 -0
  175. flexicon/sync/tests/test_dependency_graph.py +443 -0
  176. flexicon/sync/tests/test_diff_engine.py +330 -0
  177. flexicon/sync/tests/test_duplicate_operations.py +2290 -0
  178. flexicon/sync/tests/test_match_strategies.py +243 -0
  179. flexicon/sync/tests/test_merge_ops.py +394 -0
  180. flexicon/sync/tests/test_selective_import.py +719 -0
  181. flexicon/sync/tests/test_sync_engine.py +533 -0
  182. flexicon/sync/tests/test_sync_result.py +339 -0
  183. flexicon/sync/tests/test_validation.py +478 -0
  184. flexicon/sync/validation.py +448 -0
  185. flexicon/tests/test_CustomFields.py +72 -0
  186. flexicon/tests/test_FLExInit.py +38 -0
  187. flexicon/tests/test_FLExProject.py +58 -0
  188. flexlibs2/__init__.py +72 -0
  189. pyflexicon-4.1.0.dist-info/METADATA +205 -0
  190. pyflexicon-4.1.0.dist-info/RECORD +193 -0
  191. pyflexicon-4.1.0.dist-info/WHEEL +5 -0
  192. pyflexicon-4.1.0.dist-info/licenses/LICENSE.txt +472 -0
  193. pyflexicon-4.1.0.dist-info/top_level.txt +2 -0
flexicon/__init__.py ADDED
@@ -0,0 +1,253 @@
1
+ # ----------------------------------------------------------------------------
2
+ # Name: flexicon
3
+ # Purpose: This package provides a Python interface to FLEx project data
4
+ # via the Fieldworks Language and Culture Model (LCM).
5
+ #
6
+ # flexicon began as a fork of cdfarrow/flexlibs (LGPL-2.1) and is
7
+ # now an independent successor library with an extensively
8
+ # reshaped, user-centric API. The legacy `flexlibs2` import name
9
+ # is preserved as a deprecated alias (removed in v5.0.0).
10
+ #
11
+ # Platform: Python.NET, FieldWorks 9+
12
+ # License: LGPL-2.1-or-later (see LICENSE.txt)
13
+ # ----------------------------------------------------------------------------
14
+
15
+ version = "4.1.0"
16
+
17
+ # Define exported classes, etc. at the top level of the package
18
+
19
+ from .code.FLExInit import (
20
+ FLExInitialize,
21
+ FLExCleanup,
22
+ )
23
+
24
+ from .code.FLExGlobals import (
25
+ FWCodeDir,
26
+ FWProjectsDir,
27
+ FWExecutable,
28
+ FWShortVersion,
29
+ FWLongVersion,
30
+ APIHelpFile,
31
+ )
32
+
33
+ from .code.FLExProject import (
34
+ AllProjectNames,
35
+ OpenProjectInFW,
36
+ FLExProject,
37
+ FP_FileLockedError,
38
+ FP_FileNotFoundError,
39
+ FP_MigrationRequired,
40
+ FP_NullParameterError,
41
+ FP_ParameterError,
42
+ FP_ProjectError,
43
+ FP_ReadOnlyError,
44
+ FP_RuntimeError,
45
+ FP_TransactionError,
46
+ FP_WritingSystemError,
47
+ )
48
+
49
+ # Advanced Operations (v2.0+)
50
+
51
+ # Grammar Operations
52
+ from .code.Grammar.POSOperations import (
53
+ POSOperations,
54
+ )
55
+
56
+ from .code.Grammar.PhonemeOperations import (
57
+ PhonemeOperations,
58
+ )
59
+
60
+ from .code.Grammar.NaturalClassOperations import (
61
+ NaturalClassOperations,
62
+ )
63
+
64
+ from .code.Grammar.EnvironmentOperations import (
65
+ EnvironmentOperations,
66
+ )
67
+
68
+ from .code.Grammar.MorphRuleOperations import (
69
+ MorphRuleOperations,
70
+ )
71
+
72
+ from .code.Grammar.InflectionFeatureOperations import (
73
+ InflectionFeatureOperations,
74
+ )
75
+
76
+ from .code.Grammar.GramCatOperations import (
77
+ GramCatOperations,
78
+ )
79
+
80
+ from .code.Grammar.PhonologicalRuleOperations import (
81
+ PhonologicalRuleOperations,
82
+ )
83
+
84
+ # Lexicon Operations
85
+ from .code.Lexicon.LexEntryOperations import (
86
+ LexEntryOperations,
87
+ )
88
+
89
+ from .code.Lexicon.LexSenseOperations import (
90
+ LexSenseOperations,
91
+ )
92
+
93
+ from .code.Lexicon.ExampleOperations import (
94
+ ExampleOperations,
95
+ )
96
+
97
+ from .code.Lexicon.LexReferenceOperations import (
98
+ LexReferenceOperations,
99
+ )
100
+
101
+ from .code.Lexicon.VariantOperations import (
102
+ VariantOperations,
103
+ )
104
+
105
+ from .code.Lexicon.PronunciationOperations import (
106
+ PronunciationOperations,
107
+ )
108
+
109
+ from .code.Lexicon.SemanticDomainOperations import (
110
+ SemanticDomainOperations,
111
+ )
112
+
113
+ from .code.Lexicon.EtymologyOperations import (
114
+ EtymologyOperations,
115
+ )
116
+
117
+ from .code.Lexicon.AllomorphOperations import (
118
+ AllomorphOperations,
119
+ )
120
+
121
+ # TextsWords Operations
122
+ from .code.TextsWords.TextOperations import (
123
+ TextOperations,
124
+ )
125
+
126
+ from .code.TextsWords.WordformOperations import (
127
+ WordformOperations,
128
+ SpellingStatusStates,
129
+ )
130
+
131
+ from .code.TextsWords.WfiAnalysisOperations import (
132
+ WfiAnalysisOperations,
133
+ ApprovalStatusTypes,
134
+ )
135
+
136
+ from .code.TextsWords.ParagraphOperations import (
137
+ ParagraphOperations,
138
+ )
139
+
140
+ from .code.TextsWords.SegmentOperations import (
141
+ SegmentOperations,
142
+ )
143
+
144
+ from .code.TextsWords.WfiGlossOperations import (
145
+ WfiGlossOperations,
146
+ )
147
+
148
+ from .code.TextsWords.WfiMorphBundleOperations import (
149
+ WfiMorphBundleOperations,
150
+ )
151
+
152
+ from .code.Shared.MediaOperations import (
153
+ MediaOperations,
154
+ MediaType,
155
+ )
156
+
157
+ from .code.Shared.FilterOperations import (
158
+ FilterOperations,
159
+ )
160
+
161
+ from .code.Shared.string_utils import (
162
+ normalize_text,
163
+ is_empty_text,
164
+ best_analysis_text,
165
+ best_vernacular_text,
166
+ best_text,
167
+ FLEX_NULL_MARKER,
168
+ )
169
+
170
+ from .code.Shared.rule_patterns import (
171
+ Seg,
172
+ NC,
173
+ Boundary,
174
+ )
175
+
176
+ from .code.TextsWords.DiscourseOperations import (
177
+ DiscourseOperations,
178
+ )
179
+
180
+ # Notebook Operations
181
+ from .code.Notebook.NoteOperations import (
182
+ NoteOperations,
183
+ )
184
+
185
+ from .code.Notebook.PersonOperations import (
186
+ PersonOperations,
187
+ )
188
+
189
+ from .code.Notebook.LocationOperations import (
190
+ LocationOperations,
191
+ )
192
+
193
+ from .code.Notebook.AnthropologyOperations import (
194
+ AnthropologyOperations,
195
+ )
196
+
197
+ from .code.Notebook.DataNotebookOperations import (
198
+ DataNotebookOperations,
199
+ )
200
+
201
+ # Lists Operations
202
+ from .code.Lists.PublicationOperations import (
203
+ PublicationOperations,
204
+ )
205
+
206
+ from .code.Lists.AgentOperations import (
207
+ AgentOperations,
208
+ )
209
+
210
+ from .code.Lists.ConfidenceOperations import (
211
+ ConfidenceOperations,
212
+ )
213
+
214
+ from .code.Lists.OverlayOperations import (
215
+ OverlayOperations,
216
+ )
217
+
218
+ from .code.Lists.TranslationTypeOperations import (
219
+ TranslationTypeOperations,
220
+ )
221
+
222
+ from .code.Lists.PossibilityListOperations import (
223
+ PossibilityListOperations,
224
+ )
225
+
226
+ # System Operations
227
+ from .code.System.WritingSystemOperations import (
228
+ WritingSystemOperations,
229
+ )
230
+
231
+ from .code.System.ProjectSettingsOperations import (
232
+ ProjectSettingsOperations,
233
+ )
234
+
235
+ from .code.System.AnnotationDefOperations import (
236
+ AnnotationDefOperations,
237
+ )
238
+
239
+ from .code.System.CheckOperations import (
240
+ CheckOperations,
241
+ )
242
+
243
+ from .code.System.CustomFieldOperations import (
244
+ CustomFieldOperations,
245
+ )
246
+
247
+ # Pythonic Wrapper - suffix-free property access
248
+ from .code.PythonicWrapper import (
249
+ wrap,
250
+ unwrap,
251
+ p,
252
+ PythonicWrapper,
253
+ )
flexicon/__init__.pyi ADDED
@@ -0,0 +1,32 @@
1
+ #
2
+ # __init__.pyi
3
+ #
4
+ # Type stubs for flexlibs2 module
5
+ #
6
+
7
+ from .code.FLExProject import (
8
+ FLExProject,
9
+ FP_ProjectError,
10
+ FP_FileNotFoundError,
11
+ FP_FileLockedError,
12
+ FP_MigrationRequired,
13
+ FP_ReadOnlyError,
14
+ FP_NullParameterError,
15
+ FP_ParameterError,
16
+ )
17
+
18
+ def FLExInitialize() -> None: ...
19
+ def FLExCleanup() -> None: ...
20
+
21
+ __all__ = [
22
+ "FLExProject",
23
+ "FLExInitialize",
24
+ "FLExCleanup",
25
+ "FP_ProjectError",
26
+ "FP_FileNotFoundError",
27
+ "FP_FileLockedError",
28
+ "FP_MigrationRequired",
29
+ "FP_ReadOnlyError",
30
+ "FP_NullParameterError",
31
+ "FP_ParameterError",
32
+ ]