CentreForDigitalHumanities / CentreForDigitalHumanities/sastadev
Datastructure for input options and treebank correction
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
`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:
1. Implement data structure for input options (e.g. `@dataclass InputOptions`)
2. Define a subset `InputOptions` of required options, along with any additional required information
3. 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing correcttreebank.CorrectionParameters and the options dictionary through the correction functions to identify required keys, their instantiation points, and repeated entries such as corr. Define the proposed input structure and consolidate the required correction parameters, then verify that callers no longer depend on the removed options attribute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100