Internal API reference¶
Lexedata is a set of tools for managing, editing, and annotating large lexical datasets in CLDF.
Lexedata is open access software in development. Please report any problems and suggest any improvements you would like to see by opening an issue on the Lexedata GitHub repository
- lexedata.edit package
- Submodules
- lexedata.edit.add_central_concepts module
- lexedata.edit.add_cognate_table module
- lexedata.edit.add_concepticon module
- lexedata.edit.add_metadata module
- lexedata.edit.add_segments module
- lexedata.edit.add_singleton_cognatesets module
- lexedata.edit.add_status_column module
- lexedata.edit.add_table module
- lexedata.edit.align module
- lexedata.edit.change_id_column module
- lexedata.edit.clean_forms module
- lexedata.edit.detect_cognates module
- lexedata.edit.merge_cognate_sets module
- lexedata.edit.merge_homophones module
- lexedata.edit.normalize_unicode module
- lexedata.edit.replace_id module
- lexedata.edit.replace_id_column module
- lexedata.edit.simplify_ids module
- Module contents
- lexedata.exporter package
- lexedata.importer package
- lexedata.report package
- lexedata.util package
lexedata.cli module¶
- class lexedata.cli.ChangeLoglevel(option_strings, dest, const, nargs=None, **kwargs)¶
Bases:
Action
- class lexedata.cli.Exit(value)¶
Bases:
IntEnum
An enumeration.
- CLI_ARGUMENT_ERROR = 2¶
- FILE_NOT_FOUND = 10¶
- INVALID_COLUMN_NAME = 6¶
- INVALID_DATASET = 8¶
- INVALID_ID = 5¶
- INVALID_INPUT = 9¶
- INVALID_TABLE_NAME = 7¶
- NO_COGNATETABLE = 3¶
- NO_SEGMENTS = 4¶
- class lexedata.cli.SetOrFromFile(option_strings, dest, nargs='+', default=<lexedata.types.WorldSet object>, help=None, autohelp=True, metavar=None, **kwargs)¶
Bases:
Action
- lexedata.cli.add_log_controls(parser: ArgumentParser)¶
- lexedata.cli.enum_from_lower(enum: Type[Enum])¶
- lexedata.cli.parser(name: str, description: str, **kwargs) ArgumentParser ¶
- lexedata.cli.setup_logging(args: Namespace)¶
- lexedata.cli.tq(iter, task, logger=<Logger lexedata (INFO)>, total: ~typing.Optional[~typing.Union[int, float]] = None)¶
lexedata.error_handling module¶
- exception lexedata.error_handling.MultipleCandidatesWarning¶
Bases:
UserWarning
- exception lexedata.error_handling.ObjectNotFoundWarning¶
Bases:
UserWarning
- lexedata.error_handling.create(db_object: Dict[str, Any], cell: Optional[str] = None) bool ¶
Should I add a missing object? Yes, quietly.
Give permission to add the object.
- Returns
True
- Return type
The object should be added.
- lexedata.error_handling.error(db_object: Dict[str, Any], cell: Optional[str] = None) bool ¶
Should I add a missing object? No, the object missing is an error.
Raise an exception (ObjectNotFoundWarning) reporting the missing object and cell.
- Raises
- lexedata.error_handling.ignore(db_object: Dict[str, Any], cell: Optional[str] = None) bool ¶
Should I add a missing object? No, drop it quietly.
- Returns
False
- Return type
The object should not be added.
- lexedata.error_handling.warn(db_object: Dict[str, Any], cell: Optional[str] = None) bool ¶
Should I add a missing object? No, but inform the user.
Send a warning (ObjectNotFoundWarning) reporting the missing object and cell.
- Returns
False
- Return type
The object should not be added.
- lexedata.error_handling.warn_and_create(db_object: Dict[str, Any], cell: Optional[str] = None) bool ¶
Should I add a missing object? Yes, but inform the user.
Send a warning (ObjectNotFoundWarning) reporting the missing object and cell, and give permission to add the object.
- Returns
True
- Return type
The object should be added.
lexedata.types module¶
- class lexedata.types.KeyKeyDict¶
Bases:
Mapping
[str
,str
]
- class lexedata.types.Object¶
Bases:
Dict
[str
,Any
]
- class lexedata.types.RowObject¶
Bases:
Object
A row in a lexical dataset, i.e. a concept or cognateset
- class lexedata.types.Wordlist(tablegroup: TableGroup)¶
Bases:
Wordlist
,Generic
[Language_ID
,Form_ID
,Parameter_ID
,Cognate_ID
,Cognateset_ID
]