🚀 FewShotIssueClassifier-NLBSE23
這是一個使用句子轉換器(Sentence Transformers)的SetFit模型,它可以將句子和段落映射到768維的密集向量空間。該模型可用於聚類或語義搜索等任務。
此特定模型針對問題報告分類進行了微調,分為4類:錯誤(bug)、文檔(documentation)、功能(feature)和問題(question)。
🚀 快速開始
本模型可用於將句子和段落映射到768維的密集向量空間,適用於聚類或語義搜索等任務。尤其針對問題報告分類進行了微調,能準確區分錯誤、文檔、功能和問題這四類。
✨ 主要特性
- 使用句子轉換器(Sentence Transformers)將文本映射到768維密集向量空間。
- 針對問題報告分類進行微調,分為4類:錯誤、文檔、功能和問題。
📦 安裝指南
文檔未提供具體安裝命令,故跳過此章節。
💻 使用示例
基礎用法
from sentence_transformers.losses import CosineSimilarityLoss
from setfit import SetFitModel
from setfit import SetFitTrainer
sentences = ["error in line 20", "add method list_features"]
label_mapping = {
0 : "bug",
1 : "documentation",
2 : "feature",
3 : "question"
}
model = SetFitModel.from_pretrained('PeppoCola/FewShotIssueClassifier-NLBSE23')
predictions = model.predict(sentences)
print([label_mapping[i] for i in predictions])
📚 詳細文檔
數據集
該模型在NLBSE23數據集的一個子集上進行訓練。該樣本經過人工標註,並在Zenodo上提供。
引用與作者
@software{Colavito_Few-Shot_Learning_for_2023,
title = {{Few-Shot Learning for Issue Report Classification}},
author = {Colavito, Giuseppe and Lanubile, Filippo and Novielli, Nicole},
year = 2023,
month = 2,
url = {https://github.com/collab-uniba/Issue-Report-Classification-NLBSE2023},
version = {1.0.0}
}
@dataset{colavito_giuseppe_2023_7628150,
author = {Colavito Giuseppe and
Lanubile Filippo and
Novielli Nicole},
title = {Few-Shot Learning for Issue Report Classification},
month = feb,
year = 2023,
note = {{To use this, merge the CSV with the original
dataset (after removing duplicates on the 'id'
column)}},
publisher = {Zenodo},
doi = {10.5281/zenodo.7628150},
url = {https://doi.org/10.5281/zenodo.7628150}
}
@inproceedings{Colavito-2023,
title = {Few-Shot Learning for Issue Report Classification},
author = {Colavito, Giuseppe and Lanubile, Filippo and Novielli, Nicole},
year = 2023,
booktitle = {2nd International Workshop on Natural Language-Based Software Engineering (NLBSE)}
}
📄 許可證
本模型使用的許可證為GPL-3.0。