🚀 anglicisms-spanish-flair-cs
このモデルは、スペイン語のニュース配信における未同化の英語の語彙借用(いわゆるアングリシズム)を検出するための事前学習済みモデルです。このモデルは、スペイン語で使用される外国語起源(主に英語)の単語、例えば fake news、machine learning、smartwatch、influencer、streaming などの単語をラベル付けします。
✨ 主な機能
- このモデルは、コードスイッチングデータで事前学習されたTransformerベースの埋め込み とサブワード埋め込み(BPEと文字埋め込み)を入力とするBiLSTM - CRFモデルです。
- このモデルは、語彙借用の検出タスクについて COALAS コーパスで学習されました。
- このモデルは2つのラベルを考慮します。
ENG
:英語の語彙借用(smartphone、online、podcast)
OTHER
:他の言語からの語彙借用(boutique、anime、umami)
- このモデルは、マルチトークンの借用を考慮するためにBIOエンコーディングを使用しています。
📦 インストール
from flair.data import Sentence
from flair.models import SequenceTagger
import pathlib
import os
if os.name == 'nt':
temp = pathlib.PosixPath
pathlib.PosixPath = pathlib.WindowsPath
tagger = SequenceTagger.load("lirondos/anglicisms-spanish-flair-cs")
💻 使用例
基本的な使用法
text = "Las fake news sobre la celebrity se reprodujeron por los mass media en prime time."
sentence = Sentence(text)
tagger.predict(sentence)
print(sentence)
print('The following borrowing were found:')
for entity in sentence.get_spans():
print(entity)
📚 ドキュメント
メトリクス(テストセット)
COALAS コーパスのテストセットで得られた結果です。
Property |
Details |
ALL Precision |
90.14 |
ALL Recall |
81.79 |
ALL F1 |
85.76 |
ENG Precision |
90.16 |
ENG Recall |
84.34 |
ENG F1 |
87.16 |
OTHER Precision |
85.71 |
OTHER Recall |
13.04 |
OTHER F1 |
22.64 |
データセット
このモデルは、未同化の語彙借用が注釈付けされたスペイン語のニュース配信コーパスである COALAS で学習されました。このコーパスは370,000トークンを含み、ヨーロッパスペイン語で書かれた様々な書き媒体を含んでいます。テストセットはできるだけ難しく設計されています。トレーニングセットで見られないソースと日付をカバーし、多くのOOV単語(テストセットの借用語の92%がOOV)を含み、借用語が非常に密集しています(1,000トークンあたり20個の借用語)。
Set |
Tokens |
ENG |
OTHER |
Unique |
Training |
231,126 |
1,493 |
28 |
380 |
Development |
82,578 |
306 |
49 |
316 |
Test |
58,997 |
1,239 |
46 |
987 |
Total |
372,701 |
3,038 |
123 |
1,683 |
詳細情報
データセット、モデルの実験、エラー分析に関する詳細情報は、論文 Detecting Unassimilated Borrowings in Spanish: An Annotated Corpus and Approaches to Modeling で見ることができます。
📄 ライセンス
このモデルはCC - BY - 4.0ライセンスの下で提供されています。
引用
このモデルを使用する場合は、次の参考文献を引用してください。
@inproceedings{alvarez-mellado-lignos-2022-detecting,
title = "Detecting Unassimilated Borrowings in {S}panish: {A}n Annotated Corpus and Approaches to Modeling",
author = "{\'A}lvarez-Mellado, Elena and
Lignos, Constantine",
booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = may,
year = "2022",
address = "Dublin, Ireland",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2022.acl-long.268",
pages = "3868--3888",
abstract = "This work presents a new resource for borrowing identification and analyzes the performance and errors of several models on this task. We introduce a new annotated corpus of Spanish newswire rich in unassimilated lexical borrowings{---}words from one language that are introduced into another without orthographic adaptation{---}and use it to evaluate how several sequence labeling models (CRF, BiLSTM-CRF, and Transformer-based models) perform. The corpus contains 370,000 tokens and is larger, more borrowing-dense, OOV-rich, and topic-varied than previous corpora available for this task. Our results show that a BiLSTM-CRF model fed with subword embeddings along with either Transformer-based embeddings pretrained on codeswitched data or a combination of contextualized word embeddings outperforms results obtained by a multilingual BERT-based model.",
}