Regex Backend
Regex backend for act and propriety extraction.
This module contains the ActRegex class, which have all that is necessary to extract an act and, its proprieties, using regex rules.
- class dodfminer.extract.polished.backend.regex.ActRegex[source]
Act Regex Class.
This class encapsulate all functions, and attributes related to the process of regex extraction.
Note
This class is one of the fathers of the Base act class.
- _flags
All the regex flags which will be used in extraction.
- _rules
The regex rules for proprieties extraction.
- _inst_rule
The regex rule for act extraction.
- _find_prop_value(rule, act)[source]
Find a single proprietie in an single act.
- Parameters
rule (str) – The regex rule to search for.
act (str) – The act to apply the rule.
- Returns
The found propriety, or a nan in case nothing is found.
- _prop_rules()[source]
Rules for extraction of the proprieties.
Must return a dictionary of regex rules, where the key is the propriety type and the value is the rule.
- Raises
NotImplementedError – Child class needs to overwrite this method