🚀 古希腊语BERT
这是首个且唯一可用的古希腊语子词BERT模型!该模型在词性标注和形态分析的微调后达到了最先进的水平。它为标准的12层、768维BERT-base模型提供了预训练权重。
在我们的GitHub仓库中,你可以找到使用该模型以及对其进行词性标注微调的脚本。
请参考我们的论文:"A Pilot Study for BERT Language Modelling and Morphological Analysis for Ancient and Medieval Greek"。该论文发表于第五届文化遗产、社会科学、人文与文学计算语言学联合研讨会(LaTeCH - CLfL 2021)。

🚀 快速开始
安装依赖
pip install transformers
pip install unicodedata
pip install flair
从HuggingFace模型中心直接使用
from transformers import AutoTokenizer, AutoModel
tokeniser = AutoTokenizer.from_pretrained("pranaydeeps/Ancient-Greek-BERT")
model = AutoModel.from_pretrained("pranaydeeps/Ancient-Greek-BERT")
✨ 主要特性
- 首个且唯一可用的古希腊语子词BERT模型。
- 在词性标注和形态分析的微调后达到了最先进的水平。
- 为标准的12层、768维BERT - base模型提供预训练权重。
📦 安装指南
安装所需的依赖库,使用以下命令:
pip install transformers
pip install unicodedata
pip install flair
💻 使用示例
基础用法
from transformers import AutoTokenizer, AutoModel
tokeniser = AutoTokenizer.from_pretrained("pranaydeeps/Ancient-Greek-BERT")
model = AutoModel.from_pretrained("pranaydeeps/Ancient-Greek-BERT")
📚 详细文档
词性/形态分析微调
关于微调的代码和详细信息,请参考GitHub仓库。
训练数据
该模型从AUEB NLP Group's Greek BERT初始化,随后在来自First1KGreek项目、Perseus数字图书馆、PROIEL树库和Gorman树库的单语数据上进行训练。
训练和评估细节
按照AUEB NLP Group's Greek BERT的建议,对希腊语进行标准的去重音和小写处理。
该模型在4个NVIDIA Tesla V100 16GB GPU上训练了80个epoch,最大序列长度为512,在保留的测试集上的困惑度为4.8。
在所有3个树库上进行词性标注和形态分析的微调时,该模型也取得了最先进的结果,平均准确率超过90%。如有更多问题,请查阅我们的论文或联系我。
📄 许可证
文档中未提及许可证相关信息。
📚 引用
如果你在研究中使用了古希腊语BERT,请引用以下论文:
@inproceedings{ancient-greek-bert,
author = {Singh, Pranaydeep and Rutten, Gorik and Lefever, Els},
title = {A Pilot Study for BERT Language Modelling and Morphological Analysis for Ancient and Medieval Greek},
year = {2021},
booktitle = {The 5th Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature (LaTeCH-CLfL 2021)}
}