Non Factoid Question Category classification in English
NFQA model
Repository: https://github.com/Lurunchik/NF-CATS
Model trained with NFQA dataset. Base model is roberta-base-squad2, a RoBERTa-based model for the task of Question Answering, fine-tuned using the SQuAD2.0 dataset.
Uses NOT-A-QUESTION
, FACTOID
, DEBATE
, EVIDENCE-BASED
, INSTRUCTION
, REASON
, EXPERIENCE
, COMPARISON
labels.
How to use NFQA cat with HuggingFace
Load NFQA cat and its tokenizer:
from transformers import AutoTokenizer<br /> from nfqa_model import RobertaNFQAClassification<br /> nfqa_model = RobertaNFQAClassification.from_pretrained("Lurunchik/nf-cats")<br /> nfqa_tokenizer = AutoTokenizer.from_pretrained("deepset/roberta-base-squad2")<br />
Make prediction using helper function:
def get_nfqa_category_prediction(text):<br /> output = nfqa_model(**nfqa_tokenizer(text, return_tensors="pt"))<br /> index = output.logits.argmax()<br /> return nfqa_model.config.id2label[int(index)]<br /> get_nfqa_category_prediction('how to assign category?')<br /> # result<br /> #'INSTRUCTION'<br />
Demo
You can test the model via hugginface space.
Citation
If you use NFQA-cats
in your work, please cite this paper
@misc{bolotova2022nfcats,<br /> author = {Bolotova, Valeriia and Blinov, Vladislav and Scholer, Falk and Croft, W. Bruce and Sanderson, Mark},<br /> title = {A Non-Factoid Question-Answering Taxonomy},<br /> year = {2022},<br /> isbn = {9781450387323},<br /> publisher = {Association for Computing Machinery},<br /> address = {New York, NY, USA},<br /> url = {https://doi.org/10.1145/3477495.3531926},<br /> doi = {10.1145/3477495.3531926},<br /> booktitle = {Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval},<br /> pages = {1196–1207},<br /> numpages = {12},<br /> keywords = {question taxonomy, non-factoid question-answering, editorial study, dataset analysis},<br /> location = {Madrid, Spain},<br /> series = {SIGIR '22}<br /> }<br />
Enjoy! 🤗
收录说明:
1、本网页并非 Lurunchik/nf-cats 官网网址页面,此页面内容编录于互联网,只作展示之用;2、如果有与 Lurunchik/nf-cats 相关业务事宜,请访问其网站并获取联系方式;3、本站与 Lurunchik/nf-cats 无任何关系,对于 Lurunchik/nf-cats 网站中的信息,请用户谨慎辨识其真伪。4、本站收录 Lurunchik/nf-cats 时,此站内容访问正常,如遇跳转非法网站,有可能此网站被非法入侵或者已更换新网址,导致旧网址被非法使用,5、如果你是网站站长或者负责人,不想被收录请邮件删除:i-hu#Foxmail.com (#换@)
前往AI网址导航
2、本站所有文章、图片、资源等如果未标明原创,均为收集自互联网公开资源;分享的图片、资源、视频等,出镜模特均为成年女性正常写真内容,版权归原作者所有,仅作为个人学习、研究以及欣赏!如有涉及下载请24小时内删除;
3、如果您发现本站上有侵犯您的权益的作品,请与我们取得联系,我们会及时修改、删除并致以最深的歉意。邮箱: i-hu#(#换@)foxmail.com