kmkurn / pytorch-crf

(Linear-chain) Conditional random field in PyTorch.
https://pytorch-crf.readthedocs.io
MIT License
935 stars 151 forks source link

WIP: Marginal probabilities #20

Closed JeppeHallgren closed 6 years ago

JeppeHallgren commented 6 years ago

This computes the marginal probabilities of the given emissions (the probability of seeing a tag T and at position P in the sequence).

This is work in progress - @kmkurn let me know if you have any comments. Also, this currently includes the commits from #16 , so the diff might look at bit messy until that has been merged.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9eb97622d5e713690a69ceb5e820864115409580 on JeppeHallgren:marginal-prob into 839299625cd2fdae4a9b3d6aa87c230010f7961e on kmkurn:master.

kmkurn commented 6 years ago

This is awesome! I originally intended to implement this as well but it was too hard and time was limited, so thank you for taking on this. I don't have much comments as for now because (as you've already noted) the code contains changes from other PRs so it's sort of messy. I've merged #16 so could you please rebase this branch onto master? That way it'd be easier for me to review the code.

JeppeHallgren commented 6 years ago

@kmkurn rebased in #21 . Closing this PR.