模型:

rohanrajpal/bert-base-multilingual-codemixed-cased-sentiment

英文

BERT codemixed base模型的hinglish(大小写)

模型描述

模型的输入:任何混合hinglish文本;模型的输出:情感(0-消极,1-中性,2-积极)

我使用了来自Huggingface的bert-base-multilingual-cased模型,并在 SAIL 2017 个数据集上进行了微调。

这个模型在SAIL 2017数据集上的表现

metric score
acc 0.588889
f1 0.582678
acc_and_f1 0.585783
precision 0.586516
recall 0.588889

预期用途和限制

如何使用

如下是如何使用此模型在PyTorch中获取给定文本特征的方法:

# You can include sample code which will be formatted
from transformers import BertTokenizer, BertModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("rohanrajpal/bert-base-codemixed-uncased-sentiment")
model = AutoModelForSequenceClassification.from_pretrained("rohanrajpal/bert-base-codemixed-uncased-sentiment")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)

以及在TensorFlow中的方法:

from transformers import BertTokenizer, TFBertModel
tokenizer = BertTokenizer.from_pretrained('rohanrajpal/bert-base-codemixed-uncased-sentiment')
model = TFBertModel.from_pretrained("rohanrajpal/bert-base-codemixed-uncased-sentiment")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)
限制和偏见

即将推出!

训练数据

我在SAIL 2017数据集中进行了训练,数据集为 link ,训练方式为 pretrained model

训练过程

无预处理。

评估结果

BibTeX条目和引用信息

@inproceedings{khanuja-etal-2020-gluecos,
    title = "{GLUEC}o{S}: An Evaluation Benchmark for Code-Switched {NLP}",
    author = "Khanuja, Simran  and
      Dandapat, Sandipan  and
      Srinivasan, Anirudh  and
      Sitaram, Sunayana  and
      Choudhury, Monojit",
    booktitle = "Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics",
    month = jul,
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2020.acl-main.329",
    pages = "3575--3585"
}