chanind / frame-semantic-transformer

Frame Semantic Parser based on T5 and FrameNet
https://chanind.github.io/frame-semantic-transformer
MIT License
51 stars 10 forks source link

fix: fixing errors when no frames are found #14

Closed chanind closed 1 year ago

chanind commented 1 year ago

This PR fixes a bug likely introduced in #11, where if a sentence has no results a keyerror is thrown. In addition, this PR makes the frame detect handling more robust so if the model doesn't get the capitalization 100% correct on the identified frame this will still register the frame match rather than returning None.

fixes #12