Loading...


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
from nfqa_model import RobertaNFQAClassification 
nfqa_model = RobertaNFQAClassification.from_pretrained("Lurunchik/nf-cats")
nfqa_tokenizer = AutoTokenizer.from_pretrained("deepset/roberta-base-squad2")


Make prediction using helper function:

def get_nfqa_category_prediction(text):
    output = nfqa_model(**nfqa_tokenizer(text, return_tensors="pt"))
    index = output.logits.argmax()
    return nfqa_model.config.id2label[int(index)]
get_nfqa_category_prediction('how to assign category?')
# result
#'INSTRUCTION'


Demo

You can test the model via hugginface space.

demo.png


Citation

If you use NFQA-cats in your work, please cite this paper

@misc{bolotova2022nfcats,
        author = {Bolotova, Valeriia and Blinov, Vladislav and Scholer, Falk and Croft, W. Bruce and Sanderson, Mark},
        title = {A Non-Factoid Question-Answering Taxonomy},
        year = {2022},
        isbn = {9781450387323},
        publisher = {Association for Computing Machinery},
        address = {New York, NY, USA},
        url = {https://doi.org/10.1145/3477495.3531926},
        doi = {10.1145/3477495.3531926},
        booktitle = {Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval},
        pages = {1196–1207},
        numpages = {12},
        keywords = {question taxonomy, non-factoid question-answering, editorial study, dataset analysis},
        location = {Madrid, Spain},
        series = {SIGIR '22}
}

Enjoy! ?

数据统计

数据评估

Lurunchik/nf-cats浏览人数已经达到2,599,如你需要查询该站的相关权重信息,可以点击"5118数据""爱站数据""Chinaz数据"进入;以目前的网站数据参考,建议大家请以爱站数据为准,更多网站价值评估因素如:Lurunchik/nf-cats的访问速度、搜索引擎收录以及索引量、用户体验等;当然要评估一个站的价值,最主要还是需要根据您自身的需求以及需要,一些确切的数据则需要找Lurunchik/nf-cats的站长进行洽谈提供。如该站的IP、PV、跳出率等!

关于Lurunchik/nf-cats特别声明

本站Ai导航提供的Lurunchik/nf-cats都来源于网络,不保证外部链接的准确性和完整性,同时,对于该外部链接的指向,不由Ai导航实际控制,在2023年5月15日 下午3:15收录时,该网页上的内容,都属于合规合法,后期网页的内容如出现违规,可以直接联系网站管理员进行删除,Ai导航不承担任何责任。

相关导航

暂无评论

暂无评论...