flexicon.code.Reversal package

Submodules

flexicon.code.Reversal.ReversalIndexEntryOperations module

class flexicon.code.Reversal.ReversalIndexEntryOperations.ReversalIndexEntryOperations(project)[source]

Bases: BaseOperations

This class provides operations for managing reversal index entries in a FieldWorks project.

Reversal index entries are the individual entries within a reversal index. Each entry has a form (the reverse headword) and links to one or more lexical senses. Entries can be organized hierarchically with subentries.

Reversal entries enable users to look up words in the analysis language and find corresponding vernacular entries.

Usage:

from flexlibs2 import FLExProject

project = FLExProject()
project.OpenProject("my project", writeEnabled=True)

# Get reversal index
en_ws = project.WSHandle('en')
idx = project.ReversalIndexes.FindByWritingSystem(en_ws)

# Create reversal entry
entry = project.ReversalEntries.Create(idx, "run")

# Link to lexical sense
lex_entry = list(project.LexiconAllEntries())[0]
sense = list(lex_entry.SensesOS)[0]
project.ReversalEntries.AddSense(entry, sense)

# Get all entries
for rev_entry in project.ReversalEntries.GetAll(idx):
    form = project.ReversalEntries.GetForm(rev_entry)
    print(f"Reversal: {form}")

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.

GetForm(*args, **kwargs)

Automatically instantiate and call the method.

SetForm(*args, **kwargs)

Automatically instantiate and call the method.

GetSenses(*args, **kwargs)

Automatically instantiate and call the method.

AddSense(*args, **kwargs)

Automatically instantiate and call the method.

RemoveSense(*args, **kwargs)

Automatically instantiate and call the method.

GetSubentries(*args, **kwargs)

Automatically instantiate and call the method.

flexicon.code.Reversal.ReversalIndexOperations module

class flexicon.code.Reversal.ReversalIndexOperations.ReversalIndexOperations(project)[source]

Bases: BaseOperations

This class provides operations for managing reversal indexes in a FieldWorks project.

Reversal indexes provide reverse dictionaries for analysis languages (e.g., English to vernacular). Each index is tied to a specific writing system and contains reversal entries that link back to lexical senses.

This is a core dictionary feature with LIFT import/export capabilities (753 occurrences in codebase).

Usage:

from flexlibs2 import FLExProject

project = FLExProject()
project.OpenProject("my project", writeEnabled=True)

# Create a reversal index
en_ws = project.WSHandle('en')
rev_index = project.ReversalIndexes.Create("English", en_ws)

# Get all reversal indexes
for idx in project.ReversalIndexes.GetAll():
    name = project.ReversalIndexes.GetName(idx)
    print(f"Reversal Index: {name}")

# Find by writing system
idx = project.ReversalIndexes.FindByWritingSystem(en_ws)

# Get entries
entries = project.ReversalIndexes.GetEntries(idx)

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.

FindByWritingSystem(*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.

GetWritingSystem(*args, **kwargs)

Automatically instantiate and call the method.

GetEntries(*args, **kwargs)

Automatically instantiate and call the method.

ExportToLIFT(*args, **kwargs)

Automatically instantiate and call the method.

Module contents