🚀 古希臘語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)}
}