clay-lab / transductions

A PyTorch framework for creating, running, and reproducing experiments on seq2seq models.
6 stars 3 forks source link

Using annotation tag #16

Open NoahAmsel opened 4 years ago

NoahAmsel commented 4 years ago

Right now we apply either SRC or TRG field to the annotation column. This shouldn't happen, but we DO need a way of sneaking the transformation tag into the vocab.

NoahAmsel commented 4 years ago

See the mechanism here: https://github.com/clay-lab/transductions/blob/TreeAttn/models.py#L519

NoahAmsel commented 4 years ago

Write a subclass of seq2seq that keeps a vocabulary mapping translation tags to vectors. Then modify the models to just take this initial vector as input instead of the transition tag.

Also: work out a way to infer the list of transition tags from the dataset. Will probably have to use a Field instead of a RawField, which will mean lots of lists of length 1. But the seq2seq subclass can handle that detail