harvardnlp / pytorch-struct

Fast, general, and tested differentiable structured prediction in PyTorch
http://harvardnlp.github.io/pytorch-struct
MIT License
1.11k stars 93 forks source link

Lengths for semimarkov "to_parts" method #118

Closed urchade closed 2 years ago

urchade commented 3 years ago

With this modification, the "to_parts" method gives a proper representation of the edges even if the padding tokens are not -1.