Closed toasted-nutbread closed 5 months ago
Thoughts on naming:
Overall, I'm not sure what the best naming strategy is for everything in here, so I'm open to suggestion. Primarily, I'm not sure if "rule" is a good name for how it's being used here. Similar for "variants", but I couldn't immediately think of anything that is more clear. I tried to avoid having both "rule" and "reason" since I think the two can be easily confused. So some of the current types I'm looking at for the raw JSON file would be something like:
Transformation
TransformationVariant
TransformationRule
Again please provide any thoughts on alternate ways to name these.
Related links:
I think a good name should express that Transformation
should be bigger than TransformationVariant
. I was pretty confused as to what TransformationVariant
was supposed to be when I first read the deinflector code (I didn't think it as a subclass of transformations)
some names i can think of:
Transformation
and AtomicTransformation
(inspired from Rust and cpp, also has the benefit that atomics mean that this is the smallest case possible (so the relationship can be easily inferred from Transformation
or TransformationChain
etc))
TransformationGroup
and Transformation
Transformation
and TransformationCase
I'm messing around with the idea of updating the structure of the deinflection file to support a few things:
So here's somewhat of a preview of what might work:
A few notes:
rules.*.partsOfSpeech
corresponds to the[3]
field of each source definition in dictionaries. In general, these correlate with the name of the rule, but do not need to match.rules.v1
entry, note the"subRules": ["v1d", "v1p"]
declaration. This is intended to map to the changes in #547.i18n
will be used to provide language translations, which are optional. Dictionary or localization providers should also be able to eventually provide these separately if desired.transforms
for generalization.variants
.kana(In|Out)
has been renamed tosuffix(In|Out)
.Thoughts on naming:
Overall, I'm not sure what the best naming strategy is for everything in here, so I'm open to suggestion. Primarily, I'm not sure if "rule" is a good name for how it's being used here. Similar for "variants", but I couldn't immediately think of anything that is more clear. I tried to avoid having both "rule" and "reason" since I think the two can be easily confused. So some of the current types I'm looking at for the raw JSON file would be something like:
Transformation
TransformationVariant
TransformationRule
Again please provide any thoughts on alternate ways to name these.
Related links: