correcttreebank.CorrectionParameters contains parameters required for correcting a treebank.
One of its atributes is options which is an unspecified dictionary of which some entries are required. The code needs to be followed aross various functions to discover which of these are actuall required, and where they are instantiated. Also, some keys are repeated (e.g. corr).
Proposal:
- Implement data structure for input options (e.g.
@dataclass InputOptions)
- Define a subset
InputOptions of required options, along with any additional required information
- Combine all of the parameters in 2 into the existing
CorrectionParameters, remove options attribute from this class
This decouples input options from those required to correct a treebank. Only downside is that any future options have to be declared in CorrectionParameters. Actually I condiser this an upside, because it explicates the changes.
correcttreebank.CorrectionParameterscontains parameters required for correcting a treebank.One of its atributes is
optionswhich is an unspecified dictionary of which some entries are required. The code needs to be followed aross various functions to discover which of these are actuall required, and where they are instantiated. Also, some keys are repeated (e.g.corr).Proposal:
@dataclass InputOptions)InputOptionsof required options, along with any additional required informationCorrectionParameters, removeoptionsattribute from this classThis decouples input options from those required to correct a treebank. Only downside is that any future options have to be declared in
CorrectionParameters. Actually I condiser this an upside, because it explicates the changes.