CUNY-CL / yoyodyne

Small-vocabulary sequence-to-sequence generation with optional feature conditioning
Apache License 2.0
30 stars 17 forks source link

Move EditAction Behavior to Indexes #248

Open bonham79 opened 1 month ago

bonham79 commented 1 month ago

With https://github.com/CUNY-CL/yoyodyne/pull/247, most of the work in instantiating edit actions for the transducer is coming from the Index. It would make more sense to just make this inherited behavior from the Index class and create a new 'ActionIndex` class that takes over all behavior related to edit action creation. This would allow the target_vocabulary related behavior for the transducer to be managed at index creation, instead of adding hacks in the train and model code.

I'm also gonna sneak in potential changes to the expert class that trains the SED when creating the dataloader, allowing us to only iterate through the train set once. With enough code moved around, the expert class can be changed to a mixin (which I'll handle in a separate PR.)

bonham79 commented 6 days ago

@kylebgorman with the new prs in i'm going to work on this over the weekend so we can clear up more of these issues