edsnlp.pipelines.core.contextual_matcher.models
Flags = Union[re.RegexFlag, int]
module-attribute
Window = Union[Tuple[int, int], List[int], int]
module-attribute
SingleExcludeModel
Bases: BaseModel
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
32 33 34 35 36 37 38 39 40 41 42 43 |
|
regex: ListOrStr = []
class-attribute
window: Window = None
class-attribute
regex_flags: Optional[Flags] = None
class-attribute
exclude_regex_validation(v)
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
37 38 39 40 41 |
|
ExcludeModel
Bases: BaseModel
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
46 47 48 49 50 51 52 53 54 55 56 57 |
|
__root__: Union[List[SingleExcludeModel], SingleExcludeModel] = None
class-attribute
item_to_list(v)
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
53 54 55 56 57 |
|
SingleAssignModel
Bases: BaseModel
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
name: str = None
class-attribute
regex: str = None
class-attribute
window: Window = None
class-attribute
regex_flags: Optional[Flags] = None
class-attribute
expand_entity: bool = False
class-attribute
check_single_regex_group(pat)
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
67 68 69 70 71 72 73 74 75 76 77 78 |
|
AssignModel
Bases: BaseModel
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
__root__: Union[List[SingleAssignModel], SingleAssignModel] = None
class-attribute
item_to_list(v)
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
90 91 92 93 94 |
|
name_uniqueness(v)
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
96 97 98 99 100 |
|
SingleConfig
Bases: BaseModel
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
103 104 105 106 107 108 109 110 111 |
|
source: str = None
class-attribute
terms: ListOrStr = []
class-attribute
regex: ListOrStr = []
class-attribute
regex_attr: Optional[str] = None
class-attribute
regex_flags: Union[re.RegexFlag, int] = None
class-attribute
exclude: Optional[ExcludeModel] = []
class-attribute
assign: Optional[AssignModel] = []
class-attribute
FullConfig
Bases: BaseModel
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
114 115 116 117 118 119 120 121 122 123 124 125 |
|
__root__: Union[List[SingleConfig], SingleConfig] = None
class-attribute
pattern_to_list(v)
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
121 122 123 124 125 |
|
normalize_window(cls, v)
Source code in edsnlp/pipelines/core/contextual_matcher/models.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|