Utils¶
-
ieml.usl.constants.
assert_
(cond, message)¶
-
ieml.usl.constants.
assert_all_in
(l: List[ieml.dictionary.script.script.Script], _set: Set[ieml.dictionary.script.script.Script], name_l)¶
-
ieml.usl.constants.
assert_atmost_one_from
(l: List[ieml.dictionary.script.script.Script], _set: Set[ieml.dictionary.script.script.Script], name_l, name_set)¶
-
ieml.usl.constants.
assert_no_one_from
(l: List[ieml.dictionary.script.script.Script], _set: Set[ieml.dictionary.script.script.Script], name_l, name_set)¶
-
ieml.usl.constants.
assert_only_one_from
(l: List[ieml.dictionary.script.script.Script], _set: Set[ieml.dictionary.script.script.Script], name_l, name_set) → ieml.dictionary.script.script.Script¶
-
ieml.usl.constants.
check_address_script
(l: List[ieml.dictionary.script.script.Script], sfun_type)¶
-
ieml.usl.constants.
check_flexion_actant_scripts
(l: List[ieml.dictionary.script.script.Script], sfun=None)¶
-
ieml.usl.constants.
check_flexion_process_scripts
(l: List[ieml.dictionary.script.script.Script], sfun=None)¶
-
ieml.usl.constants.
check_flexion_quality
(l: List[ieml.dictionary.script.script.Script], sfun=None)¶
-
ieml.usl.constants.
check_lexeme_scripts
(l_pf: List[ieml.dictionary.script.script.Script], l_pc: List[ieml.dictionary.script.script.Script], sfun=None)¶
-
ieml.usl.constants.
class_from_address
(address)¶
-
class
ieml.commons.
DecoratedComponent
(*args, **kwargs)¶ Bases:
object
-
__dict__
= mappingproxy({'__module__': 'ieml.commons', '__init__': <function DecoratedComponent.__init__>, 'clear_literal': <function DecoratedComponent.clear_literal>, 'set_literal': <function DecoratedComponent.set_literal>, 'get_literal': <function DecoratedComponent.get_literal>, '__dict__': <attribute '__dict__' of 'DecoratedComponent' objects>, '__weakref__': <attribute '__weakref__' of 'DecoratedComponent' objects>, '__doc__': None})¶
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
__module__
= 'ieml.commons'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
clear_literal
()¶
-
get_literal
()¶
-
set_literal
(value)¶
-
-
class
ieml.commons.
FolderWatcherCache
(db_path: str, pattern: str, cache_folder: str, name: str)¶ Bases:
object
-
__dict__
= mappingproxy({'__module__': 'ieml.commons', '__init__': <function FolderWatcherCache.__init__>, 'update': <function FolderWatcherCache.update>, 'get': <function FolderWatcherCache.get>, 'is_pruned': <function FolderWatcherCache.is_pruned>, 'cache_file': <property object>, '_cache_candidates': <function FolderWatcherCache._cache_candidates>, '__dict__': <attribute '__dict__' of 'FolderWatcherCache' objects>, '__weakref__': <attribute '__weakref__' of 'FolderWatcherCache' objects>, '__doc__': None})¶
-
__init__
(db_path: str, pattern: str, cache_folder: str, name: str)¶ Cache that check if folder content has changed. Compute a hash of the files in the folder and get pruned if the content of this folder change.
Parameters: - folder – the folder to watch
- cache_folder – the folder to put the cache file
-
__module__
= 'ieml.commons'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
cache_file
¶ Returns: The cache file absolute path
-
get
() → object¶ Unpickle and return the object stored in the cache file. :return: the stored object
-
is_pruned
() → bool¶ Return True if the watched folder content has changed. :return: if the folder content changed
-
update
(obj) → None¶ Update the cache content, remove old cache files from the cache directory.
Parameters: obj – the object to pickle in the cache Returns: None
-
-
class
ieml.commons.
LastUpdatedOrderedDict
¶ Bases:
collections.OrderedDict
Store items in the order the keys were last added
-
__module__
= 'ieml.commons'¶
-
__setitem__
(key, value, **kwargs)¶ Set self[key] to value.
-
-
class
ieml.commons.
OrderedEnum
¶ Bases:
enum.Enum
An enumeration.
-
__ge__
(other)¶ Return self>=value.
-
__gt__
(other)¶ Return self>value.
-
__le__
(other)¶ Return self<=value.
-
__lt__
(other)¶ Return self<value.
-
__module__
= 'ieml.commons'¶
-
-
class
ieml.commons.
Singleton
¶ Bases:
type
-
__call__
(*args, **kwargs)¶ Call self as a function.
-
__module__
= 'ieml.commons'¶
-
-
class
ieml.commons.
TreeStructure
(*args, **kwargs)¶ Bases:
object
-
__dict__
= mappingproxy({'__module__': 'ieml.commons', '__init__': <function TreeStructure.__init__>, '__str__': <function TreeStructure.__str__>, '__ne__': <function TreeStructure.__ne__>, '__eq__': <function TreeStructure.__eq__>, '__hash__': <function TreeStructure.__hash__>, '__iter__': <function TreeStructure.__iter__>, 'tree_iter': <function TreeStructure.tree_iter>, '__dict__': <attribute '__dict__' of 'TreeStructure' objects>, '__weakref__': <attribute '__weakref__' of 'TreeStructure' objects>, '__doc__': None})¶
-
__eq__
(other)¶ Return self==value.
-
__hash__
()¶ Since the IEML string for any proposition AST is supposed to be unique, it can be used as a hash
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
__iter__
()¶ Enables the syntactic sugar of iterating directly on an element without accessing “children”
-
__module__
= 'ieml.commons'¶
-
__ne__
(other)¶ Return self!=value.
-
__str__
()¶ Return str(self).
-
__weakref__
¶ list of weak references to the object (if defined)
-
tree_iter
()¶
-
-
ieml.commons.
cache_results_watch_files
(path, name)¶
-
class
ieml.commons.
cached_property
(factory)¶ Bases:
object
-
__dict__
= mappingproxy({'__module__': 'ieml.commons', '__init__': <function cached_property.__init__>, '__get__': <function cached_property.__get__>, '__dict__': <attribute '__dict__' of 'cached_property' objects>, '__weakref__': <attribute '__weakref__' of 'cached_property' objects>, '__doc__': None})¶
-
__get__
(instance, owner)¶
-
__init__
(factory)¶ Initialize self. See help(type(self)) for accurate signature.
-
__module__
= 'ieml.commons'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
ieml.commons.
fullname
(cls)¶
-
ieml.commons.
monitor_decorator
(name)¶
-
class
ieml.constants.
DescriptorsType
¶ Bases:
enum.Enum
An enumeration.
-
COMMENTS
= 'comments'¶
-
REFERENTIAL
= 'rdf_repositories'¶
-
TAGS
= 'tags'¶
-
TRANSLATIONS
= 'translations'¶
-
__module__
= 'ieml.constants'¶
-
-
class
ieml.constants.
Languages
¶ Bases:
enum.Enum
The language currently supported by the IEML database
-
EN
= 'en'¶
-
FR
= 'fr'¶
-
__module__
= 'ieml.constants'¶
-
-
ieml.constants.
get_iemldb_folder
(name)¶