🚀 英文非事實類問題分類模型(NFQA)
本項目聚焦於英文非事實類問題的分類,藉助預訓練模型,能精準識別不同類型的非事實類問題,為自然語言處理相關任務提供有力支持。
🚀 快速開始
模型信息
倉庫地址:https://github.com/Lurunchik/NF-CATS
該模型基於NFQA數據集進行訓練。基礎模型採用 roberta-base-squad2,這是一個基於RoBERTa的問答模型,使用SQuAD2.0數據集進行了微調。
模型使用 NOT-A-QUESTION
、FACTOID
、DEBATE
、EVIDENCE-BASED
、INSTRUCTION
、REASON
、EXPERIENCE
、COMPARISON
這些標籤進行分類。
📦 安裝指南
文檔未提及具體安裝步驟,若有需求可參考倉庫代碼進行安裝。
💻 使用示例
基礎用法
加載NFQA模型及其分詞器:
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")
使用輔助函數進行預測:
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?')
📚 詳細文檔
模型演示
你可以通過 hugginface space 對模型進行測試。

📄 許可證
本項目採用MIT許可證。
📖 引用說明
如果你在工作中使用了 NFQA-cats
模型,請引用 這篇論文
@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}
}
祝你使用愉快!🤗