wuenlp_tools.utils.scenes
1from enum import Enum 2 3SCENE_TYPES = { 4 "scene", "nonscene", "szene", "nichtszene", "nicht-szene", "szene ebene 1", "szene ebene 2", 5 "szene ebene 3"} 6NONSCENE_TYPES = {"nonscene", "nichtszene", "nicht-szene"} 7 8 9class StringEnum(str, Enum): 10 pass 11 12 13class Label(StringEnum): 14 BORDER = "BORDER" 15 NOBORDER = "NOBORDER" 16 S2S = "Scene-To-Scene" 17 S2NS = "Scene-To-Nonscene" 18 NS2S = "Nonscene-To-Scene" 19 20 21scene_type_mapper = { 22 "Szene Ebene 1": "Scene", 23 "Szene": "Scene", 24 "Szene Ebene 2": "Scene", 25 "Szene Ebene 3": "Scene", 26 "Nicht-Szene": "NonScene", 27 "Scene": "Scene", 28 "NonScene": "NonScene", 29 "Nonscene": "NonScene", 30}
set() -> new empty set object set(iterable) -> new set object
Build an unordered collection of unique elements.
set() -> new empty set object set(iterable) -> new set object
Build an unordered collection of unique elements.
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
14class Label(StringEnum): 15 BORDER = "BORDER" 16 NOBORDER = "NOBORDER" 17 S2S = "Scene-To-Scene" 18 S2NS = "Scene-To-Nonscene" 19 NS2S = "Nonscene-To-Scene"
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)