change(web): stage construction of CorrectionPredictionTuple instances - #16429
Conversation
Build-bot: skip build:web Test-bot: skip
User Test ResultsTest specification and instructions User tests are not required Test Artifacts |
mcdurdin
left a comment
There was a problem hiding this comment.
There is a fair bit of stuff moving around here but I am not entirely sure why. Why did you extract matchLevel and preservationTransform into a separate PredictionMetadata interface? It seems like additional it adds extra verbosity to the code but the interface is not used outside that one place.
Why is CorrectionPredictionTuple separated from CorrectionPredictionTupleCore? Why can't metadata just be an optional property of CorrectionPredictionTuple as it was before? What is the benefit? Does this restructuring make the code more robust, or easier to understand, or faster?
(FWIW, we usually try to avoid using terms like Tuple because it doesn't add useful information about the type. CorrectionPredictionProbability seems closer? or SuggestionProbability? But I'm not entirely sure if those suggestions are right.)
Otherwise, the changes LGTM
For this PR, yes. The next PR - #16436 - will do a little more with the extracted type. Furthermore, epic/boundary-correction already has the type, which is part of why I decided to go ahead and leverage similar structure for this purpose.
It becomes clearer where and when the New fields added to the |
Co-authored-by: Marc Durdin <marc@durdin.net>
|
Changes in this pull request will be available for download in Keyman version 19.0.279-alpha |
Build-bot: skip build:web
Test-bot: skip