Acts¶
Table of Contents
Acts are always built as a child class from the Base class Atos
. Following are the base class structure
and a guide for implementating your own act. Also, a list of implementated and missing acts are presented.
Base Class¶
Implementing new acts¶
The Acts base class is build in a way to make easy implementation of new acts. A programmer seeking to help in the development of new acts, need not to worry about anything, besides the regex or ner itself.
Mainly, the following funcions need to be overwrited in the child class.
Regex Methods¶
In case you want to extract through regex, the following funcions needs to be written:
- ActRegex._rule_for_inst()[source]
Rule for extraction of the act
Warning
Must return a regex rule that finds an act in two parts, containing a head and a body. Where only the body will be used to search for proprieties.
- Raises
NotImplementedError – Child class needs to overwrite this method.
- ActRegex._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
Additionaly, if the programmer whishes to change the regex flags for his/her class, they can overwrite the following function in the child class:
- classmethod ActRegex._regex_flags()[source]
Flag of the regex search
NER Methods¶
If NER will be used, you shall add a trained model to the acts/models folder. Also the following method should be overwrited in your act:
Change the Core File¶
After all functions have been implemented, the programmer needs to do a minor change in the core file. The following must be added:
from dodfminer.extract.polished.acts.act_file_name import NewActClass
_acts_ids["new_act_name"] = NewActClass
Base Class Mechanisms¶
One does not access directly none of those functions, but they are listed here in case the programmer implementing the act needs more informations.
Implemented Acts¶
Abono
Aposentadoria
Exoneração
Nomeação
Retificações
Reversões
Substituições
Cessões
Tornar sem efeito Aposentadoria
Exoneração de Cargos Efetivos