salesforce / ctrl-sum

Resources for the "CTRLsum: Towards Generic Controllable Text Summarization" paper
https://arxiv.org/abs/2012.04281
BSD 3-Clause "New" or "Revised" License
146 stars 24 forks source link

how to do test-time keyword extraction? #14

Closed aliencaocao closed 2 years ago

aliencaocao commented 2 years ago

In the research paper, it was mentioned that ctrl-sum can extract keywords at test time. May I know how do I do it? The provided tutorials are just for summaries, not keywords. image

jxhe commented 2 years ago

The tutorials include instructions to extract keywords from the tagger: https://github.com/salesforce/ctrl-sum#obtain-automatic-keywords-from-a-trained-tagger

but you need to train the tagger first using our script. If you want our pretrained tagger for direct use, drop me an email at junxianh@cs.cmu.edu and I can share the pretrained tagger with you.

aliencaocao commented 2 years ago

Hi, I have emailed you, thank you!

jxhe commented 2 years ago

I have sent over email, hope it is helpful!

aliencaocao commented 2 years ago

Hi, I have converted the pretrained tagger model you provided into ONNX which makes it much faster to load and run inference, I also made a simple inference flask server app that generates keywords from a given source. Would you be interested to see it and perhaps add it to this repository?

jxhe commented 2 years ago

Wow thanks a bunch! I would like to see it and feel free to open pull request for that.

aliencaocao commented 2 years ago

Ok sure. I do not think I will make it as a PR because actually no code from this ctrl-sum repo is being reused. I will make a new repo and once it's ready, I will tag you here. You can then decide on how to integrate it into your this repo.

jxhe commented 2 years ago

Thanks! With the easiest way I could refer to your repo in the readme so that people can just check your repo directly.

aliencaocao commented 2 years ago

Hi, sorry for the wait. I have just published my code for the pretrained tagger model here: https://github.com/aliencaocao/CTRLSum-tagger

jxhe commented 2 years ago

@aliencaocao Thank you a bunch! Just added reference to your repo in our README.