Sponsored by
Crazyrouter
-The enterprise-grade, cost-effective AI API gateway that provides one API key to access 300+ AI models through OpenAI-compatible endpoints, with
A joint morphosyntactic tagging and dependency parsing model for Ancient Greek: factored
XPOS position tagging (9 heads decoded jointly), edit-script lemmatization, UPOS
tagging, and biaffine dependency parsing, all from a single shared backbone via an
ELMo-style scalar mix over all 33 encoder layers. Fine-tuned from
Ericu950/CharDiff-grc-doc_clean
on
Celano's AGDT treebank
Results (test split)
metric
this model
best published external (Celano 2025)
XPOS
93.3
91.55 (Trankit)
Lemma
93.8
91.17 (GreTa)
UPOS
96.9
96.18 (Trankit)
LAS
83.8
76.67 (Trankit)
See the paper for the full
cross-encoder ablation (this backbone vs. six external subword encoders under the
identical fine-tuning recipe).
Usage
import torch
from transformers import AutoModel
from huggingface_hub import snapshot_download
repo = "Ericu950/CharDiff-grc-tagger-parser"
local_dir = snapshot_download(
repo,
allow_patterns=["*.json", "*.txt", "*.py", "*.model"],
)
import sys
sys.path.insert(0, local_dir)
from processing_char_bert_joint import CharBertJointProcessor
model = AutoModel.from_pretrained(repo, trust_remote_code=True)
processor = CharBertJointProcessor.from_pretrained(local_dir)
model.eval()
words = "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος".split()
batch = processor([words])
with torch.no_grad():
out = model(**batch)
rows = processor.decode(out, batch)
defprint_parse(decoded):
sentences = [decoded] if decoded andisinstance(decoded[0], dict) else decoded
cols = ["id", "form", "lemma", "upos", "xpos", "head", "deprel"]
for s_idx, sent inenumerate(sentences, start=1):
table = [
{
"id": str(i),
"form": r["form"],
"lemma": r["lemma"],
"upos": r["upos"],
"xpos": r["xpos"],
"head": str(r["head"]),
"deprel": r["deprel"],
}
for i, r inenumerate(sent, start=1)
]
widths = {c: max(len(c), *(len(row[c]) for row in table)) for c in cols}
header = " ".join(c.upper().ljust(widths[c]) for c in cols)
iflen(sentences) > 1:
print(f"\n# sentence {s_idx}")
print(header)
print("-" * len(header))
for row in table:
print(" ".join(row[c].ljust(widths[c]) for c in cols))
print_parse(processor.decode(out, batch))
ID FORM LEMMA UPOS XPOS HEAD DEPREL
-------------------------------------------------------
1 μῆνιν μῆνις n n-s---fa- 2 OBJ
2 ἄειδε ἀείδω v v2spma--- 0 PRED
3 θεὰ θεά n n-s---fv- 2 ExD
4 Πηληϊάδεω Πηληιάδης n n-s---mg- 5 ATR
5 Ἀχιλῆος Ἀχιλλεύς n n-s---mg- 1 ATR
Unlike the base backbone, this model's input includes a capitalization channel
(fine-tune-only, zero-initialized at pretraining time) and operates on whole,
word-tokenized sentences rather than raw unsegmented text — the processor expects a
list of word strings (or a list of sentences, each a list of words) and handles the
character-level packing and word-level pooling internally.
CharDiff-grc-tagger-parser huggingface.co is an AI model on huggingface.co that provides CharDiff-grc-tagger-parser's model effect (), which can be used instantly with this Ericu950 CharDiff-grc-tagger-parser model. huggingface.co supports a free trial of the CharDiff-grc-tagger-parser model, and also provides paid use of the CharDiff-grc-tagger-parser. Support call CharDiff-grc-tagger-parser model through api, including Node.js, Python, http.
CharDiff-grc-tagger-parser huggingface.co is an online trial and call api platform, which integrates CharDiff-grc-tagger-parser's modeling effects, including api services, and provides a free online trial of CharDiff-grc-tagger-parser, you can try CharDiff-grc-tagger-parser online for free by clicking the link below.
Ericu950 CharDiff-grc-tagger-parser online free url in huggingface.co:
CharDiff-grc-tagger-parser is an open source model from GitHub that offers a free installation service, and any user can find CharDiff-grc-tagger-parser on GitHub to install. At the same time, huggingface.co provides the effect of CharDiff-grc-tagger-parser install, users can directly use CharDiff-grc-tagger-parser installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
CharDiff-grc-tagger-parser install url in huggingface.co: