Token Classification
Transformers
ONNX
Safetensors
English
Japanese
Chinese
bert
anime
filename-parsing
Eval Results (legacy)
Run this model with HF Jobs
Run ModerRAS/AniFileBERT on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ModerRAS/AniFileBERT. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ModerRAS/AniFileBERT on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use ModerRAS/AniFileBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ModerRAS/AniFileBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ModerRAS/AniFileBERT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("ModerRAS/AniFileBERT") model = AutoModelForTokenClassification.from_pretrained("ModerRAS/AniFileBERT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Train thin anime filename parser
Browse filesFiles changed (21)
- MAINTENANCE.md+8-1
- README.md+28-22
- benchmark_inference.py+5-4
- benchmark_results.json+21-19
- build_repair_focus_dataset.py+88
- case_metrics.json+1725-553
- datasets/AnimeName+1-1
- dmhy_dataset.py+41-1
- docs/onnx.md+19-11
- docs/training.md+36-20
- evaluate_parser_cases.py+71-20
- exports/anime_filename_parser.metadata.json+1-1
- exports/anime_filename_parser.onnx+2-2
- inference.py+59-28
- model.safetensors+1-1
- onnx_inference.py+5-4
- parse_eval_metrics.json+1142-566
- run_metadata.json+12-12
- train.py+54-22
- trainer_eval_metrics.json+9-9
- training_args.bin+1-1
116 unmodified lines11711811912012112212312459 unmodified lines184185186187116 unmodified lines```powershelluv run python evaluate_parser_cases.py --model-dir . --case-file data/parser_regression_cases.json --output case_metrics.jsonuv run python onnx_inference.py "[GM-Team][国漫][神印王座][Throne of Seal][2022][200][AVC][GB][1080P].mp4"```## Dataset Submodule / 数据集子模块If `datasets/AnimeName` changed, commit and push it first:59 unmodified linesscraper/src/main/assets/anime_parser/config.jsonscraper/src/main/assets/anime_parser/vocab.json```116 unmodified lines11711811912012112212312412512612712812913013113259 unmodified lines192193194116 unmodified lines```powershelluv run python evaluate_parser_cases.py --model-dir . --case-file data/parser_regression_cases.json --output case_metrics.jsonuv run python onnx_inference.py "[GM-Team][国漫][神印王座][Throne of Seal][2022][200][AVC][GB][1080P].mp4"uv run python benchmark_inference.py --model-dir . --onnx exports/anime_filename_parser.onnx --case-file data/parser_regression_cases.json --repeat 20 --warmup 20 --torch-threads 1 --ort-threads 1 --output benchmark_results.json```The default parser path is thin runtime: model logits, constrained BIO, entityaggregation, and light string/number normalization. `--rule-assist` is acompatibility/diagnostic mode only; do not use it as the primary quality metric.默认解析路径是薄层运行时:模型 logits、约束 BIO、实体聚合和轻量字符串/数字规范化。`--rule-assist` 只是兼容/诊断模式,不作为主质量指标。## Dataset Submodule / 数据集子模块If `datasets/AnimeName` changed, commit and push it first:59 unmodified linesscraper/src/main/assets/anime_parser/config.jsonscraper/src/main/assets/anime_parser/vocab.json```
24 unmodified lines2526272829303120 unmodified lines52535455565758596053 unmodified lines11411511611711811912015 unmodified lines13613713813914014114214314414514614714814915011 unmodified lines16216316416516616716816917017117217317417517617717817918018118217 unmodified lines20020120220320420565 unmodified lines27127227327427527627727827928028124 unmodified linestype: parser-regressionmetrics:- type: accuracyname: Fixed parser full-match accuracyvalue: 1.0---20 unmodified lines| Default checkpoint / 默认权重 | Repository root files (`config.json`, `model.safetensors`, `vocab.json`, `tokenizer_config.json`) || ONNX export / ONNX 导出 | `exports/anime_filename_parser.onnx` |**中文**:根目录就是发布 checkpoint,不再保留旧的 `model/` 重复副本。完整解析请使用本仓库的 `inference.py` 或复用 `tokenizer.py`、BIO decode 和字段聚合逻辑;直接 `from_pretrained()` 只能加载 token-classification 权重。**English**: The repository root is the published checkpoint. The old duplicate `model/` directory is intentionally not used. For end-to-end parsing, use `inference.py` or reuse this repo's tokenizer, BIO decoder, and field aggregation logic; `from_pretrained()` only loads token-classification weights.## Intended Use / 使用场景53 unmodified lines1. custom character tokenization,2. constrained BIO decoding,3. field aggregation and high-confidence structural cleanup.本仓库提供最小可运行示例:15 unmodified lines| Metric / 指标 | Value / 数值 || --- | --- || Fixed real-case regression / 固定真实回归 | 26/26 full match || ONNX parity / ONNX 误差 | max abs diff `2.6703e-05` || Token/entity eval after focus tuning / focus 微调后实体评估 | F1 `0.9666`, token accuracy `0.9904` || Focus parse eval / focus 解析评估 | 385/512 full match || CPU end-to-end latency / CPU 端到端延迟 | ONNX avg `30.35 ms`, P95 `34.44 ms` |**中文**:当前发布模型是“全量重标注 char 模型 + special-code focus 微调”。固定回归集覆盖真实用户反馈样式;focus eval 是偏向困难样本的评估,不等同于全量随机 DMHY 评估。**English**: The published checkpoint is the full-relabel character model plus a targeted special-code focus fine-tune. The fixed regression set covers real user-reported patterns; focus eval is intentionally biased toward hard examples and is not equivalent to a broad random DMHY evaluation.Run regression:11 unmodified linesuv run python benchmark_inference.py --model-dir . --onnx exports/anime_filename_parser.onnx --case-file data/parser_regression_cases.json --repeat 20 --warmup 20 --torch-threads 1 --ort-threads 1 --output benchmark_results.json```Local CPU benchmark on the 26 fixed real-world cases, single-threaded, includingtokenization, model/session forward, constrained BIO decoding, and fieldpostprocessing:本地 CPU 单线程测试,使用 26 条固定真实 case,包含 tokenizer、模型/session前向、约束 BIO 解码和字段后处理:| Backend / 后端 | Load ms / 加载 ms | Avg ms / 平均 ms | P50 ms | P95 ms | P99 ms | files/s || --- | ---: | ---: | ---: | ---: | ---: | ---: || PyTorch | 64.63 | 32.86 | 32.43 | 38.42 | 41.09 | 30.4 || ONNX Runtime | 898.63 | 30.35 | 30.12 | 34.44 | 36.86 | 33.0 |**中文**:这是完整 parser 的端到端延迟,不是只测模型 forward。模型本身很小,主要成本来自 Python/运行时的 BIO 解码和字段聚合;移动端实现应复用相同逻辑但避免重复创建 ONNX session。**English**: This is end-to-end parser latency, not model-forward-only timing. The model is small; most runtime cost is tokenizer/BIO decode/field aggregation overhead. Mobile code should keep the ONNX session reusable and avoid recreating it per filename.## Training / 训练17 unmodified lines--checkpoint-steps 1000 `--save-total-limit 3 `--parse-eval-limit 2048 `--seed 52 `--experiment-name dmhy-char-full```65 unmodified lines**中文**- 发布命名没有统一标准,极端 OCR 噪声、乱码、非动画命名仍可能失败。- ONNX 只包含模型 logits,不包含 tokenizer 和后处理;移动端必须保持 tokenizer/vocab/config 一致。- `source` 当前是单值字段,复杂文件名里可能同时存在平台、发布源、编码器和语言标签。**English**- Anime release names are not standardized; extreme OCR noise, mojibake, or non-anime names can still fail.- ONNX contains logits only. Mobile runtimes must keep tokenizer, vocabulary, config, BIO decode, and postprocessing in sync.- `source` is currently a single field, while real filenames may contain platform, release source, codec, and language tags together.24 unmodified lines2526272829303132333420 unmodified lines55565758596061626353 unmodified lines11711811912012112212315 unmodified lines13914014114214314414514614714814915015115215315415511 unmodified lines16716816917017117217317417517617717817918018118218318418518618717 unmodified lines20520620720820921021165 unmodified lines27727827928028128228328428528628724 unmodified linestype: parser-regressionmetrics:- type: accuracyname: Fixed parser model-only full-match accuracyvalue: 0.9615- type: accuracyname: Fixed parser thin-runtime full-match accuracyvalue: 1.0---20 unmodified lines| Default checkpoint / 默认权重 | Repository root files (`config.json`, `model.safetensors`, `vocab.json`, `tokenizer_config.json`) || ONNX export / ONNX 导出 | `exports/anime_filename_parser.onnx` |**中文**:根目录就是发布 checkpoint,不再保留旧的 `model/` 重复副本。默认解析路径是“模型 logits + 约束 BIO + 薄字段规范化”,不再默认启用重结构规则;直接 `from_pretrained()` 只能加载 token-classification 权重。**English**: The repository root is the published checkpoint. The default parser is model logits + constrained BIO + thin field normalization; heavy structural assist is not enabled by default. `from_pretrained()` only loads token-classification weights.## Intended Use / 使用场景53 unmodified lines1. custom character tokenization,2. constrained BIO decoding,3. field aggregation and thin string/number normalization.本仓库提供最小可运行示例:15 unmodified lines| Metric / 指标 | Value / 数值 || --- | --- || Fixed regression, model-only / 固定回归,纯模型聚合 | 25/26 full match = `96.15%` || Fixed regression, default thin runtime / 固定回归,默认薄层运行时 | 26/26 full match = `100%` || Focus held-out, model-only / 困难抽样,纯模型聚合 | 1014/1024 full match = `99.02%` || Focus held-out, default thin runtime / 困难抽样,默认薄层运行时 | 1017/1024 full match = `99.32%` || Token/entity eval / token/entity 评估 | F1 `0.9972`, token accuracy `0.9995` || ONNX parity / ONNX 误差 | max abs diff `4.0531e-05` || CPU thin-runtime latency / CPU 薄层运行时延迟 | ONNX avg `13.08 ms`, P95 `15.95 ms` |**中文**:当前发布模型是“全量重标注 char 模型 + thin hard-case focus 微调”。README 主指标以 `model-only` 和默认薄层 `normalized-only` 为准;`--rule-assist` 只保留为兼容/诊断对照,不再作为模型质量标准。**English**: The published checkpoint is the full-relabel character model plus a thin hard-case focus fine-tune. README quality numbers prioritize `model-only` and the default thin `normalized-only` runtime; `--rule-assist` is retained only for compatibility/diagnostics.Run regression:11 unmodified linesuv run python benchmark_inference.py --model-dir . --onnx exports/anime_filename_parser.onnx --case-file data/parser_regression_cases.json --repeat 20 --warmup 20 --torch-threads 1 --ort-threads 1 --output benchmark_results.json```Local CPU benchmark on the 26 fixed real-world cases, single-threaded, using thedefault thin runtime: tokenization, model/session forward, constrained BIOdecoding, entity aggregation, and light string/number normalization:本地 CPU 单线程测试,使用 26 条固定真实 case,默认薄层运行时,包含 tokenizer、模型/session 前向、约束 BIO 解码、实体聚合和轻量字符串/数字规范化:| Backend / 后端 | Load ms / 加载 ms | Avg ms / 平均 ms | P50 ms | P95 ms | P99 ms | files/s || --- | ---: | ---: | ---: | ---: | ---: | ---: || PyTorch | 49.07 | 15.16 | 14.87 | 18.50 | 21.91 | 66.0 || ONNX Runtime | 568.85 | 13.08 | 12.82 | 15.95 | 20.19 | 76.5 |**中文**:这是完整薄层 parser 的端到端延迟,不是只测模型 forward。移动端实现应复用 ONNX session,并保持 tokenizer/BIO/薄规范化逻辑一致。**English**: This is end-to-end thin-parser latency, not model-forward-only timing. Mobile code should keep the ONNX session reusable and keep tokenizer/BIO/thin-normalization behavior aligned.## Training / 训练17 unmodified lines--checkpoint-steps 1000 `--save-total-limit 3 `--parse-eval-limit 2048 `--case-eval-file data/parser_regression_cases.json `--seed 52 `--experiment-name dmhy-char-full```65 unmodified lines**中文**- 发布命名没有统一标准,极端 OCR 噪声、乱码、非动画命名仍可能失败。- ONNX 只包含模型 logits,不包含 tokenizer、BIO decode 和薄字段规范化;移动端必须保持 tokenizer/vocab/config 一致。- `source` 当前是单值字段,复杂文件名里可能同时存在平台、发布源、编码器和语言标签。**English**- Anime release names are not standardized; extreme OCR noise, mojibake, or non-anime names can still fail.- ONNX contains logits only. Mobile runtimes must keep tokenizer, vocabulary, config, BIO decode, and thin normalization in sync.- `source` is currently a single field, while real filenames may contain platform, release source, codec, and language tags together.
94 unmodified lines959697989910010125 unmodified lines12712812913013113213315 unmodified lines1491501511521531541557 unmodified lines16316416516616716816994 unmodified linesparser.add_argument("--torch-threads", type=int, default=1, help="torch intra-op thread count")parser.add_argument("--ort-threads", type=int, default=1, help="ONNX Runtime intra/inter-op thread count")parser.add_argument("--no-constrained-bio", action="store_true", help="Use greedy labels for PyTorch backend")parser.add_argument("--no-rule-assist", action="store_true", help="Disable structural postprocessing")parser.add_argument("--output", default=None, help="Optional JSON output path")args = parser.parse_args()25 unmodified linesid2label,max_length=resolved_max_length,debug=False,use_rules=not args.no_rule_assist,constrain_bio=not args.no_constrained_bio,)15 unmodified linesload_ms = (time.perf_counter() - load_start) * 1000.0def parse_onnx(filename: str) -> Dict:return onnx_parser.parse(filename, use_rules=not args.no_rule_assist)raw = run_benchmark("onnxruntime", parse_onnx, filenames, args.warmup, args.repeat)results.append(summarize(raw["name"], load_ms, raw["latencies_ms"]))7 unmodified lines"warmup": args.warmup,"torch_threads": args.torch_threads,"ort_threads": args.ort_threads,"use_rules": not args.no_rule_assist,"constrain_bio": not args.no_constrained_bio,"results": results,}94 unmodified lines959697989910010110225 unmodified lines12812913013113213313415 unmodified lines1501511521531541551567 unmodified lines16416516616716816917094 unmodified linesparser.add_argument("--torch-threads", type=int, default=1, help="torch intra-op thread count")parser.add_argument("--ort-threads", type=int, default=1, help="ONNX Runtime intra/inter-op thread count")parser.add_argument("--no-constrained-bio", action="store_true", help="Use greedy labels for PyTorch backend")parser.add_argument("--rule-assist", action="store_true", help="Enable legacy structural postprocessing")parser.add_argument("--no-rule-assist", action="store_true", help=argparse.SUPPRESS)parser.add_argument("--output", default=None, help="Optional JSON output path")args = parser.parse_args()25 unmodified linesid2label,max_length=resolved_max_length,debug=False,use_rules=args.rule_assist and not args.no_rule_assist,constrain_bio=not args.no_constrained_bio,)15 unmodified linesload_ms = (time.perf_counter() - load_start) * 1000.0def parse_onnx(filename: str) -> Dict:return onnx_parser.parse(filename, use_rules=args.rule_assist and not args.no_rule_assist)raw = run_benchmark("onnxruntime", parse_onnx, filenames, args.warmup, args.repeat)results.append(summarize(raw["name"], load_ms, raw["latencies_ms"]))7 unmodified lines"warmup": args.warmup,"torch_threads": args.torch_threads,"ort_threads": args.ort_threads,"use_rules": args.rule_assist and not args.no_rule_assist,"constrain_bio": not args.no_constrained_bio,"results": results,}
2 unmodified lines34567891011121314151617181920212223242526272829303132333435362 unmodified lines"onnx": "exports/anime_filename_parser.onnx","case_file": "data/parser_regression_cases.json","case_count": 26,"repeat": 50,"warmup": 20,"torch_threads": 1,"ort_threads": 1,"results": [{"name": "pytorch","load_ms": 48.104200046509504,"runs": 1300,"avg_ms": 240.13151522954175,"p50_ms": 211.5633500216063,"p95_ms": 460.0564300373662,"p99_ms": 638.7356059905142,"min_ms": 55.40569999720901,"max_ms": 673.8430999685079,"throughput_fps": 4.164384666644442},{"name": "onnxruntime","load_ms": 830.1237999694422,"runs": 1300,"avg_ms": 253.9665275382308,"p50_ms": 255.0988500006497,"p95_ms": 445.8765349787427,"p99_ms": 584.5061249908758,"min_ms": 52.04109998885542,"max_ms": 738.4270000038669,"throughput_fps": 3.937526766591181}]}2 unmodified lines345678910111213141516171819202122232425262728293031323334353637382 unmodified lines"onnx": "exports/anime_filename_parser.onnx","case_file": "data/parser_regression_cases.json","case_count": 26,"repeat": 20,"warmup": 20,"torch_threads": 1,"ort_threads": 1,"use_rules": false,"constrain_bio": true,"results": [{"name": "pytorch","load_ms": 49.07089995685965,"runs": 520,"avg_ms": 15.156135000646687,"p50_ms": 14.874850050546229,"p95_ms": 18.50034496746957,"p99_ms": 21.91202303394671,"min_ms": 11.207600007764995,"max_ms": 26.899200049228966,"throughput_fps": 65.97988207134152},{"name": "onnxruntime","load_ms": 568.8452000031248,"runs": 520,"avg_ms": 13.076459232475967,"p50_ms": 12.81869993545115,"p95_ms": 15.947990084532643,"p99_ms": 20.187044028425575,"min_ms": 10.0586999906227,"max_ms": 22.88920001592487,"throughput_fps": 76.4733007782761}]}
60 unmodified lines61626364656660 unmodified linesdef manual_cases() -> Iterable[dict]:yield char_item("[AI-Raws] 炎炎の消防隊 弐ノ章 #13 (BD HEVC 1920x1080 yuv444p10le FLAC)[FC74A2D5].mkv",[60 unmodified lines61626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315460 unmodified linesdef manual_cases() -> Iterable[dict]:yield char_item("One.Piece.1110.1080p.WEB-DL.AAC2.0.H.264",[("One.Piece", "TITLE"),("1110", "EPISODE"),("1080p", "RESOLUTION"),("WEB-DL", "SOURCE"),],)yield char_item("One.Piece.1111.1080p.WEB-DL.AAC2.0.H.264",[("One.Piece", "TITLE"),("1111", "EPISODE"),("1080p", "RESOLUTION"),("WEB-DL", "SOURCE"),],)yield char_item("【喵萌奶茶屋】★04月新番★[葬送的芙莉莲][01][1080P][HEVC]",[("喵萌奶茶屋", "GROUP"),("葬送的芙莉莲", "TITLE"),("01", "EPISODE"),("1080P", "RESOLUTION"),("HEVC", "SOURCE"),],)yield char_item("【喵萌奶茶屋】★10月新番★[药屋少女的呢喃][02][1080P][HEVC]",[("喵萌奶茶屋", "GROUP"),("药屋少女的呢喃", "TITLE"),("02", "EPISODE"),("1080P", "RESOLUTION"),("HEVC", "SOURCE"),],)yield char_item("[Billion Meta Lab] 魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi [07][1080P][CHT&JPN][檢索:魔法姊妹露露特莉莉].mp4",[("Billion Meta Lab", "GROUP"),("魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi", "TITLE"),("07", "EPISODE"),("1080P", "RESOLUTION"),("CHT&JPN", "SOURCE"),("檢索:魔法姊妹露露特莉莉", "SPECIAL"),],)yield char_item("[Billion Meta Lab] 魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi [08][1080P][CHT&JPN][检索:魔法姊妹露露特莉莉].mp4",[("Billion Meta Lab", "GROUP"),("魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi", "TITLE"),("08", "EPISODE"),("1080P", "RESOLUTION"),("CHT&JPN", "SOURCE"),("检索:魔法姊妹露露特莉莉", "SPECIAL"),],)yield char_item("[LoliHouse] Kakuriyo no Yadomeshi Ni - 12 [WebRip 1080p HEVC-10bit AAC SRTx2].mkv",[("LoliHouse", "GROUP"),("Kakuriyo no Yadomeshi", "TITLE"),("Ni", "SEASON"),("12", "EPISODE"),("WebRip", "SOURCE"),("1080p", "RESOLUTION"),("HEVC", "SOURCE"),("AAC", "SOURCE"),("SRTx2", "SOURCE"),],)yield char_item("[LoliHouse] Kakuriyo no Yadomeshi Ni - 13 [WebRip 1080p HEVC-10bit AAC SRTx2].mkv",[("LoliHouse", "GROUP"),("Kakuriyo no Yadomeshi", "TITLE"),("Ni", "SEASON"),("13", "EPISODE"),("WebRip", "SOURCE"),("1080p", "RESOLUTION"),("HEVC", "SOURCE"),("AAC", "SOURCE"),("SRTx2", "SOURCE"),],)yield char_item("[AI-Raws] 炎炎の消防隊 弐ノ章 #13 (BD HEVC 1920x1080 yuv444p10le FLAC)[FC74A2D5].mkv",[
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567{"model_dir": ".","case_file": "data/parser_regression_cases.json","tokenizer_variant": "char","max_length": 128,"use_rules": true,"constrain_bio": true,"case_count": 26,"full_correct": 26,"full_accuracy": 1.0,"field_correct": {"group": 22,"title": 26,"episode": 26,"resolution": 26,"source": 19,"season": 9,"special": 5},"field_total": {"group": 22,"title": 26,"episode": 26,"resolution": 26,"source": 19,"season": 9,"special": 5},"field_accuracy": {"episode": 1.0,"group": 1.0,"resolution": 1.0,"season": 1.0,"source": 1.0,"special": 1.0,"title": 1.0},"failures": [],"results": [{"id": "lolihouse_dash_episode","filename": "[LoliHouse] Yomi no Tsugai - 07 [WebRip 1080p HEVC-10bit AAC ASSx2]","ok": true,"errors": {},"expected": {"group": "LoliHouse","title": "Yomi no Tsugai","episode": 7,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 7,"group": "LoliHouse","resolution": "1080p","source": "WebRip","title": "Yomi no Tsugai"}},{"id": "dot_season_episode_no_group","filename": "Witch.Hat.Atelier.S01E07.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub","ok": true,"errors": {},"expected": {"title": "Witch.Hat.Atelier","season": 1,"episode": 7,"group": null,"resolution": "1080p","source": "NF"},"pred": {"episode": 7,"group": null,"resolution": "1080p","season": 1,"source": "NF","title": "Witch.Hat.Atelier"}},{"id": "ani_cjk_season_dash_episode","filename": "[ANi] 異世界悠閒農家 2 - 06 [1080P][Baha][WEB-DL][AAC AVC][CHT]","ok": true,"errors": {},"expected": {"group": "ANi","title": "異世界悠閒農家","season": 2,"episode": 6,"resolution": "1080P","source": "Baha"},"pred": {"episode": 6,"group": "ANi","resolution": "1080P","season": 2,"source": "Baha","title": "異世界悠閒農家"}},{"id": "kisssub_bracket_title_episode","filename": "[KissSub][Shunkashuutou Daikousha - Haru no Mai][05][1080P][GB][MP4]","ok": true,"errors": {},"expected": {"group": "KissSub","title": "Shunkashuutou Daikousha - Haru no Mai","episode": 5,"resolution": "1080P","source": "GB"},"pred": {"episode": 5,"group": "KissSub","resolution": "1080P","source": "GB","title": "Shunkashuutou Daikousha - Haru no Mai"}},{"id": "airotabracket_title_episode","filename": "[Airota][Sousou no Frieren][29][1080p AVC AAC][CHT]","ok": true,"errors": {},"expected": {"group": "Airota","title": "Sousou no Frieren","episode": 29,"resolution": "1080p","source": "CHT"},"pred": {"episode": 29,"group": "Airota","resolution": "1080p","source": "CHT","title": "Sousou no Frieren"}},{"id": "subsplease_parenthesized_resolution","filename": "[SubsPlease] Mushoku Tensei - 12 (1080p) [x265][AAC]","ok": true,"errors": {},"expected": {"group": "SubsPlease","title": "Mushoku Tensei","episode": 12,"resolution": "1080p"},"pred": {"episode": 12,"group": "SubsPlease","resolution": "1080p","title": "Mushoku Tensei"}},{"id": "vcb_bracket_episode","filename": "[VCB-Studio] Girls Band Cry [01][Ma10p_1080p][x265_flac]","ok": true,"errors": {},"expected": {"group": "VCB-Studio","title": "Girls Band Cry","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "VCB-Studio","resolution": "1080p","title": "Girls Band Cry"}},{"id": "numeric_title_not_episode","filename": "86 Eighty Six - 01 [1080P][Baha]","ok": true,"errors": {},"expected": {"title": "86 Eighty Six","episode": 1,"resolution": "1080P","source": "Baha"},"pred": {"episode": 1,"resolution": "1080P","source": "Baha","title": "86 Eighty Six"}},{"id": "erai_raws_dash_episode","filename": "[Erai-raws] Sousou no Frieren - 01 [1080p][Multiple Subtitle][ENG]","ok": true,"errors": {},"expected": {"group": "Erai-raws","title": "Sousou no Frieren","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "Erai-raws","resolution": "1080p","title": "Sousou no Frieren"}},{"id": "nekomoe_space_group","filename": "[Nekomoe kissaten][Watashi no Shiawase na Kekkon][01][1080p][JPSC]","ok": true,"errors": {},"expected": {"group": "Nekomoe kissaten","title": "Watashi no Shiawase na Kekkon","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "Nekomoe kissaten","resolution": "1080p","title": "Watashi no Shiawase na Kekkon"}},{"id": "long_running_episode","filename": "One.Piece.1110.1080p.WEB-DL.AAC2.0.H.264","ok": true,"errors": {},"expected": {"title": "One.Piece","episode": 1110,"resolution": "1080p","source": "WEB-DL"},"pred": {"episode": 1110,"resolution": "1080p","source": "WEB-DL","title": "One.Piece"}},{"id": "season_episode_amzn","filename": "Example.Show.S02E03.2160p.AMZN.WEB-DL.DDP5.1.H.265","ok": true,"errors": {},"expected": {"title": "Example.Show","season": 2,"episode": 3,"resolution": "2160p","source": "AMZN"},"pred": {"episode": 3,"resolution": "2160p","season": 2,"source": "AMZN","title": "Example.Show"}},{"id": "cjk_group_with_prefix_tag","filename": "【喵萌奶茶屋】★04月新番★[葬送的芙莉莲][01][1080P][HEVC]","ok": true,"errors": {},"expected": {"group": "喵萌奶茶屋","title": "葬送的芙莉莲","episode": 1,"resolution": "1080P"},"pred": {"episode": 1,"group": "喵萌奶茶屋","resolution": "1080P","title": "葬送的芙莉莲"}},{"id": "leading_meta_not_group","filename": "[1080p] Witch Watch - 15 [CHS]","ok": true,"errors": {},"expected": {"group": null,"title": "Witch Watch","episode": 15,"resolution": "1080p","source": "CHS"},"pred": {"episode": 15,"group": null,"resolution": "1080p","source": "CHS","title": "Witch Watch"}},{"id": "sakurato_group_language_source","filename": "[Sakurato] Witch Watch - 15 [1080p][CHS]","ok": true,"errors": {},"expected": {"group": "Sakurato","title": "Witch Watch","episode": 15,"resolution": "1080p","source": "CHS"},"pred": {"episode": 15,"group": "Sakurato","resolution": "1080p","source": "CHS","title": "Witch Watch"}},{"id": "billion_meta_lab_search_special","filename": "[Billion Meta Lab] 魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi [07][1080P][CHT&JPN][檢索:魔法姊妹露露特莉莉].mp4","ok": true,"errors": {},"expected": {"group": "Billion Meta Lab","title": "魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi","episode": 7,"resolution": "1080P","source": "CHT&JPN","special": "檢索:魔法姊妹露露特莉莉"},"pred": {"episode": 7,"group": "Billion Meta Lab","resolution": "1080P","source": "CHT&JPN","special": "檢索:魔法姊妹露露特莉莉","title": "魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi"}},{"id": "studio_greentea_s2_bracket_episode","filename": "[Studio GreenTea] Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken S2 [06][WebRip][HEVC-10bit 1080p AAC][JPSC].mp4","ok": true,"errors": {},"expected": {"group": "Studio GreenTea","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken","season": 2,"episode": 6,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 6,"group": "Studio GreenTea","resolution": "1080p","season": 2,"source": "WebRip","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken"}},{"id": "lolihouse_kakuriyo_bare_ni_season","filename": "[LoliHouse] Kakuriyo no Yadomeshi Ni - 12 [WebRip 1080p HEVC-10bit AAC SRTx2].mkv","ok": true,"errors": {},"expected": {"group": "LoliHouse","title": "Kakuriyo no Yadomeshi","season": 2,"episode": 12,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 12,"group": "LoliHouse","resolution": "1080p","season": 2,"source": "WebRip","title": "Kakuriyo no Yadomeshi"}},{"id": "ani_kakuriyo_traditional_ni","filename": "[ANi] 妖怪旅館營業中 貳 - 11 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4","ok": true,"errors": {},"expected": {"group": "ANi","title": "妖怪旅館營業中","season": 2,"episode": 11,"resolution": "1080P","source": "Baha"},"pred": {"episode": 11,"group": "ANi","resolution": "1080P","season": 2,"source": "Baha","title": "妖怪旅館營業中"}},{"id": "jibaketa_shokugeki_ni_no_sara","filename": "[jibaketa]Shokugeki no Souma Ni no Sara - 13 END [BD 1920x1080 x264 AACx2 SRT TVB CHT].mkv","ok": true,"errors": {},"expected": {"group": "jibaketa","title": "Shokugeki no Souma","season": 2,"episode": 13,"resolution": "1920x1080"},"pred": {"episode": 13,"group": "jibaketa","resolution": "1920x1080","season": 2,"title": "Shokugeki no Souma"}},{"id": "ai_raws_fire_force_cjk_season_hash_episode","filename": "[AI-Raws] 炎炎の消防隊 弐ノ章 #13 (BD HEVC 1920x1080 yuv444p10le FLAC)[FC74A2D5].mkv","ok": true,"errors": {},"expected": {"group": "AI-Raws","title": "炎炎の消防隊","season": 2,"episode": 13,"resolution": "1920x1080"},"pred": {"episode": 13,"group": "AI-Raws","resolution": "1920x1080","season": 2,"title": "炎炎の消防隊"}},{"id": "gm_team_guoman_bilingual_s2","filename": "[GM-Team][国漫][逆天邪神 第2季][Against the Gods Ⅱ][2026][04][HEVC][GB][4K].mp4","ok": true,"errors": {},"expected": {"group": "GM-Team","title": "逆天邪神","season": 2,"episode": 4,"resolution": "4K","source": "GB"},"pred": {"episode": 4,"group": "GM-Team","resolution": "4K","season": 2,"source": "GB","title": "逆天邪神"}},{"id": "vcb_special_iv_not_episode","filename": "[YYDM&VCB-Studio] Shinsekai Yori [IV05][Ma10p_1080p][x265_aac].mkv","ok": true,"errors": {},"expected": {"group": "YYDM&VCB-Studio","title": "Shinsekai Yori","episode": null,"resolution": "1080p","source": "x265_aac","special": "IV05"},"pred": {"episode": null,"group": "YYDM&VCB-Studio","resolution": "1080p","source": "x265_aac","special": "IV05","title": "Shinsekai Yori"}},{"id": "vcb_nced_not_episode","filename": "[YYDM&VCB-Studio] Shinsekai Yori [NCED02][Ma10p_1080p][x265_flac].mkv","ok": true,"errors": {},"expected": {"group": "YYDM&VCB-Studio","title": "Shinsekai Yori","episode": null,"resolution": "1080p","source": "x265_flac","special": "NCED02"},"pred": {"episode": null,"group": "YYDM&VCB-Studio","resolution": "1080p","source": "x265_flac","special": "NCED02","title": "Shinsekai Yori"}},{"id": "dot_nced_suffix_not_episode","filename": "InuYasha.2000.NCED02.BDrip.AV1.10Bit.DTS.1080p-CalChi","ok": true,"errors": {},"expected": {"title": "InuYasha","episode": null,"resolution": "1080p","source": "BDrip","special": "NCED02"},"pred": {"episode": null,"resolution": "1080p","source": "BDrip","special": "NCED02","title": "InuYasha"}},{"id": "vcb_numeric_title_nced","filename": "[VCB-Studio] Yamada-kun to 7-nin no Majo [NCED][Ma10p_1080p][x265_flac]","ok": true,"errors": {},"expected": {"group": "VCB-Studio","title": "Yamada-kun to 7-nin no Majo","episode": null,"resolution": "1080p","source": "x265_flac","special": "NCED"},"pred": {"episode": null,"group": "VCB-Studio","resolution": "1080p","source": "x265_flac","special": "NCED","title": "Yamada-kun to 7-nin no Majo"}}]}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739{"primary_metric": "normalized_only","modes": {"model_only": {"model_dir": ".","case_file": "data/parser_regression_cases.json","tokenizer_variant": "char","max_length": 128,"use_rules": false,"constrain_bio": false,"case_count": 26,"full_correct": 25,"full_accuracy": 0.9615384615384616,"field_correct": {"group": 22,"title": 26,"episode": 26,"resolution": 25,"source": 19,"season": 9,"special": 5},"field_total": {"group": 22,"title": 26,"episode": 26,"resolution": 26,"source": 19,"season": 9,"special": 5},"field_accuracy": {"episode": 1.0,"group": 1.0,"resolution": 0.9615384615384616,"season": 1.0,"source": 1.0,"special": 1.0,"title": 1.0},"failures": [{"id": "studio_greentea_s2_bracket_episode","filename": "[Studio GreenTea] Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken S2 [06][WebRip][HEVC-10bit 1080p AAC][JPSC].mp4","ok": false,"errors": {"resolution": {"expected": "1080p","pred": "P"}},"expected": {"group": "Studio GreenTea","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken","season": 2,"episode": 6,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 6,"group": "Studio GreenTea","resolution": "P","season": 2,"source": "WebRip","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken"}}],"results": [{"id": "lolihouse_dash_episode","filename": "[LoliHouse] Yomi no Tsugai - 07 [WebRip 1080p HEVC-10bit AAC ASSx2]","ok": true,"errors": {},"expected": {"group": "LoliHouse","title": "Yomi no Tsugai","episode": 7,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 7,"group": "LoliHouse","resolution": "1080p","source": "WebRip","title": "Yomi no Tsugai"}},{"id": "dot_season_episode_no_group","filename": "Witch.Hat.Atelier.S01E07.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub","ok": true,"errors": {},"expected": {"title": "Witch.Hat.Atelier","season": 1,"episode": 7,"group": null,"resolution": "1080p","source": "NF"},"pred": {"episode": 7,"group": null,"resolution": "1080p","season": 1,"source": "NF","title": "Witch.Hat.Atelier"}},{"id": "ani_cjk_season_dash_episode","filename": "[ANi] 異世界悠閒農家 2 - 06 [1080P][Baha][WEB-DL][AAC AVC][CHT]","ok": true,"errors": {},"expected": {"group": "ANi","title": "異世界悠閒農家","season": 2,"episode": 6,"resolution": "1080P","source": "Baha"},"pred": {"episode": 6,"group": "ANi","resolution": "1080P","season": 2,"source": "Baha","title": "異世界悠閒農家"}},{"id": "kisssub_bracket_title_episode","filename": "[KissSub][Shunkashuutou Daikousha - Haru no Mai][05][1080P][GB][MP4]","ok": true,"errors": {},"expected": {"group": "KissSub","title": "Shunkashuutou Daikousha - Haru no Mai","episode": 5,"resolution": "1080P","source": "GB"},"pred": {"episode": 5,"group": "KissSub","resolution": "1080P","source": "GB","title": "Shunkashuutou Daikousha - Haru no Mai"}},{"id": "airotabracket_title_episode","filename": "[Airota][Sousou no Frieren][29][1080p AVC AAC][CHT]","ok": true,"errors": {},"expected": {"group": "Airota","title": "Sousou no Frieren","episode": 29,"resolution": "1080p","source": "CHT"},"pred": {"episode": 29,"group": "Airota","resolution": "1080p","source": "CHT","title": "Sousou no Frieren"}},{"id": "subsplease_parenthesized_resolution","filename": "[SubsPlease] Mushoku Tensei - 12 (1080p) [x265][AAC]","ok": true,"errors": {},"expected": {"group": "SubsPlease","title": "Mushoku Tensei","episode": 12,"resolution": "1080p"},"pred": {"episode": 12,"group": "SubsPlease","resolution": "1080p","title": "Mushoku Tensei"}},{"id": "vcb_bracket_episode","filename": "[VCB-Studio] Girls Band Cry [01][Ma10p_1080p][x265_flac]","ok": true,"errors": {},"expected": {"group": "VCB-Studio","title": "Girls Band Cry","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "VCB-Studio","resolution": "1080p","title": "Girls Band Cry"}},{"id": "numeric_title_not_episode","filename": "86 Eighty Six - 01 [1080P][Baha]","ok": true,"errors": {},"expected": {"title": "86 Eighty Six","episode": 1,"resolution": "1080P","source": "Baha"},"pred": {"episode": 1,"resolution": "1080P","source": "Baha","title": "86 Eighty Six"}},{"id": "erai_raws_dash_episode","filename": "[Erai-raws] Sousou no Frieren - 01 [1080p][Multiple Subtitle][ENG]","ok": true,"errors": {},"expected": {"group": "Erai-raws","title": "Sousou no Frieren","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "Erai-raws","resolution": "1080p","title": "Sousou no Frieren"}},{"id": "nekomoe_space_group","filename": "[Nekomoe kissaten][Watashi no Shiawase na Kekkon][01][1080p][JPSC]","ok": true,"errors": {},"expected": {"group": "Nekomoe kissaten","title": "Watashi no Shiawase na Kekkon","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "Nekomoe kissaten","resolution": "1080p","title": "Watashi no Shiawase na Kekkon"}},{"id": "long_running_episode","filename": "One.Piece.1110.1080p.WEB-DL.AAC2.0.H.264","ok": true,"errors": {},"expected": {"title": "One.Piece","episode": 1110,"resolution": "1080p","source": "WEB-DL"},"pred": {"episode": 1110,"resolution": "1080p","source": "WEB-DL","title": "One.Piece"}},{"id": "season_episode_amzn","filename": "Example.Show.S02E03.2160p.AMZN.WEB-DL.DDP5.1.H.265","ok": true,"errors": {},"expected": {"title": "Example.Show","season": 2,"episode": 3,"resolution": "2160p","source": "AMZN"},"pred": {"episode": 3,"resolution": "2160p","season": 2,"source": "AMZN","title": "Example.Show"}},{"id": "cjk_group_with_prefix_tag","filename": "【喵萌奶茶屋】★04月新番★[葬送的芙莉莲][01][1080P][HEVC]","ok": true,"errors": {},"expected": {"group": "喵萌奶茶屋","title": "葬送的芙莉莲","episode": 1,"resolution": "1080P"},"pred": {"episode": 1,"group": "喵萌奶茶屋","resolution": "1080P","title": "葬送的芙莉莲"}},{"id": "leading_meta_not_group","filename": "[1080p] Witch Watch - 15 [CHS]","ok": true,"errors": {},"expected": {"group": null,"title": "Witch Watch","episode": 15,"resolution": "1080p","source": "CHS"},"pred": {"episode": 15,"group": null,"resolution": "1080p","source": "CHS","title": "Witch Watch"}},{"id": "sakurato_group_language_source","filename": "[Sakurato] Witch Watch - 15 [1080p][CHS]","ok": true,"errors": {},"expected": {"group": "Sakurato","title": "Witch Watch","episode": 15,"resolution": "1080p","source": "CHS"},"pred": {"episode": 15,"group": "Sakurato","resolution": "1080p","source": "CHS","title": "Witch Watch"}},{"id": "billion_meta_lab_search_special","filename": "[Billion Meta Lab] 魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi [07][1080P][CHT&JPN][檢索:魔法姊妹露露特莉莉].mp4","ok": true,"errors": {},"expected": {"group": "Billion Meta Lab","title": "魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi","episode": 7,"resolution": "1080P","source": "CHT&JPN","special": "檢索:魔法姊妹露露特莉莉"},"pred": {"episode": 7,"group": "Billion Meta Lab","resolution": "1080P","source": "CHT&JPN","special": "檢索:魔法姊妹露露特莉莉","title": "魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi"}},{"id": "studio_greentea_s2_bracket_episode","filename": "[Studio GreenTea] Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken S2 [06][WebRip][HEVC-10bit 1080p AAC][JPSC].mp4","ok": false,"errors": {"resolution": {"expected": "1080p","pred": "P"}},"expected": {"group": "Studio GreenTea","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken","season": 2,"episode": 6,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 6,"group": "Studio GreenTea","resolution": "P","season": 2,"source": "WebRip","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken"}},{"id": "lolihouse_kakuriyo_bare_ni_season","filename": "[LoliHouse] Kakuriyo no Yadomeshi Ni - 12 [WebRip 1080p HEVC-10bit AAC SRTx2].mkv","ok": true,"errors": {},"expected": {"group": "LoliHouse","title": "Kakuriyo no Yadomeshi","season": 2,"episode": 12,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 12,"group": "LoliHouse","resolution": "1080p","season": 2,"source": "WebRip","title": "Kakuriyo no Yadomeshi"}},{"id": "ani_kakuriyo_traditional_ni","filename": "[ANi] 妖怪旅館營業中 貳 - 11 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4","ok": true,"errors": {},"expected": {"group": "ANi","title": "妖怪旅館營業中","season": 2,"episode": 11,"resolution": "1080P","source": "Baha"},"pred": {"episode": 11,"group": "ANi","resolution": "1080P","season": 2,"source": "Baha","title": "妖怪旅館營業中"}},{"id": "jibaketa_shokugeki_ni_no_sara","filename": "[jibaketa]Shokugeki no Souma Ni no Sara - 13 END [BD 1920x1080 x264 AACx2 SRT TVB CHT].mkv","ok": true,"errors": {},"expected": {"group": "jibaketa","title": "Shokugeki no Souma","season": 2,"episode": 13,"resolution": "1920x1080"},"pred": {"episode": 13,"group": "jibaketa","resolution": "1920x1080","season": 2,"title": "Shokugeki no Souma"}},{"id": "ai_raws_fire_force_cjk_season_hash_episode","filename": "[AI-Raws] 炎炎の消防隊 弐ノ章 #13 (BD HEVC 1920x1080 yuv444p10le FLAC)[FC74A2D5].mkv","ok": true,"errors": {},"expected": {"group": "AI-Raws","title": "炎炎の消防隊","season": 2,"episode": 13,"resolution": "1920x1080"},"pred": {"episode": 13,"group": "AI-Raws","resolution": "1920x1080","season": 2,"title": "炎炎の消防隊"}},{"id": "gm_team_guoman_bilingual_s2","filename": "[GM-Team][国漫][逆天邪神 第2季][Against the Gods Ⅱ][2026][04][HEVC][GB][4K].mp4","ok": true,"errors": {},"expected": {"group": "GM-Team","title": "逆天邪神","season": 2,"episode": 4,"resolution": "4K","source": "GB"},"pred": {"episode": 4,"group": "GM-Team","resolution": "4K","season": 2,"source": "GB","title": "逆天邪神"}},{"id": "vcb_special_iv_not_episode","filename": "[YYDM&VCB-Studio] Shinsekai Yori [IV05][Ma10p_1080p][x265_aac].mkv","ok": true,"errors": {},"expected": {"group": "YYDM&VCB-Studio","title": "Shinsekai Yori","episode": null,"resolution": "1080p","source": "x265_aac","special": "IV05"},"pred": {"episode": null,"group": "YYDM&VCB-Studio","resolution": "1080p","source": "x265-aac","special": "IV05","title": "Shinsekai Yori"}},{"id": "vcb_nced_not_episode","filename": "[YYDM&VCB-Studio] Shinsekai Yori [NCED02][Ma10p_1080p][x265_flac].mkv","ok": true,"errors": {},"expected": {"group": "YYDM&VCB-Studio","title": "Shinsekai Yori","episode": null,"resolution": "1080p","source": "x265_flac","special": "NCED02"},"pred": {"episode": null,"group": "YYDM&VCB-Studio","resolution": "1080p","source": "x265-flac","special": "NCED02","title": "Shinsekai Yori"}},{"id": "dot_nced_suffix_not_episode","filename": "InuYasha.2000.NCED02.BDrip.AV1.10Bit.DTS.1080p-CalChi","ok": true,"errors": {},"expected": {"title": "InuYasha","episode": null,"resolution": "1080p","source": "BDrip","special": "NCED02"},"pred": {"episode": null,"resolution": "1080p","source": "BDrip","special": "NCED02","title": "InuYasha"}},{"id": "vcb_numeric_title_nced","filename": "[VCB-Studio] Yamada-kun to 7-nin no Majo [NCED][Ma10p_1080p][x265_flac]","ok": true,"errors": {},"expected": {"group": "VCB-Studio","title": "Yamada-kun to 7-nin no Majo","episode": null,"resolution": "1080p","source": "x265_flac","special": "NCED"},"pred": {"episode": null,"group": "VCB-Studio","resolution": "1080p","source": "x265-flac","special": "NCED","title": "Yamada-kun to 7-nin no Majo"}}]},"normalized_only": {"model_dir": ".","case_file": "data/parser_regression_cases.json","tokenizer_variant": "char","max_length": 128,"use_rules": false,"constrain_bio": true,"case_count": 26,"full_correct": 26,"full_accuracy": 1.0,"field_correct": {"group": 22,"title": 26,"episode": 26,"resolution": 26,"source": 19,"season": 9,"special": 5},"field_total": {"group": 22,"title": 26,"episode": 26,"resolution": 26,"source": 19,"season": 9,"special": 5},"field_accuracy": {"episode": 1.0,"group": 1.0,"resolution": 1.0,"season": 1.0,"source": 1.0,"special": 1.0,"title": 1.0},"failures": [],"results": [{"id": "lolihouse_dash_episode","filename": "[LoliHouse] Yomi no Tsugai - 07 [WebRip 1080p HEVC-10bit AAC ASSx2]","ok": true,"errors": {},"expected": {"group": "LoliHouse","title": "Yomi no Tsugai","episode": 7,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 7,"group": "LoliHouse","resolution": "1080p","source": "WebRip","title": "Yomi no Tsugai"}},{"id": "dot_season_episode_no_group","filename": "Witch.Hat.Atelier.S01E07.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub","ok": true,"errors": {},"expected": {"title": "Witch.Hat.Atelier","season": 1,"episode": 7,"group": null,"resolution": "1080p","source": "NF"},"pred": {"episode": 7,"group": null,"resolution": "1080p","season": 1,"source": "NF","title": "Witch.Hat.Atelier"}},{"id": "ani_cjk_season_dash_episode","filename": "[ANi] 異世界悠閒農家 2 - 06 [1080P][Baha][WEB-DL][AAC AVC][CHT]","ok": true,"errors": {},"expected": {"group": "ANi","title": "異世界悠閒農家","season": 2,"episode": 6,"resolution": "1080P","source": "Baha"},"pred": {"episode": 6,"group": "ANi","resolution": "1080P","season": 2,"source": "Baha","title": "異世界悠閒農家"}},{"id": "kisssub_bracket_title_episode","filename": "[KissSub][Shunkashuutou Daikousha - Haru no Mai][05][1080P][GB][MP4]","ok": true,"errors": {},"expected": {"group": "KissSub","title": "Shunkashuutou Daikousha - Haru no Mai","episode": 5,"resolution": "1080P","source": "GB"},"pred": {"episode": 5,"group": "KissSub","resolution": "1080P","source": "GB","title": "Shunkashuutou Daikousha - Haru no Mai"}},{"id": "airotabracket_title_episode","filename": "[Airota][Sousou no Frieren][29][1080p AVC AAC][CHT]","ok": true,"errors": {},"expected": {"group": "Airota","title": "Sousou no Frieren","episode": 29,"resolution": "1080p","source": "CHT"},"pred": {"episode": 29,"group": "Airota","resolution": "1080p","source": "CHT","title": "Sousou no Frieren"}},{"id": "subsplease_parenthesized_resolution","filename": "[SubsPlease] Mushoku Tensei - 12 (1080p) [x265][AAC]","ok": true,"errors": {},"expected": {"group": "SubsPlease","title": "Mushoku Tensei","episode": 12,"resolution": "1080p"},"pred": {"episode": 12,"group": "SubsPlease","resolution": "1080p","title": "Mushoku Tensei"}},{"id": "vcb_bracket_episode","filename": "[VCB-Studio] Girls Band Cry [01][Ma10p_1080p][x265_flac]","ok": true,"errors": {},"expected": {"group": "VCB-Studio","title": "Girls Band Cry","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "VCB-Studio","resolution": "1080p","title": "Girls Band Cry"}},{"id": "numeric_title_not_episode","filename": "86 Eighty Six - 01 [1080P][Baha]","ok": true,"errors": {},"expected": {"title": "86 Eighty Six","episode": 1,"resolution": "1080P","source": "Baha"},"pred": {"episode": 1,"resolution": "1080P","source": "Baha","title": "86 Eighty Six"}},{"id": "erai_raws_dash_episode","filename": "[Erai-raws] Sousou no Frieren - 01 [1080p][Multiple Subtitle][ENG]","ok": true,"errors": {},"expected": {"group": "Erai-raws","title": "Sousou no Frieren","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "Erai-raws","resolution": "1080p","title": "Sousou no Frieren"}},{"id": "nekomoe_space_group","filename": "[Nekomoe kissaten][Watashi no Shiawase na Kekkon][01][1080p][JPSC]","ok": true,"errors": {},"expected": {"group": "Nekomoe kissaten","title": "Watashi no Shiawase na Kekkon","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "Nekomoe kissaten","resolution": "1080p","title": "Watashi no Shiawase na Kekkon"}},{"id": "long_running_episode","filename": "One.Piece.1110.1080p.WEB-DL.AAC2.0.H.264","ok": true,"errors": {},"expected": {"title": "One.Piece","episode": 1110,"resolution": "1080p","source": "WEB-DL"},"pred": {"episode": 1110,"resolution": "1080p","source": "WEB-DL","title": "One.Piece"}},{"id": "season_episode_amzn","filename": "Example.Show.S02E03.2160p.AMZN.WEB-DL.DDP5.1.H.265","ok": true,"errors": {},"expected": {"title": "Example.Show","season": 2,"episode": 3,"resolution": "2160p","source": "AMZN"},"pred": {"episode": 3,"resolution": "2160p","season": 2,"source": "AMZN","title": "Example.Show"}},{"id": "cjk_group_with_prefix_tag","filename": "【喵萌奶茶屋】★04月新番★[葬送的芙莉莲][01][1080P][HEVC]","ok": true,"errors": {},"expected": {"group": "喵萌奶茶屋","title": "葬送的芙莉莲","episode": 1,"resolution": "1080P"},"pred": {"episode": 1,"group": "喵萌奶茶屋","resolution": "1080P","title": "葬送的芙莉莲"}},{"id": "leading_meta_not_group","filename": "[1080p] Witch Watch - 15 [CHS]","ok": true,"errors": {},"expected": {"group": null,"title": "Witch Watch","episode": 15,"resolution": "1080p","source": "CHS"},"pred": {"episode": 15,"group": null,"resolution": "1080p","source": "CHS","title": "Witch Watch"}},{"id": "sakurato_group_language_source","filename": "[Sakurato] Witch Watch - 15 [1080p][CHS]","ok": true,"errors": {},"expected": {"group": "Sakurato","title": "Witch Watch","episode": 15,"resolution": "1080p","source": "CHS"},"pred": {"episode": 15,"group": "Sakurato","resolution": "1080p","source": "CHS","title": "Witch Watch"}},{"id": "billion_meta_lab_search_special","filename": "[Billion Meta Lab] 魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi [07][1080P][CHT&JPN][檢索:魔法姊妹露露特莉莉].mp4","ok": true,"errors": {},"expected": {"group": "Billion Meta Lab","title": "魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi","episode": 7,"resolution": "1080P","source": "CHT&JPN","special": "檢索:魔法姊妹露露特莉莉"},"pred": {"episode": 7,"group": "Billion Meta Lab","resolution": "1080P","source": "CHT&JPN","special": "檢索:魔法姊妹露露特莉莉","title": "魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi"}},{"id": "studio_greentea_s2_bracket_episode","filename": "[Studio GreenTea] Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken S2 [06][WebRip][HEVC-10bit 1080p AAC][JPSC].mp4","ok": true,"errors": {},"expected": {"group": "Studio GreenTea","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken","season": 2,"episode": 6,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 6,"group": "Studio GreenTea","resolution": "1080p","season": 2,"source": "WebRip","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken"}},{"id": "lolihouse_kakuriyo_bare_ni_season","filename": "[LoliHouse] Kakuriyo no Yadomeshi Ni - 12 [WebRip 1080p HEVC-10bit AAC SRTx2].mkv","ok": true,"errors": {},"expected": {"group": "LoliHouse","title": "Kakuriyo no Yadomeshi","season": 2,"episode": 12,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 12,"group": "LoliHouse","resolution": "1080p","season": 2,"source": "WebRip","title": "Kakuriyo no Yadomeshi"}},{"id": "ani_kakuriyo_traditional_ni","filename": "[ANi] 妖怪旅館營業中 貳 - 11 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4","ok": true,"errors": {},"expected": {"group": "ANi","title": "妖怪旅館營業中","season": 2,"episode": 11,"resolution": "1080P","source": "Baha"},"pred": {"episode": 11,"group": "ANi","resolution": "1080P","season": 2,"source": "Baha","title": "妖怪旅館營業中"}},{"id": "jibaketa_shokugeki_ni_no_sara","filename": "[jibaketa]Shokugeki no Souma Ni no Sara - 13 END [BD 1920x1080 x264 AACx2 SRT TVB CHT].mkv","ok": true,"errors": {},"expected": {"group": "jibaketa","title": "Shokugeki no Souma","season": 2,"episode": 13,"resolution": "1920x1080"},"pred": {"episode": 13,"group": "jibaketa","resolution": "1920x1080","season": 2,"title": "Shokugeki no Souma"}},{"id": "ai_raws_fire_force_cjk_season_hash_episode","filename": "[AI-Raws] 炎炎の消防隊 弐ノ章 #13 (BD HEVC 1920x1080 yuv444p10le FLAC)[FC74A2D5].mkv","ok": true,"errors": {},"expected": {"group": "AI-Raws","title": "炎炎の消防隊","season": 2,"episode": 13,"resolution": "1920x1080"},"pred": {"episode": 13,"group": "AI-Raws","resolution": "1920x1080","season": 2,"title": "炎炎の消防隊"}},{"id": "gm_team_guoman_bilingual_s2","filename": "[GM-Team][国漫][逆天邪神 第2季][Against the Gods Ⅱ][2026][04][HEVC][GB][4K].mp4","ok": true,"errors": {},"expected": {"group": "GM-Team","title": "逆天邪神","season": 2,"episode": 4,"resolution": "4K","source": "GB"},"pred": {"episode": 4,"group": "GM-Team","resolution": "4K","season": 2,"source": "GB","title": "逆天邪神"}},{"id": "vcb_special_iv_not_episode","filename": "[YYDM&VCB-Studio] Shinsekai Yori [IV05][Ma10p_1080p][x265_aac].mkv","ok": true,"errors": {},"expected": {"group": "YYDM&VCB-Studio","title": "Shinsekai Yori","episode": null,"resolution": "1080p","source": "x265_aac","special": "IV05"},"pred": {"episode": null,"group": "YYDM&VCB-Studio","resolution": "1080p","source": "x265-aac","special": "IV05","title": "Shinsekai Yori"}},{"id": "vcb_nced_not_episode","filename": "[YYDM&VCB-Studio] Shinsekai Yori [NCED02][Ma10p_1080p][x265_flac].mkv","ok": true,"errors": {},"expected": {"group": "YYDM&VCB-Studio","title": "Shinsekai Yori","episode": null,"resolution": "1080p","source": "x265_flac","special": "NCED02"},"pred": {"episode": null,"group": "YYDM&VCB-Studio","resolution": "1080p","source": "x265-flac","special": "NCED02","title": "Shinsekai Yori"}},{"id": "dot_nced_suffix_not_episode","filename": "InuYasha.2000.NCED02.BDrip.AV1.10Bit.DTS.1080p-CalChi","ok": true,"errors": {},"expected": {"title": "InuYasha","episode": null,"resolution": "1080p","source": "BDrip","special": "NCED02"},"pred": {"episode": null,"resolution": "1080p","source": "BDrip","special": "NCED02","title": "InuYasha"}},{"id": "vcb_numeric_title_nced","filename": "[VCB-Studio] Yamada-kun to 7-nin no Majo [NCED][Ma10p_1080p][x265_flac]","ok": true,"errors": {},"expected": {"group": "VCB-Studio","title": "Yamada-kun to 7-nin no Majo","episode": null,"resolution": "1080p","source": "x265_flac","special": "NCED"},"pred": {"episode": null,"group": "VCB-Studio","resolution": "1080p","source": "x265-flac","special": "NCED","title": "Yamada-kun to 7-nin no Majo"}}]},"rule_assisted": {"model_dir": ".","case_file": "data/parser_regression_cases.json","tokenizer_variant": "char","max_length": 128,"use_rules": true,"constrain_bio": true,"case_count": 26,"full_correct": 26,"full_accuracy": 1.0,"field_correct": {"group": 22,"title": 26,"episode": 26,"resolution": 26,"source": 19,"season": 9,"special": 5},"field_total": {"group": 22,"title": 26,"episode": 26,"resolution": 26,"source": 19,"season": 9,"special": 5},"field_accuracy": {"episode": 1.0,"group": 1.0,"resolution": 1.0,"season": 1.0,"source": 1.0,"special": 1.0,"title": 1.0},"failures": [],"results": [{"id": "lolihouse_dash_episode","filename": "[LoliHouse] Yomi no Tsugai - 07 [WebRip 1080p HEVC-10bit AAC ASSx2]","ok": true,"errors": {},"expected": {"group": "LoliHouse","title": "Yomi no Tsugai","episode": 7,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 7,"group": "LoliHouse","resolution": "1080p","source": "WebRip","title": "Yomi no Tsugai"}},{"id": "dot_season_episode_no_group","filename": "Witch.Hat.Atelier.S01E07.1080p.NF.WEB-DL.JPN.AAC2.0.H.264.MSubs-ToonsHub","ok": true,"errors": {},"expected": {"title": "Witch.Hat.Atelier","season": 1,"episode": 7,"group": null,"resolution": "1080p","source": "NF"},"pred": {"episode": 7,"group": null,"resolution": "1080p","season": 1,"source": "NF","title": "Witch.Hat.Atelier"}},{"id": "ani_cjk_season_dash_episode","filename": "[ANi] 異世界悠閒農家 2 - 06 [1080P][Baha][WEB-DL][AAC AVC][CHT]","ok": true,"errors": {},"expected": {"group": "ANi","title": "異世界悠閒農家","season": 2,"episode": 6,"resolution": "1080P","source": "Baha"},"pred": {"episode": 6,"group": "ANi","resolution": "1080P","season": 2,"source": "Baha","title": "異世界悠閒農家"}},{"id": "kisssub_bracket_title_episode","filename": "[KissSub][Shunkashuutou Daikousha - Haru no Mai][05][1080P][GB][MP4]","ok": true,"errors": {},"expected": {"group": "KissSub","title": "Shunkashuutou Daikousha - Haru no Mai","episode": 5,"resolution": "1080P","source": "GB"},"pred": {"episode": 5,"group": "KissSub","resolution": "1080P","source": "GB","title": "Shunkashuutou Daikousha - Haru no Mai"}},{"id": "airotabracket_title_episode","filename": "[Airota][Sousou no Frieren][29][1080p AVC AAC][CHT]","ok": true,"errors": {},"expected": {"group": "Airota","title": "Sousou no Frieren","episode": 29,"resolution": "1080p","source": "CHT"},"pred": {"episode": 29,"group": "Airota","resolution": "1080p","source": "CHT","title": "Sousou no Frieren"}},{"id": "subsplease_parenthesized_resolution","filename": "[SubsPlease] Mushoku Tensei - 12 (1080p) [x265][AAC]","ok": true,"errors": {},"expected": {"group": "SubsPlease","title": "Mushoku Tensei","episode": 12,"resolution": "1080p"},"pred": {"episode": 12,"group": "SubsPlease","resolution": "1080p","title": "Mushoku Tensei"}},{"id": "vcb_bracket_episode","filename": "[VCB-Studio] Girls Band Cry [01][Ma10p_1080p][x265_flac]","ok": true,"errors": {},"expected": {"group": "VCB-Studio","title": "Girls Band Cry","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "VCB-Studio","resolution": "1080p","title": "Girls Band Cry"}},{"id": "numeric_title_not_episode","filename": "86 Eighty Six - 01 [1080P][Baha]","ok": true,"errors": {},"expected": {"title": "86 Eighty Six","episode": 1,"resolution": "1080P","source": "Baha"},"pred": {"episode": 1,"resolution": "1080P","source": "Baha","title": "86 Eighty Six"}},{"id": "erai_raws_dash_episode","filename": "[Erai-raws] Sousou no Frieren - 01 [1080p][Multiple Subtitle][ENG]","ok": true,"errors": {},"expected": {"group": "Erai-raws","title": "Sousou no Frieren","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "Erai-raws","resolution": "1080p","title": "Sousou no Frieren"}},{"id": "nekomoe_space_group","filename": "[Nekomoe kissaten][Watashi no Shiawase na Kekkon][01][1080p][JPSC]","ok": true,"errors": {},"expected": {"group": "Nekomoe kissaten","title": "Watashi no Shiawase na Kekkon","episode": 1,"resolution": "1080p"},"pred": {"episode": 1,"group": "Nekomoe kissaten","resolution": "1080p","title": "Watashi no Shiawase na Kekkon"}},{"id": "long_running_episode","filename": "One.Piece.1110.1080p.WEB-DL.AAC2.0.H.264","ok": true,"errors": {},"expected": {"title": "One.Piece","episode": 1110,"resolution": "1080p","source": "WEB-DL"},"pred": {"episode": 1110,"resolution": "1080p","source": "WEB-DL","title": "One.Piece"}},{"id": "season_episode_amzn","filename": "Example.Show.S02E03.2160p.AMZN.WEB-DL.DDP5.1.H.265","ok": true,"errors": {},"expected": {"title": "Example.Show","season": 2,"episode": 3,"resolution": "2160p","source": "AMZN"},"pred": {"episode": 3,"resolution": "2160p","season": 2,"source": "AMZN","title": "Example.Show"}},{"id": "cjk_group_with_prefix_tag","filename": "【喵萌奶茶屋】★04月新番★[葬送的芙莉莲][01][1080P][HEVC]","ok": true,"errors": {},"expected": {"group": "喵萌奶茶屋","title": "葬送的芙莉莲","episode": 1,"resolution": "1080P"},"pred": {"episode": 1,"group": "喵萌奶茶屋","resolution": "1080P","title": "葬送的芙莉莲"}},{"id": "leading_meta_not_group","filename": "[1080p] Witch Watch - 15 [CHS]","ok": true,"errors": {},"expected": {"group": null,"title": "Witch Watch","episode": 15,"resolution": "1080p","source": "CHS"},"pred": {"episode": 15,"group": null,"resolution": "1080p","source": "CHS","title": "Witch Watch"}},{"id": "sakurato_group_language_source","filename": "[Sakurato] Witch Watch - 15 [1080p][CHS]","ok": true,"errors": {},"expected": {"group": "Sakurato","title": "Witch Watch","episode": 15,"resolution": "1080p","source": "CHS"},"pred": {"episode": 15,"group": "Sakurato","resolution": "1080p","source": "CHS","title": "Witch Watch"}},{"id": "billion_meta_lab_search_special","filename": "[Billion Meta Lab] 魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi [07][1080P][CHT&JPN][檢索:魔法姊妹露露特莉莉].mp4","ok": true,"errors": {},"expected": {"group": "Billion Meta Lab","title": "魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi","episode": 7,"resolution": "1080P","source": "CHT&JPN","special": "檢索:魔法姊妹露露特莉莉"},"pred": {"episode": 7,"group": "Billion Meta Lab","resolution": "1080P","source": "CHT&JPN","special": "檢索:魔法姊妹露露特莉莉","title": "魔法姊妹露露莉莉 Mahou no Shimai Rurutto Riryi"}},{"id": "studio_greentea_s2_bracket_episode","filename": "[Studio GreenTea] Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken S2 [06][WebRip][HEVC-10bit 1080p AAC][JPSC].mp4","ok": true,"errors": {},"expected": {"group": "Studio GreenTea","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken","season": 2,"episode": 6,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 6,"group": "Studio GreenTea","resolution": "1080p","season": 2,"source": "WebRip","title": "Otonari no Tenshi-sama ni Itsunomanika Dame Ningen ni Sareteita Ken"}},{"id": "lolihouse_kakuriyo_bare_ni_season","filename": "[LoliHouse] Kakuriyo no Yadomeshi Ni - 12 [WebRip 1080p HEVC-10bit AAC SRTx2].mkv","ok": true,"errors": {},"expected": {"group": "LoliHouse","title": "Kakuriyo no Yadomeshi","season": 2,"episode": 12,"resolution": "1080p","source": "WebRip"},"pred": {"episode": 12,"group": "LoliHouse","resolution": "1080p","season": 2,"source": "WebRip","title": "Kakuriyo no Yadomeshi"}},{"id": "ani_kakuriyo_traditional_ni","filename": "[ANi] 妖怪旅館營業中 貳 - 11 [1080P][Baha][WEB-DL][AAC AVC][CHT].mp4","ok": true,"errors": {},"expected": {"group": "ANi","title": "妖怪旅館營業中","season": 2,"episode": 11,"resolution": "1080P","source": "Baha"},"pred": {"episode": 11,"group": "ANi","resolution": "1080P","season": 2,"source": "Baha","title": "妖怪旅館營業中"}},{"id": "jibaketa_shokugeki_ni_no_sara","filename": "[jibaketa]Shokugeki no Souma Ni no Sara - 13 END [BD 1920x1080 x264 AACx2 SRT TVB CHT].mkv","ok": true,"errors": {},"expected": {"group": "jibaketa","title": "Shokugeki no Souma","season": 2,"episode": 13,"resolution": "1920x1080"},"pred": {"episode": 13,"group": "jibaketa","resolution": "1920x1080","season": 2,"title": "Shokugeki no Souma"}},{"id": "ai_raws_fire_force_cjk_season_hash_episode","filename": "[AI-Raws] 炎炎の消防隊 弐ノ章 #13 (BD HEVC 1920x1080 yuv444p10le FLAC)[FC74A2D5].mkv","ok": true,"errors": {},"expected": {"group": "AI-Raws","title": "炎炎の消防隊","season": 2,"episode": 13,"resolution": "1920x1080"},"pred": {"episode": 13,"group": "AI-Raws","resolution": "1920x1080","season": 2,"title": "炎炎の消防隊"}},{"id": "gm_team_guoman_bilingual_s2","filename": "[GM-Team][国漫][逆天邪神 第2季][Against the Gods Ⅱ][2026][04][HEVC][GB][4K].mp4","ok": true,"errors": {},"expected": {"group": "GM-Team","title": "逆天邪神","season": 2,"episode": 4,"resolution": "4K","source": "GB"},"pred": {"episode": 4,"group": "GM-Team","resolution": "4K","season": 2,"source": "GB","title": "逆天邪神"}},{"id": "vcb_special_iv_not_episode","filename": "[YYDM&VCB-Studio] Shinsekai Yori [IV05][Ma10p_1080p][x265_aac].mkv","ok": true,"errors": {},"expected": {"group": "YYDM&VCB-Studio","title": "Shinsekai Yori","episode": null,"resolution": "1080p","source": "x265_aac","special": "IV05"},"pred": {"episode": null,"group": "YYDM&VCB-Studio","resolution": "1080p","source": "x265-aac","special": "IV05","title": "Shinsekai Yori"}},{"id": "vcb_nced_not_episode","filename": "[YYDM&VCB-Studio] Shinsekai Yori [NCED02][Ma10p_1080p][x265_flac].mkv","ok": true,"errors": {},"expected": {"group": "YYDM&VCB-Studio","title": "Shinsekai Yori","episode": null,"resolution": "1080p","source": "x265_flac","special": "NCED02"},"pred": {"episode": null,"group": "YYDM&VCB-Studio","resolution": "1080p","source": "x265-flac","special": "NCED02","title": "Shinsekai Yori"}},{"id": "dot_nced_suffix_not_episode","filename": "InuYasha.2000.NCED02.BDrip.AV1.10Bit.DTS.1080p-CalChi","ok": true,"errors": {},"expected": {"title": "InuYasha","episode": null,"resolution": "1080p","source": "BDrip","special": "NCED02"},"pred": {"episode": null,"resolution": "1080p","source": "BDrip","special": "NCED02","title": "InuYasha"}},{"id": "vcb_numeric_title_nced","filename": "[VCB-Studio] Yamada-kun to 7-nin no Majo [NCED][Ma10p_1080p][x265_flac]","ok": true,"errors": {},"expected": {"group": "VCB-Studio","title": "Yamada-kun to 7-nin no Majo","episode": null,"resolution": "1080p","source": "x265_flac","special": "NCED"},"pred": {"episode": null,"group": "VCB-Studio","resolution": "1080p","source": "x265-flac","special": "NCED","title": "Yamada-kun to 7-nin no Majo"}}]}}}
1Subproject commit c40cb38963a390a61c6d375409031f8a6c5eb9271Subproject commit 255d53ecf84d339b87618c34a593c7f2f3a0040b
411 unmodified lines412413414415416417418419136 unmodified lines556557558559560561411 unmodified linesreturn Truedef trim_title_span(tokens: Sequence[str], start: int, end: int) -> tuple[int, int]:while start < end and not is_title_token(tokens[start]):start += 1while end > start and not is_title_token(tokens[end - 1]):end -= 1136 unmodified linescontinueif is_context_season_token(tokens, idx, episode_idx):categories[idx] = "season"def label_special_index_sequences(tokens: Sequence[str], categories: List[str]) -> None:411 unmodified lines412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455136 unmodified lines592593594595596597598599600601411 unmodified linesreturn Truedef is_title_start_token(tokens: Sequence[str], idx: int, end: int) -> bool:"""Allow numeric title starts like `86 Eighty Six` without allowing episode tails."""if is_title_token(tokens[idx]):return Trueclean = clean_bracket(tokens[idx])if not re.fullmatch(r"\d{1,4}", clean):return Falsenext_idx = idx + 1while next_idx < end and is_separator_token(tokens[next_idx]):next_idx += 1return next_idx < end and is_title_token(tokens[next_idx])def skip_leading_title_decoration(tokens: Sequence[str], start: int, end: int) -> int:"""Drop decorative release prefixes such as `★04月新番★` from title spans."""while start < end:token = clean_bracket(tokens[start])if token not in {"★", "☆"}:breakclosing = Nonefor idx in range(start + 1, min(end, start + 12)):if clean_bracket(tokens[idx]) == token:closing = idxbreakif closing is None:breakprefix_text = "".join(clean_bracket(piece) for piece in tokens[start:closing + 1])if not re.search(r"(?:新番|月番|合集|合輯|全集|完结|完結)", prefix_text):breakstart = closing + 1while start < end and is_separator_token(tokens[start]):start += 1return startdef trim_title_span(tokens: Sequence[str], start: int, end: int) -> tuple[int, int]:start = skip_leading_title_decoration(tokens, start, end)while start < end and not is_title_start_token(tokens, start, end):start += 1while end > start and not is_title_token(tokens[end - 1]):end -= 1136 unmodified linescontinueif is_context_season_token(tokens, idx, episode_idx):categories[idx] = "season"prev_idx = idx - 1while prev_idx >= 0 and is_separator_token(tokens[prev_idx]) and categories[prev_idx] == "title":categories[prev_idx] = "sep"prev_idx -= 1def label_special_index_sequences(tokens: Sequence[str], categories: List[str]) -> None:
23 unmodified lines2425262728293076 unmodified lines10710810911011111211311447 unmodified lines16216316416516616716816917017117217317417517617717817923 unmodified lines- token-to-id conversion / token 到 id 的转换- constrained BIO decoding / 约束 BIO 解码- field aggregation / 字段聚合- structural cleanup / 结构化清理Those steps must stay aligned with `tokenizer.py`, `inference.py`, `config.json`,and `vocab.json`.76 unmodified lines使用约束 BIO transition 解码标签。8. Aggregate labels into parser fields.聚合标签为结构化字段。9. Apply high-confidence structural cleanup.应用高置信结构修正。## 5. Android Notes / Android 注意事项47 unmodified linesuv run python benchmark_inference.py --model-dir . --onnx exports/anime_filename_parser.onnx --case-file data/parser_regression_cases.json --repeat 20 --warmup 20 --torch-threads 1 --ort-threads 1 --output benchmark_results.json```Local single-thread CPU result, measured on 26 real-world regression cases:本地 CPU 单线程结果,使用 26 条真实回归 case:| Backend / 后端 | Load ms / 加载 ms | Avg ms / 平均 ms | P50 ms | P95 ms | P99 ms | files/s || --- | ---: | ---: | ---: | ---: | ---: | ---: || PyTorch | 64.63 | 32.86 | 32.43 | 38.42 | 41.09 | 30.4 || ONNX Runtime | 898.63 | 30.35 | 30.12 | 34.44 | 36.86 | 33.0 |The benchmark includes tokenization, model/session forward, constrained BIOdecode, and postprocessing. It does not include repeatedly constructing theONNX Runtime session inside the loop.该基准包含 tokenizer、模型/session 前向、约束 BIO 解码和后处理;循环内不会重复创建ONNX Runtime session。23 unmodified lines2425262728293076 unmodified lines10710810911011111211311411511611711811912012147 unmodified lines16917017117217317417517617717817918018118218318418518618723 unmodified lines- token-to-id conversion / token 到 id 的转换- constrained BIO decoding / 约束 BIO 解码- field aggregation / 字段聚合- thin string and number normalization / 薄字符串和数字规范化Those steps must stay aligned with `tokenizer.py`, `inference.py`, `config.json`,and `vocab.json`.76 unmodified lines使用约束 BIO transition 解码标签。8. Aggregate labels into parser fields.聚合标签为结构化字段。9. Apply thin normalization only: trim brackets/extensions and convert numericfields.只做薄层规范化:裁剪括号/扩展名并转换数字字段。The legacy structural assist layer is available only behind `--rule-assist` inthe Python tools. It is not part of the default ONNX reference runtime.旧结构辅助层只在 Python 工具的 `--rule-assist` 下显式启用,不属于默认 ONNX参考运行时。## 5. Android Notes / Android 注意事项47 unmodified linesuv run python benchmark_inference.py --model-dir . --onnx exports/anime_filename_parser.onnx --case-file data/parser_regression_cases.json --repeat 20 --warmup 20 --torch-threads 1 --ort-threads 1 --output benchmark_results.json```Local single-thread CPU result, measured on 26 real-world regression cases withthe default thin runtime:本地 CPU 单线程结果,使用 26 条真实回归 case 和默认薄层运行时:| Backend / 后端 | Load ms / 加载 ms | Avg ms / 平均 ms | P50 ms | P95 ms | P99 ms | files/s || --- | ---: | ---: | ---: | ---: | ---: | ---: || PyTorch | 49.07 | 15.16 | 14.87 | 18.50 | 21.91 | 66.0 || ONNX Runtime | 568.85 | 13.08 | 12.82 | 15.95 | 20.19 | 76.5 |The benchmark includes tokenization, model/session forward, constrained BIOdecode, entity aggregation, and thin normalization. It does not includerepeatedly constructing the ONNX Runtime session inside the loop.该基准包含 tokenizer、模型/session 前向、约束 BIO 解码、实体聚合和薄层规范化;循环内不会重复创建 ONNX Runtime session。
126 unmodified lines127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168126 unmodified lines- `final/case_metrics.json`: fixed real-world case regression / 固定真实 case 回归- TensorBoard logs unless `--no-tensorboard` is set / 默认写 TensorBoard## 6. Focus Fine-Tuning / 针对性微调Use focus fine-tuning only after a specific real-world failure pattern has beenconfirmed and added to `data/parser_regression_cases.json`.只有在确认某类真实失败样式,并加入 `data/parser_regression_cases.json` 后,才使用针对性微调。```powershelluv run python build_repair_focus_dataset.py `--input datasets/AnimeName/dmhy_weak_char.jsonl `--output data/repair_focus_char.jsonl `--context-samples 50000 `--repeat-repaired 4 `--repeat-manual 24 `--seed 75uv run python train.py --tokenizer char `--data-file data/repair_focus_char.jsonl `--vocab-file datasets/AnimeName/vocab.char.json `--save-dir checkpoints/dmhy-char-special-focus `--init-model-dir . `--epochs 1 `--batch-size 64 `--learning-rate 0.00003 `--warmup-steps 50 `--max-seq-length 128 `--train-split 0.95 `--num-workers 0 `--checkpoint-steps 500 `--save-total-limit 2 `--parse-eval-limit 512 `--case-eval-file data/parser_regression_cases.json `--seed 75 `--experiment-name dmhy-char-special-focus```## 7. Publish to Repository Root / 发布到仓库根目录The repository root is the Hugging Face checkpoint surface.126 unmodified lines127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184126 unmodified lines- `final/case_metrics.json`: fixed real-world case regression / 固定真实 case 回归- TensorBoard logs unless `--no-tensorboard` is set / 默认写 TensorBoard## 6. Thin Hard-Case Fine-Tuning / 薄层困难样本微调Use hard-case fine-tuning only after a specific real-world failure pattern hasbeen confirmed, fixed in the weak labels, and added to`data/parser_regression_cases.json`.只有在确认某类真实失败样式、修复弱标注并加入`data/parser_regression_cases.json` 后,才使用困难样本微调。```powershelluv run python build_repair_focus_dataset.py `--input datasets/AnimeName/dmhy_weak_char.jsonl `--output data/thin_hard_focus_char.jsonl `--context-samples 30000 `--repeat-focus 3 `--repeat-manual 240 `--seed 57uv run python train.py --tokenizer char `--data-file data/thin_hard_focus_char.jsonl `--vocab-file datasets/AnimeName/vocab.char.json `--save-dir checkpoints/dmhy-char-thin-hardfocus `--init-model-dir . `--epochs 2 `--batch-size 256 `--learning-rate 0.00004 `--warmup-steps 80 `--max-seq-length 128 `--train-split 0.95 `--num-workers 4 `--checkpoint-steps 300 `--save-total-limit 2 `--parse-eval-limit 1024 `--case-eval-file data/parser_regression_cases.json `--seed 58 `--experiment-name dmhy-char-thin-hardfocus```The default quality gate is model-led parsing:默认质量门槛以模型主导解析为准:- fixed regression `model_only >= 85%`- held-out parse `model_only >= 75%`- `normalized_only` is the default thin runtime metric- `rule_assisted` is compatibility/diagnostic only- 固定回归 `model_only >= 85%`- held-out 解析 `model_only >= 75%`- `normalized_only` 是默认薄层运行时指标- `rule_assisted` 只作为兼容/诊断对照## 7. Publish to Repository Root / 发布到仓库根目录The repository root is the Hugging Face checkpoint surface.
120 unmodified lines121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158120 unmodified lines}def main() -> None:parser = argparse.ArgumentParser(description="Evaluate parser on fixed filename regression cases")parser.add_argument("--model-dir", required=True)parser.add_argument("--case-file", default=DEFAULT_CASE_FILE)parser.add_argument("--tokenizer", choices=["regex", "char"], default=None)parser.add_argument("--max-length", type=int, default=None)parser.add_argument("--output", default=None, help="Optional JSON output path")parser.add_argument("--no-rule-assist", action="store_true")parser.add_argument("--no-constrained-bio", action="store_true")args = parser.parse_args()metrics = evaluate_cases(model_dir=args.model_dir,case_file=args.case_file,tokenizer_variant=args.tokenizer,max_length=args.max_length,use_rules=not args.no_rule_assist,constrain_bio=not args.no_constrained_bio,)print(f"Full case accuracy: {metrics['full_correct']}/{metrics['case_count']} "f"({metrics['full_accuracy']:.4f})")for field, total in metrics["field_total"].items():correct = metrics["field_correct"].get(field, 0)print(f" {field}: {correct}/{total} ({correct / total:.4f})")if metrics["failures"]:print("\nFailures:")for failure in metrics["failures"]:print(json.dumps(failure, ensure_ascii=False))if args.output:os.makedirs(os.path.dirname(args.output) or ".", exist_ok=True)with open(args.output, "w", encoding="utf-8") as f:120 unmodified lines121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209120 unmodified lines}def evaluate_case_modes(model_dir: str,case_file: str,tokenizer_variant: Optional[str],max_length: Optional[int],) -> Dict:modes = {"model_only": {"use_rules": False, "constrain_bio": False},"normalized_only": {"use_rules": False, "constrain_bio": True},"rule_assisted": {"use_rules": True, "constrain_bio": True},}results = {name: evaluate_cases(model_dir=model_dir,case_file=case_file,tokenizer_variant=tokenizer_variant,max_length=max_length,use_rules=settings["use_rules"],constrain_bio=settings["constrain_bio"],)for name, settings in modes.items()}return {"primary_metric": "normalized_only","modes": results,}def print_metrics(name: str, metrics: Dict) -> None:print(f"{name} full case accuracy: {metrics['full_correct']}/{metrics['case_count']} "f"({metrics['full_accuracy']:.4f})")for field, total in metrics["field_total"].items():correct = metrics["field_correct"].get(field, 0)print(f" {field}: {correct}/{total} ({correct / total:.4f})")if metrics["failures"]:print(f"\n{name} failures:")for failure in metrics["failures"]:print(json.dumps(failure, ensure_ascii=False))def main() -> None:parser = argparse.ArgumentParser(description="Evaluate parser on fixed filename regression cases")parser.add_argument("--model-dir", required=True)parser.add_argument("--case-file", default=DEFAULT_CASE_FILE)parser.add_argument("--tokenizer", choices=["regex", "char"], default=None)parser.add_argument("--max-length", type=int, default=None)parser.add_argument("--output", default=None, help="Optional JSON output path")parser.add_argument("--mode", choices=["all", "model-only", "normalized-only", "rule-assisted"], default="all")parser.add_argument("--rule-assist", action="store_true", help="Shortcut for --mode rule-assisted")parser.add_argument("--no-rule-assist", action="store_true", help=argparse.SUPPRESS)parser.add_argument("--no-constrained-bio", action="store_true")args = parser.parse_args()if args.rule_assist:args.mode = "rule-assisted"if args.no_rule_assist and args.mode == "rule-assisted":args.mode = "normalized-only"if args.mode == "all" and not args.no_constrained_bio:metrics = evaluate_case_modes(model_dir=args.model_dir,case_file=args.case_file,tokenizer_variant=args.tokenizer,max_length=args.max_length,)for name in ("model_only", "normalized_only", "rule_assisted"):print_metrics(name, metrics["modes"][name])print()else:use_rules = args.mode == "rule-assisted"constrain_bio = not args.no_constrained_bio and args.mode != "model-only"metrics = evaluate_cases(model_dir=args.model_dir,case_file=args.case_file,tokenizer_variant=args.tokenizer,max_length=args.max_length,use_rules=use_rules,constrain_bio=constrain_bio,)print_metrics(args.mode, metrics)if args.output:os.makedirs(os.path.dirname(args.output) or ".", exist_ok=True)with open(args.output, "w", encoding="utf-8") as f:
7 unmodified lines891011127 unmodified lines128,15],"max_abs_diff": 2.6702880859375e-05}7 unmodified lines891011127 unmodified lines128,15],"max_abs_diff": 4.0531158447265625e-05}
123version https://git-lfs.github.com/spec/v1oid sha256:28ac9b1e17d0e70f31a986a1d677513d97e77748ccdf96c8d77245cadc54fa4esize 19652184123version https://git-lfs.github.com/spec/v1oid sha256:845e01ebdbf4a933610fcfb9f5be2fec2367e9db26d98308d827cbe23817b072size 19645986
74 unmodified lines757677787980129 unmodified lines21021121221321421521613 unmodified lines230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274654 unmodified lines92993093193293393493589 unmodified lines10251026102710281029103041 unmodified lines1072107310741075107610771078107941 unmodified lines112111221123112411251126112774 unmodified linesreturn clean if clean else Nonedef display_token(token: str) -> str:"""Make whitespace tokens visible in debug output."""if token == " ":129 unmodified lineslabels: List[str],tokenizer: Optional[AnimeTokenizer] = None,filename: Optional[str] = None,use_rules: bool = True,) -> Dict:"""Convert BIO-labeled tokens into structured metadata.13 unmodified linesentities = labels_to_entities(tokens, labels, tokenizer)# Fill resultfor entity_type, text in entities:if entity_type == "TITLE":result["title"] = result["title"] or trim_decorations(text)# If we find multiple title fragments, concatenate them# (handles "That" + ... + "Time" etc.)elif entity_type == "SEASON":season_num = extract_season_number(text)if season_num is not None:# Keep the highest/last season number if multipleresult["season"] = season_numelif entity_type == "EPISODE":ep_num = extract_episode_number(text)if ep_num is not None:if result["episode"] is None:result["episode"] = ep_numelif entity_type == "GROUP":group = text.strip("[]()【】")if result["group"] is None:result["group"] = groupelif entity_type == "SPECIAL":special = text.strip("[]()【】")result["special"] = specialelif entity_type == "RESOLUTION":res = extract_resolution(text)if res:result["resolution"] = reselif entity_type == "SOURCE":src = text.strip("[]()【】")result["source"] = src# Handle multi-fragment titles: concatenate all TITLE fragments# (This is needed because O tokens between words break entity continuity)title_fragments = [t for e, t in entities if e == "TITLE"]if title_fragments:result["title"] = " ".join(trimmed for f in title_fragmentsif (trimmed := trim_decorations(f)))if use_rules and filename:result = apply_rule_assists(filename, result)654 unmodified linesid2label: Dict[int, str],max_length: int = 64,debug: bool = False,use_rules: bool = True,constrain_bio: bool = True,) -> Dict:"""89 unmodified linesresult["_debug"] = {"tokenizer_variant": getattr(tokenizer, "tokenizer_variant", "regex"),"decoder": "constrained_bio" if constrain_bio else "greedy","max_length": max_length,"token_count": len(tokens),"available_token_count": available,41 unmodified lineshelp="Maximum sequence length")parser.add_argument("--debug", action="store_true",help="Include tokenizer, labels, scores, and entity spans in JSON output")parser.add_argument("--no-rule-assist", action="store_true",help="Disable high-confidence structural post-processing rules")parser.add_argument("--no-constrained-bio", action="store_true",help="Use greedy per-token decoding instead of constrained BIO Viterbi")args = parser.parse_args()41 unmodified linesid2label,max_length,debug=args.debug,use_rules=not args.no_rule_assist,constrain_bio=not args.no_constrained_bio,)result["_input"] = fn74 unmodified lines75767778798081828384858687888990919293949596979899100101102103104105106107108109110129 unmodified lines24024124224324424524613 unmodified lines260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302654 unmodified lines95795895996096196296389 unmodified lines105310541055105610571058105941 unmodified lines110111021103110411051106110711081109111041 unmodified lines115211531154115511561157115874 unmodified linesreturn clean if clean else Nonedef normalize_field_text(text: str) -> str:return trim_decorations(text).strip(" \t-_.")def thin_source_priority(source: str) -> int:normalized = source.lower().replace("_", "-").replace(" ", "")if normalized in {"nf", "netflix", "amzn", "baha", "cr", "abema", "dsnp", "u-next", "hulu", "at-x","web-dl", "webdl", "webrip", "web-rip", "bdrip", "bluray", "bdmv", "bd","dvdrip", "dvd", "tvrip", "hdtv",}:return 90if normalized in {"chs", "cht", "gb", "big5", "jpn", "jp", "jpsc", "jptc", "繁中", "简中"}:return 70if normalized in {"x264", "x265", "h.264", "h264", "h.265", "h265", "hevc", "avc", "av1","aac", "flac", "mp3", "dts", "opus", "10bit", "8bit", "hi10p", "ma10p","srt", "srtx2", "ass", "assx2",}:return 20return 40 if re.search(r"[&+/,]", source) else 30def choose_thin_source(sources: List[str]) -> Optional[str]:cleaned = [normalize_source_text(source) for source in sources if normalize_field_text(source)]if not cleaned:return Nonereturn max(enumerate(cleaned), key=lambda item: (thin_source_priority(item[1]), -item[0]))[1]def display_token(token: str) -> str:"""Make whitespace tokens visible in debug output."""if token == " ":129 unmodified lineslabels: List[str],tokenizer: Optional[AnimeTokenizer] = None,filename: Optional[str] = None,use_rules: bool = False,) -> Dict:"""Convert BIO-labeled tokens into structured metadata.13 unmodified linesentities = labels_to_entities(tokens, labels, tokenizer)grouped_entities: Dict[str, List[str]] = {}for entity_type, text in entities:grouped_entities.setdefault(entity_type, []).append(text)title_fragments = [cleaned for text in grouped_entities.get("TITLE", [])if (cleaned := normalize_field_text(text))]if title_fragments:result["title"] = " ".join(title_fragments)for text in grouped_entities.get("SEASON", []):season_num = extract_season_number(text)if season_num is not None:result["season"] = season_numfor text in grouped_entities.get("EPISODE", []):ep_num = extract_episode_number(text)if ep_num is not None:if result["episode"] is None:result["episode"] = ep_numfor text in grouped_entities.get("GROUP", []):group = normalize_field_text(text)if result["group"] is None:result["group"] = groupfor text in grouped_entities.get("SPECIAL", []):special = normalize_field_text(text)result["special"] = specialfor text in grouped_entities.get("RESOLUTION", []):res = extract_resolution(text)if res:result["resolution"] = resresult["source"] = choose_thin_source(grouped_entities.get("SOURCE", []))if use_rules and filename:result = apply_rule_assists(filename, result)654 unmodified linesid2label: Dict[int, str],max_length: int = 64,debug: bool = False,use_rules: bool = False,constrain_bio: bool = True,) -> Dict:"""89 unmodified linesresult["_debug"] = {"tokenizer_variant": getattr(tokenizer, "tokenizer_variant", "regex"),"decoder": "constrained_bio" if constrain_bio else "greedy","postprocess": "rule_assisted" if use_rules else "thin_normalize","max_length": max_length,"token_count": len(tokens),"available_token_count": available,41 unmodified lineshelp="Maximum sequence length")parser.add_argument("--debug", action="store_true",help="Include tokenizer, labels, scores, and entity spans in JSON output")parser.add_argument("--rule-assist", action="store_true",help="Enable legacy structural post-processing rules")parser.add_argument("--no-rule-assist", action="store_true",help=argparse.SUPPRESS)parser.add_argument("--no-constrained-bio", action="store_true",help="Use greedy per-token decoding instead of constrained BIO Viterbi")args = parser.parse_args()41 unmodified linesid2label,max_length,debug=args.debug,use_rules=args.rule_assist and not args.no_rule_assist,constrain_bio=not args.no_constrained_bio,)result["_input"] = fn
123version https://git-lfs.github.com/spec/v1oid sha256:9f251f8d4bbb750ba3bfd6fceffbec32eff3f32e9f07820bdab48294052d15a5size 19142604123version https://git-lfs.github.com/spec/v1oid sha256:4c5c4e57443ed66fed3812c7c6fe2f14af292a8a32523017930fde2ac93d67ffsize 19142604
58 unmodified lines5960616263646521 unmodified lines8788899091929317 unmodified lines1111121131141151161171 unmodified line11912012112212312412558 unmodified linesmodel_dir: Path,onnx_path: Path,max_length: int,use_rules: bool = True,) -> Dict:parser = OnnxFilenameParser(model_dir, onnx_path, max_length)return parser.parse(filename, use_rules=use_rules)21 unmodified linesproviders=providers or ["CPUExecutionProvider"],)def parse(self, filename: str, use_rules: bool = True) -> Dict:tokens, input_ids, attention_mask, available = encode(filename, self.tokenizer, self.max_length)logits = self.session.run(["logits"],17 unmodified linesparser.add_argument("--model-dir", default=".", help="Directory containing vocab.json and config.json")parser.add_argument("--onnx", default="exports/anime_filename_parser.onnx", help="ONNX model path")parser.add_argument("--max-length", type=int, default=128, help="Static ONNX sequence length")parser.add_argument("--no-rule-assist", action="store_true", help="Disable structural postprocessing")args = parser.parse_args()result = parse_with_onnx(1 unmodified linemodel_dir=Path(args.model_dir),onnx_path=Path(args.onnx),max_length=args.max_length,use_rules=not args.no_rule_assist,)print(json.dumps(result, ensure_ascii=False))58 unmodified lines5960616263646521 unmodified lines8788899091929317 unmodified lines1111121131141151161171181 unmodified line12012112212312412512658 unmodified linesmodel_dir: Path,onnx_path: Path,max_length: int,use_rules: bool = False,) -> Dict:parser = OnnxFilenameParser(model_dir, onnx_path, max_length)return parser.parse(filename, use_rules=use_rules)21 unmodified linesproviders=providers or ["CPUExecutionProvider"],)def parse(self, filename: str, use_rules: bool = False) -> Dict:tokens, input_ids, attention_mask, available = encode(filename, self.tokenizer, self.max_length)logits = self.session.run(["logits"],17 unmodified linesparser.add_argument("--model-dir", default=".", help="Directory containing vocab.json and config.json")parser.add_argument("--onnx", default="exports/anime_filename_parser.onnx", help="ONNX model path")parser.add_argument("--max-length", type=int, default=128, help="Static ONNX sequence length")parser.add_argument("--rule-assist", action="store_true", help="Enable legacy structural postprocessing")parser.add_argument("--no-rule-assist", action="store_true", help=argparse.SUPPRESS)args = parser.parse_args()result = parse_with_onnx(1 unmodified linemodel_dir=Path(args.model_dir),onnx_path=Path(args.onnx),max_length=args.max_length,use_rules=args.rule_assist and not args.no_rule_assist,)print(json.dumps(result, ensure_ascii=False))
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583{"sample_count": 512,"field_accuracy": {"group": 1.0,"title": 0.974609375,"season": 0.98046875,"episode": 0.806640625,"resolution": 1.0,"source": 0.998046875,"special": 0.96875},"field_correct": {"group": 512,"title": 499,"season": 502,"episode": 413,"resolution": 512,"source": 511,"special": 496},"field_total": {"group": 512,"title": 512,"season": 512,"episode": 512,"resolution": 512,"source": 512,"special": 512},"full_match_accuracy": 0.751953125,"full_match_correct": 385,"full_match_total": 512,"failures": [{"filename": "[ReinForce] Sword Art Online II - ED3 (BDRip 1920x1080 x264 FLAC)","errors": {"season": {"gold": null,"pred": "2"}},"gold": {"group": "ReinForce","title": "Sword Art Online II","season": null,"episode": null,"resolution": "1920x1080","source": "BDRip","special": "ED3"},"pred": {"group": "ReinForce","title": "Sword Art Online II","season": 2,"episode": null,"resolution": "1920x1080","source": "BDRip","special": "ED3"}},{"filename": "[アニメ DVD] 銀装騎攻オーディアン ACT.06 特典映像 川田&榎本トーク (DVD 640x480 WMV9 QB90 30fps MP3 192kbps)","errors": {"title": {"gold": "銀装騎攻オーディアン act.06 特典映像 川田&榎本トーク","pred": "銀装騎攻オーディアン act.06 特典映像 川田"}},"gold": {"group": "アニメ DVD","title": "銀装騎攻オーディアン ACT.06 特典映像 川田&榎本トーク","season": null,"episode": null,"resolution": "640x480","source": "DVD","special": null},"pred": {"group": "アニメ DVD","title": "銀装騎攻オーディアン ACT.06 特典映像 川田","season": null,"episode": null,"resolution": "640x480","source": "DVD","special": null}},{"filename": "05-ラディアン 第2シリーズ_ED","errors": {"title": {"gold": "05-ラディアン 第2シリーズ","pred": "05-ラディアン 第2"}},"gold": {"group": null,"title": "05-ラディアン 第2シリーズ","season": null,"episode": null,"resolution": null,"source": null,"special": "ED"},"pred": {"group": null,"title": "05-ラディアン 第2","season": null,"episode": null,"resolution": null,"source": null,"special": "ED"}},{"filename": "[A.A] hinotori 03","errors": {"title": {"gold": "hinotori 03","pred": "hinotori"},"episode": {"gold": null,"pred": "3"}},"gold": {"group": "A.A","title": "hinotori 03","season": null,"episode": null,"resolution": null,"source": null,"special": null},"pred": {"group": "A.A","title": "hinotori","season": null,"episode": 3,"resolution": null,"source": null,"special": null}},{"filename": "[Nekomoe kissaten] Azur Lane Bisoku Zenshin! [ED][05][BDRip 1080p HEVC-10bit FLAC]","errors": {"episode": {"gold": null,"pred": "5"}},"gold": {"group": "Nekomoe kissaten","title": "Azur Lane Bisoku Zenshin! [ED","season": null,"episode": null,"resolution": "1080p","source": "BDRip","special": "05"},"pred": {"group": "Nekomoe kissaten","title": "Azur Lane Bisoku Zenshin! [ED","season": null,"episode": 5,"resolution": "1080p","source": "BDRip","special": "05"}},{"filename": "[VCB-Studio] Danmachi IV [10][Ma10p_1080p][x265_flac]","errors": {"season": {"gold": null,"pred": "4"},"episode": {"gold": null,"pred": "10"}},"gold": {"group": "VCB-Studio","title": "Danmachi","season": null,"episode": null,"resolution": "1080p","source": "x265_flac","special": "10"},"pred": {"group": "VCB-Studio","title": "Danmachi","season": 4,"episode": 10,"resolution": "1080p","source": "x265_flac","special": "10"}},{"filename": "[FZSD&DBD-Raws][King of Prism Dramatic Prism.1][PV][12][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "12"}},"gold": {"group": "FZSD&DBD-Raws","title": "King of Prism Dramatic Prism.1","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "12"},"pred": {"group": "FZSD&DBD-Raws","title": "King of Prism Dramatic Prism.1","season": null,"episode": 12,"resolution": "1080P","source": "BDRip","special": "12"}},{"filename": "[SAIO-Raws] Wakaokami wa Shougakusei! PV 02 [BD 1920x1080 HEVC-10bit OPUS]","errors": {"episode": {"gold": null,"pred": "2"}},"gold": {"group": "SAIO-Raws","title": "Wakaokami wa Shougakusei! PV 02","season": null,"episode": null,"resolution": "1920x1080","source": "BD","special": "PV 02"},"pred": {"group": "SAIO-Raws","title": "Wakaokami wa Shougakusei! PV 02","season": null,"episode": 2,"resolution": "1920x1080","source": "BD","special": "PV 02"}},{"filename": "[DBD-Raws][Hime-sama Goumon no Jikan Desu][PV][01][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "1"}},"gold": {"group": "DBD-Raws","title": "Hime-sama Goumon no Jikan Desu","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "01"},"pred": {"group": "DBD-Raws","title": "Hime-sama Goumon no Jikan Desu","season": null,"episode": 1,"resolution": "1080P","source": "BDRip","special": "01"}},{"filename": "[DBD-Raws][Tenshi no 3P!][PV][03][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "3"}},"gold": {"group": "DBD-Raws","title": "Tenshi no 3P!","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "03"},"pred": {"group": "DBD-Raws","title": "Tenshi no 3P!","season": null,"episode": 3,"resolution": "1080P","source": "BDRip","special": "03"}},{"filename": "[Suzu-Kaze] DanMachi IV 21 [WebRip 1920x1080 HEVC YUV420P10 AAC]","errors": {"episode": {"gold": null,"pred": "21"}},"gold": {"group": "Suzu-Kaze","title": "DanMachi IV 21","season": null,"episode": null,"resolution": "1920x1080","source": "WebRip","special": "IV 21"},"pred": {"group": "Suzu-Kaze","title": "DanMachi IV 21","season": null,"episode": 21,"resolution": "1920x1080","source": "WebRip","special": "IV 21"}},{"filename": "[VCB-Studio] Log Horizon 2 [IV03][Ma10p_1080p][x265_aac]","errors": {"season": {"gold": null,"pred": "2"}},"gold": {"group": "VCB-Studio","title": "Log Horizon 2","season": null,"episode": null,"resolution": "1080p","source": "x265_aac","special": "IV03"},"pred": {"group": "VCB-Studio","title": "Log Horizon 2","season": 2,"episode": null,"resolution": "1080p","source": "x265_aac","special": "IV03"}},{"filename": "[DBD-Raws][Mahou Shoujo Lyrical Nanoha The Movie 2nd A's][PV][06][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "6"}},"gold": {"group": "DBD-Raws","title": "Mahou Shoujo Lyrical Nanoha The Movie 2nd A's","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "06"},"pred": {"group": "DBD-Raws","title": "Mahou Shoujo Lyrical Nanoha The Movie 2nd A's","season": null,"episode": 6,"resolution": "1080P","source": "BDRip","special": "06"}},{"filename": "[DBD-Raws][Hana wa Saku, Shura no Gotoku][PV][11][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "11"}},"gold": {"group": "DBD-Raws","title": "Hana wa Saku, Shura no Gotoku","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "11"},"pred": {"group": "DBD-Raws","title": "Hana wa Saku, Shura no Gotoku","season": null,"episode": 11,"resolution": "1080P","source": "BDRip","special": "11"}},{"filename": "[Seed-Raws] Strike the Blood IV - OVA Vol.01 Menu 02 (BD 1280x720 AVC AAC)","errors": {"season": {"gold": "4","pred": null}},"gold": {"group": "Seed-Raws","title": "Strike the Blood IV - OVA Vol.01 Menu 02","season": 4,"episode": null,"resolution": "1280x720","source": "BD","special": "OVA"},"pred": {"group": "Seed-Raws","title": "Strike the Blood IV - OVA Vol.01 Menu 02","season": null,"episode": null,"resolution": "1280x720","source": "BD","special": "OVA"}},{"filename": "[DBD-Raws][Hametsu no Oukoku][PV][05][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "5"}},"gold": {"group": "DBD-Raws","title": "Hametsu no Oukoku","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "05"},"pred": {"group": "DBD-Raws","title": "Hametsu no Oukoku","season": null,"episode": 5,"resolution": "1080P","source": "BDRip","special": "05"}},{"filename": "[DBD-Raws][Tate no Yuusha no Nariagari S1][PV][03][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "3"}},"gold": {"group": "DBD-Raws","title": "Tate no Yuusha no Nariagari","season": 1,"episode": null,"resolution": "1080P","source": "BDRip","special": "03"},"pred": {"group": "DBD-Raws","title": "Tate no Yuusha no Nariagari","season": 1,"episode": 3,"resolution": "1080P","source": "BDRip","special": "03"}},{"filename": "[DBD-Raws][Kimi no Iro][PV][12][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "12"}},"gold": {"group": "DBD-Raws","title": "Kimi no Iro","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "12"},"pred": {"group": "DBD-Raws","title": "Kimi no Iro","season": null,"episode": 12,"resolution": "1080P","source": "BDRip","special": "12"}},{"filename": "[DBD-Raws][Hime-sama Goumon no Jikan Desu][PV][02][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "2"}},"gold": {"group": "DBD-Raws","title": "Hime-sama Goumon no Jikan Desu","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "02"},"pred": {"group": "DBD-Raws","title": "Hime-sama Goumon no Jikan Desu","season": null,"episode": 2,"resolution": "1080P","source": "BDRip","special": "02"}},{"filename": "Mahou.no.Angel.Sweet.Mint.TV.1990.DVDRip-Hi.x264.AC3.1024.EP21-nezumi","errors": {"title": {"gold": "mahou.no.angel.sweet.mint.tv.1990. -hi. .ac","pred": "mahou.no.angel.sweet.mint.tv.1 -h"}},"gold": {"group": null,"title": "Mahou.no.Angel.Sweet.Mint.TV.1990. -Hi. .AC","season": null,"episode": 21,"resolution": null,"source": "DVDRip","special": null},"pred": {"group": null,"title": "Mahou.no.Angel.Sweet.Mint.TV.1 -H","season": null,"episode": 21,"resolution": null,"source": "DVDRip","special": null}}]}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159{"primary_metric": "normalized_only","modes": {"model_only": {"use_rules": false,"constrain_bio": false,"sample_count": 1024,"field_accuracy": {"group": 1.0,"title": 0.9970703125,"season": 1.0,"episode": 1.0,"resolution": 1.0,"source": 0.9990234375,"special": 0.994140625},"field_correct": {"group": 1024,"title": 1021,"season": 1024,"episode": 1024,"resolution": 1024,"source": 1023,"special": 1018},"field_total": {"group": 1024,"title": 1024,"season": 1024,"episode": 1024,"resolution": 1024,"source": 1024,"special": 1024},"full_match_accuracy": 0.990234375,"full_match_correct": 1014,"full_match_total": 1024,"failures": [{"filename": "BD Menu Vol.05","errors": {"title": {"gold": "menu","pred": "men"}},"gold": {"group": null,"title": "Menu","season": null,"episode": null,"resolution": null,"source": "BD","special": null},"pred": {"group": null,"title": "Men","season": null,"episode": null,"resolution": null,"source": "BD","special": null}},{"filename": "[YYDM-11FANS][Shaman King][43][DVDRip][720P][X264-10bit_AACx2][ED490609]","errors": {"special": {"gold": "ed490609","pred": "ed"}},"gold": {"group": "YYDM-11FANS","title": "Shaman King","season": null,"episode": 43,"resolution": "720P","source": "DVDRip","special": "ED490609"},"pred": {"group": "YYDM-11FANS","title": "Shaman King","season": null,"episode": 43,"resolution": "720P","source": "DVDRip","special": "ED"}},{"filename": "[UHA-WINGS&VCB-Studio] Karakai Jouzu no Takagi-san 2 [Binaural Sound EP09][Ma10p_1080p][x265_flac]","errors": {"title": {"gold": "uha-wings&vcb-studio karakai jouzu no takagi san 2 binaural sound ep","pred": "uha-wings&vcb-studio karakai jouzu no takagi san 2 binaural sound"}},"gold": {"group": null,"title": "UHA-WINGS&VCB-Studio Karakai Jouzu no Takagi san 2 Binaural Sound EP","season": null,"episode": 9,"resolution": "1080p","source": "x265-flac","special": null},"pred": {"group": null,"title": "UHA-WINGS&VCB-Studio Karakai Jouzu no Takagi san 2 Binaural Sound","season": null,"episode": 9,"resolution": "1080p","source": "x265-flac","special": null}},{"filename": "終末なにしてますか?忙しいですか?救ってもらっていいですか? OP2 「DEAREST DROP」","errors": {"special": {"gold": "op2","pred": "p"}},"gold": {"group": null,"title": "終末なにしてますか?忙しいですか?救ってもらっていいですか?","season": null,"episode": null,"resolution": null,"source": null,"special": "OP2"},"pred": {"group": null,"title": "終末なにしてますか?忙しいですか?救ってもらっていいですか?","season": null,"episode": null,"resolution": null,"source": null,"special": "P"}},{"filename": "[QTS] CITY HUNTER TV 3rd & '91 Series BD-BOX Eizou Tokuten - City Hunter 3 Housouchuu CM2 30sec (BD Hi10P 960x720 AAC)","errors": {"special": {"gold": "cm2","pred": "3"}},"gold": {"group": "QTS","title": "CITY HUNTER TV 3rd & '91 Series","season": null,"episode": null,"resolution": "960x720","source": "BD","special": "CM2"},"pred": {"group": "QTS","title": "CITY HUNTER TV 3rd & '91 Series","season": null,"episode": null,"resolution": "960x720","source": "BD","special": "3"}},{"filename": "22話「最凶恶的“他”Part 1/最凶恶的“他”Part 2」","errors": {"title": {"gold": "22話「最凶恶的“他”part 1/最凶恶的“他”part 2」","pred": "2 話「最凶恶的“他”part 1/最凶恶的“他”part 2」"}},"gold": {"group": null,"title": "22話「最凶恶的“他”Part 1/最凶恶的“他”Part 2」","season": null,"episode": null,"resolution": null,"source": null,"special": null},"pred": {"group": null,"title": "2 話「最凶恶的“他”Part 1/最凶恶的“他”Part 2」","season": null,"episode": null,"resolution": null,"source": null,"special": null}},{"filename": "[Judgment] Kareshi Kanojo no Jijou - NCED19.0 [6C5BD6E2]","errors": {"source": {"gold": "bd","pred": null}},"gold": {"group": "Judgment","title": "Kareshi Kanojo no Jijou","season": null,"episode": null,"resolution": null,"source": "BD","special": "NCED19"},"pred": {"group": "Judgment","title": "Kareshi Kanojo no Jijou","season": null,"episode": null,"resolution": null,"source": null,"special": "NCED19"}},{"filename": "[QTS] OVA QUIZ MAGIC ACADEMY The Original Animation OMAKE Eizou - EP1 OP + EP2 OPED (BD Hi10P 1920x1080 WV)","errors": {"special": {"gold": "op","pred": "d"}},"gold": {"group": "QTS","title": "QUIZ MAGIC ACADEMY The Original Animation OMAKE Eizou","season": null,"episode": 1,"resolution": "1920x1080","source": "BD","special": "OP"},"pred": {"group": "QTS","title": "QUIZ MAGIC ACADEMY The Original Animation OMAKE Eizou","season": null,"episode": 1,"resolution": "1920x1080","source": "BD","special": "D"}},{"filename": "[Moozzi2] Ojamajo Doremi Movie - 01 [ Sharp ] (BD 1920x1032 x.264 Flac)","errors": {"special": {"gold": "movie","pred": "0"}},"gold": {"group": "Moozzi2","title": "Ojamajo Doremi","season": null,"episode": 1,"resolution": "1920x1032","source": "BD","special": "Movie"},"pred": {"group": "Moozzi2","title": "Ojamajo Doremi","season": null,"episode": 1,"resolution": "1920x1032","source": "BD","special": "0"}},{"filename": "[Nekomoe kissaten&VCB-Studio] THE IDOLM@STER CINDERELLA GIRLS U149 [NCED07 お願い!シンデレラ][Ma10p_1080p][x265_flac]","errors": {"special": {"gold": "nced","pred": "7"}},"gold": {"group": "Nekomoe kissaten&VCB-Studio","title": "THE IDOLM@STER CINDERELLA GIRLS U","season": null,"episode": 149,"resolution": "1080p","source": "x265-flac","special": "NCED"},"pred": {"group": "Nekomoe kissaten&VCB-Studio","title": "THE IDOLM@STER CINDERELLA GIRLS U","season": null,"episode": 149,"resolution": "1080p","source": "x265-flac","special": "7"}}]},"normalized_only": {"use_rules": false,"constrain_bio": true,"sample_count": 1024,"field_accuracy": {"group": 1.0,"title": 0.9970703125,"season": 1.0,"episode": 1.0,"resolution": 1.0,"source": 0.9990234375,"special": 0.9970703125},"field_correct": {"group": 1024,"title": 1021,"season": 1024,"episode": 1024,"resolution": 1024,"source": 1023,"special": 1021},"field_total": {"group": 1024,"title": 1024,"season": 1024,"episode": 1024,"resolution": 1024,"source": 1024,"special": 1024},"full_match_accuracy": 0.9931640625,"full_match_correct": 1017,"full_match_total": 1024,"failures": [{"filename": "BD Menu Vol.05","errors": {"title": {"gold": "menu","pred": "men"}},"gold": {"group": null,"title": "Menu","season": null,"episode": null,"resolution": null,"source": "BD","special": null},"pred": {"group": null,"title": "Men","season": null,"episode": null,"resolution": null,"source": "BD","special": null}},{"filename": "[YYDM-11FANS][Shaman King][43][DVDRip][720P][X264-10bit_AACx2][ED490609]","errors": {"special": {"gold": "ed490609","pred": "ed"}},"gold": {"group": "YYDM-11FANS","title": "Shaman King","season": null,"episode": 43,"resolution": "720P","source": "DVDRip","special": "ED490609"},"pred": {"group": "YYDM-11FANS","title": "Shaman King","season": null,"episode": 43,"resolution": "720P","source": "DVDRip","special": "ED"}},{"filename": "[UHA-WINGS&VCB-Studio] Karakai Jouzu no Takagi-san 2 [Binaural Sound EP09][Ma10p_1080p][x265_flac]","errors": {"title": {"gold": "uha-wings&vcb-studio karakai jouzu no takagi san 2 binaural sound ep","pred": "uha-wings&vcb-studio karakai jouzu no takagi san 2 binaural sound"}},"gold": {"group": null,"title": "UHA-WINGS&VCB-Studio Karakai Jouzu no Takagi san 2 Binaural Sound EP","season": null,"episode": 9,"resolution": "1080p","source": "x265-flac","special": null},"pred": {"group": null,"title": "UHA-WINGS&VCB-Studio Karakai Jouzu no Takagi san 2 Binaural Sound","season": null,"episode": 9,"resolution": "1080p","source": "x265-flac","special": null}},{"filename": "[QTS] CITY HUNTER TV 3rd & '91 Series BD-BOX Eizou Tokuten - City Hunter 3 Housouchuu CM2 30sec (BD Hi10P 960x720 AAC)","errors": {"special": {"gold": "cm2","pred": "cm2 3"}},"gold": {"group": "QTS","title": "CITY HUNTER TV 3rd & '91 Series","season": null,"episode": null,"resolution": "960x720","source": "BD","special": "CM2"},"pred": {"group": "QTS","title": "CITY HUNTER TV 3rd & '91 Series","season": null,"episode": null,"resolution": "960x720","source": "BD","special": "CM2 3"}},{"filename": "22話「最凶恶的“他”Part 1/最凶恶的“他”Part 2」","errors": {"title": {"gold": "22話「最凶恶的“他”part 1/最凶恶的“他”part 2」","pred": "22 話「最凶恶的“他”part 1/最凶恶的“他”part 2」"}},"gold": {"group": null,"title": "22話「最凶恶的“他”Part 1/最凶恶的“他”Part 2」","season": null,"episode": null,"resolution": null,"source": null,"special": null},"pred": {"group": null,"title": "22 話「最凶恶的“他”Part 1/最凶恶的“他”Part 2」","season": null,"episode": null,"resolution": null,"source": null,"special": null}},{"filename": "[Judgment] Kareshi Kanojo no Jijou - NCED19.0 [6C5BD6E2]","errors": {"source": {"gold": "bd","pred": null}},"gold": {"group": "Judgment","title": "Kareshi Kanojo no Jijou","season": null,"episode": null,"resolution": null,"source": "BD","special": "NCED19"},"pred": {"group": "Judgment","title": "Kareshi Kanojo no Jijou","season": null,"episode": null,"resolution": null,"source": null,"special": "NCED19"}},{"filename": "[Nekomoe kissaten&VCB-Studio] THE IDOLM@STER CINDERELLA GIRLS U149 [NCED07 お願い!シンデレラ][Ma10p_1080p][x265_flac]","errors": {"special": {"gold": "nced","pred": "nced07"}},"gold": {"group": "Nekomoe kissaten&VCB-Studio","title": "THE IDOLM@STER CINDERELLA GIRLS U","season": null,"episode": 149,"resolution": "1080p","source": "x265-flac","special": "NCED"},"pred": {"group": "Nekomoe kissaten&VCB-Studio","title": "THE IDOLM@STER CINDERELLA GIRLS U","season": null,"episode": 149,"resolution": "1080p","source": "x265-flac","special": "NCED07"}}]},"rule_assisted": {"use_rules": true,"constrain_bio": true,"sample_count": 1024,"field_accuracy": {"group": 0.9873046875,"title": 0.7265625,"season": 0.9912109375,"episode": 0.7021484375,"resolution": 1.0,"source": 0.98046875,"special": 0.951171875},"field_correct": {"group": 1011,"title": 744,"season": 1015,"episode": 719,"resolution": 1024,"source": 1004,"special": 974},"field_total": {"group": 1024,"title": 1024,"season": 1024,"episode": 1024,"resolution": 1024,"source": 1024,"special": 1024},"full_match_accuracy": 0.5068359375,"full_match_correct": 519,"full_match_total": 1024,"failures": [{"filename": "[DBD-Raws][Tokidoki Bosotto Russia-go de Dereru Tonari no Alya-san][PV][20][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "20"}},"gold": {"group": "DBD-Raws","title": "Tokidoki Bosotto Russia-go de Dereru Tonari no Alya-san","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "20"},"pred": {"group": "DBD-Raws","title": "Tokidoki Bosotto Russia-go de Dereru Tonari no Alya-san","season": null,"episode": 20,"resolution": "1080P","source": "BDRip","special": "20"}},{"filename": "[DBD-Raws][我的英雄学院 第三季][PV][02][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"title": {"gold": "我的英雄学院","pred": "我的英雄学院 第三季"},"episode": {"gold": null,"pred": "2"}},"gold": {"group": "DBD-Raws","title": "我的英雄学院","season": 3,"episode": null,"resolution": "1080P","source": "BDRip","special": "02"},"pred": {"group": "DBD-Raws","title": "我的英雄学院 第三季","season": 3,"episode": 2,"resolution": "1080P","source": "BDRip","special": "02"}},{"filename": "[Moozzi2] Katanagatari [SP01] NCOP - 02 (BD 1920x1080 x.264 Flac)","errors": {"episode": {"gold": "1","pred": null}},"gold": {"group": "Moozzi2","title": "Katanagatari","season": null,"episode": 1,"resolution": "1920x1080","source": "BD","special": "NCOP - 02"},"pred": {"group": "Moozzi2","title": "Katanagatari","season": null,"episode": null,"resolution": "1920x1080","source": "BD","special": "NCOP - 02"}},{"filename": "[DBD-Raws][Ijiranaide, Nagatoro-san 2nd Attack][PV][06][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "6"}},"gold": {"group": "DBD-Raws","title": "Ijiranaide, Nagatoro-san 2nd Attack","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "06"},"pred": {"group": "DBD-Raws","title": "Ijiranaide, Nagatoro-san 2nd Attack","season": null,"episode": 6,"resolution": "1080P","source": "BDRip","special": "06"}},{"filename": "【枫叶字幕组】宠物小精灵XY&Z[第30(122)话][720P][MP4][GB_JP].mp4","errors": {"title": {"gold": "宠物小精灵xy&z","pred": "宠物小精灵xy&z[第30"},"episode": {"gold": "30","pred": "122"}},"gold": {"group": "枫叶字幕组","title": "宠物小精灵XY&Z","season": null,"episode": 30,"resolution": "720P","source": "GB-JP","special": null},"pred": {"group": "枫叶字幕组","title": "宠物小精灵XY&Z[第30","season": null,"episode": 122,"resolution": "720P","source": "GB-JP","special": null}},{"filename": "[Snow-Raws] グランベルム CM&PV10 (BD 1920x1080 HEVC-YUV420P10 FLAC)","errors": {"title": {"gold": "グランベルム","pred": "グランベルム cm&pv10"}},"gold": {"group": "Snow-Raws","title": "グランベルム","season": null,"episode": null,"resolution": "1920x1080","source": "BD","special": "PV10"},"pred": {"group": "Snow-Raws","title": "グランベルム CM&PV10","season": null,"episode": null,"resolution": "1920x1080","source": "BD","special": "PV10"}},{"filename": "[Moozzi2] High School D×D New [SP02] NCED - 01 (BD 1920x1080 x.264 Flac)","errors": {"episode": {"gold": "2","pred": null}},"gold": {"group": "Moozzi2","title": "High School D×D New","season": null,"episode": 2,"resolution": "1920x1080","source": "BD","special": "NCED - 01"},"pred": {"group": "Moozzi2","title": "High School D×D New","season": null,"episode": null,"resolution": "1920x1080","source": "BD","special": "NCED - 01"}},{"filename": "[SFEO-Raws] Koimonogatari - CM_01 (BD 720P x264 10bit AAC)[783E6EF2]","errors": {"title": {"gold": "koimonogatari","pred": "koimonogatari - cm_01"}},"gold": {"group": "SFEO-Raws","title": "Koimonogatari","season": null,"episode": null,"resolution": "720P","source": "BD","special": "CM_01"},"pred": {"group": "SFEO-Raws","title": "Koimonogatari - CM_01","season": null,"episode": null,"resolution": "720P","source": "BD","special": "CM_01"}},{"filename": "[H720] Sangatsu no Lion CM01 (BD 1208x720 HEVC AAC)","errors": {"group": {"gold": null,"pred": "h720"},"title": {"gold": "h","pred": "sangatsu no lion"},"episode": {"gold": "720","pred": null},"special": {"gold": "cm","pred": "cm01"}},"gold": {"group": null,"title": "H","season": null,"episode": 720,"resolution": "1208x720","source": "BD","special": "CM"},"pred": {"group": "H720","title": "Sangatsu no Lion","season": null,"episode": null,"resolution": "1208x720","source": "BD","special": "CM01"}},{"filename": "[FZSD&DBD-Raws][King of Prism Dramatic Prism.1][PV][08][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "8"}},"gold": {"group": "FZSD&DBD-Raws","title": "King of Prism Dramatic Prism.1","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "08"},"pred": {"group": "FZSD&DBD-Raws","title": "King of Prism Dramatic Prism.1","season": null,"episode": 8,"resolution": "1080P","source": "BDRip","special": "08"}},{"filename": "Robin Hood no Daibouken 49","errors": {"episode": {"gold": null,"pred": "49"}},"gold": {"group": null,"title": "Robin Hood no Daibouken 49","season": null,"episode": null,"resolution": null,"source": null,"special": null},"pred": {"group": null,"title": "Robin Hood no Daibouken 49","season": null,"episode": 49,"resolution": null,"source": null,"special": null}},{"filename": "[Moozzi2] Paniponi Dash! [SP02] NCED - 07 [ EP.07 ] (BD 1920x1080 x.264 Flac)","errors": {"episode": {"gold": "2","pred": null}},"gold": {"group": "Moozzi2","title": "Paniponi Dash!","season": null,"episode": 2,"resolution": "1920x1080","source": "BD","special": "NCED - 07"},"pred": {"group": "Moozzi2","title": "Paniponi Dash!","season": null,"episode": null,"resolution": "1920x1080","source": "BD","special": "NCED - 07"}},{"filename": "[Moozzi2] Onegai My Melody [SP10] Kuromi Naration TV-CM - 01 [ 30Sec. ] (BD 1024x768 x.264 AAC)","errors": {"title": {"gold": "onegai my melody","pred": "onegai my melody [sp10] kuromi naration tv-cm"},"episode": {"gold": "10","pred": "1"}},"gold": {"group": "Moozzi2","title": "Onegai My Melody","season": null,"episode": 10,"resolution": "1024x768","source": "BD","special": "CM - 01"},"pred": {"group": "Moozzi2","title": "Onegai My Melody [SP10] Kuromi Naration TV-CM","season": null,"episode": 1,"resolution": "1024x768","source": "BD","special": "CM - 01"}},{"filename": "[DBD-Raws][Kuzu no Honkai][PV][02][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "2"}},"gold": {"group": "DBD-Raws","title": "Kuzu no Honkai","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "02"},"pred": {"group": "DBD-Raws","title": "Kuzu no Honkai","season": null,"episode": 2,"resolution": "1080P","source": "BDRip","special": "02"}},{"filename": "[DBD-Raws][One Piece Wano Arc][Soushuuhen][03][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"title": {"gold": "one piece wano arc soushuuhen","pred": "one piece wano arc"}},"gold": {"group": "DBD-Raws","title": "One Piece Wano Arc Soushuuhen","season": null,"episode": 3,"resolution": "1080P","source": "BDRip","special": null},"pred": {"group": "DBD-Raws","title": "One Piece Wano Arc","season": null,"episode": 3,"resolution": "1080P","source": "BDRip","special": null}},{"filename": "[LAC][Gintama][196][GB][R10]","errors": {"group": {"gold": null,"pred": "lac"},"title": {"gold": "lac gintama 196 gb r","pred": "gintama"},"episode": {"gold": "10","pred": "196"},"source": {"gold": null,"pred": "gb"}},"gold": {"group": null,"title": "LAC Gintama 196 GB R","season": null,"episode": 10,"resolution": null,"source": null,"special": null},"pred": {"group": "LAC","title": "Gintama","season": null,"episode": 196,"resolution": null,"source": "GB","special": null}},{"filename": "[DBD-Raws][Date a Live][Director's Cut][PV][07][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"title": {"gold": "date a live director's cut","pred": "date a live"},"episode": {"gold": null,"pred": "7"}},"gold": {"group": "DBD-Raws","title": "Date a Live Director's Cut","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "07"},"pred": {"group": "DBD-Raws","title": "Date a Live","season": null,"episode": 7,"resolution": "1080P","source": "BDRip","special": "07"}},{"filename": "[DBD-Raws][Nageki no Bourei wa Intai Shitai][PV][09][1080P][BDRip][HEVC-10bit][FLAC]","errors": {"episode": {"gold": null,"pred": "9"}},"gold": {"group": "DBD-Raws","title": "Nageki no Bourei wa Intai Shitai","season": null,"episode": null,"resolution": "1080P","source": "BDRip","special": "09"},"pred": {"group": "DBD-Raws","title": "Nageki no Bourei wa Intai Shitai","season": null,"episode": 9,"resolution": "1080P","source": "BDRip","special": "09"}},{"filename": "[RUELL-Next] Fruits Basket NCOP 1 (DVD 768x576 x264 AC3 384K) [FF1CA8EF]","errors": {"title": {"gold": "fruits basket","pred": "fruits basket ncop 1"},"special": {"gold": "ncop 1","pred": "ncop1"}},"gold": {"group": "RUELL-Next","title": "Fruits Basket","season": null,"episode": null,"resolution": "768x576","source": "DVD","special": "NCOP 1"},"pred": {"group": "RUELL-Next","title": "Fruits Basket NCOP 1","season": null,"episode": null,"resolution": "768x576","source": "DVD","special": "NCOP1"}},{"filename": "[アニメ DVD] ミスター味っ子 第69話 「島巡り磯鍋競争!7包丁人・大石老師登場」 (640x480 WMV9)","errors": {"source": {"gold": null,"pred": "dvd"}},"gold": {"group": "アニメ DVD","title": "ミスター味っ子","season": null,"episode": 69,"resolution": "640x480","source": null,"special": null},"pred": {"group": "アニメ DVD","title": "ミスター味っ子","season": null,"episode": 69,"resolution": "640x480","source": "DVD","special": null}}]}}}
1234562 unmodified lines91011121314151617181920212223{"experiment_name": "dmhy-char-special-focus2","data_file": "data/repair_focus_char.jsonl","tokenizer_variant": "char","vocab_file": "datasets/AnimeName/vocab.char.json","vocab_size": 6199,2 unmodified lines"num_hidden_layers": 4,"num_attention_heads": 8,"intermediate_size": 1024,"train_samples": 68939,"eval_samples": 3629,"epochs": 1.0,"batch_size": 64,"learning_rate": 3e-05,"warmup_steps": 50,"seed": 75,"device": "cpu","fp16": false,"gradient_accumulation_steps": 1,"dataloader_num_workers": 0}1234562 unmodified lines91011121314151617181920212223{"experiment_name": "dmhy-char-thin-hardfocus","data_file": "data/thin_hard_focus_char.jsonl","tokenizer_variant": "char","vocab_file": "datasets/AnimeName/vocab.char.json","vocab_size": 6199,2 unmodified lines"num_hidden_layers": 4,"num_attention_heads": 8,"intermediate_size": 1024,"train_samples": 117089,"eval_samples": 6163,"epochs": 2.0,"batch_size": 256,"learning_rate": 4e-05,"warmup_steps": 80,"seed": 58,"device": "cuda","fp16": true,"gradient_accumulation_steps": 1,"dataloader_num_workers": 4}
229 unmodified lines23023123223323423511 unmodified lines2472482492502512522535 unmodified lines25926026126226326426526629 unmodified lines2962972982993003015 unmodified lines307308309310311312297 unmodified lines6106116126136146156164 unmodified lines621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658229 unmodified linesid2label: Dict[int, str],max_length: int,limit: Optional[int],) -> Dict:"""Evaluate end-to-end field exact match on filenames, not just token loss."""fields = ["group", "title", "season", "episode", "resolution", "source", "special"]11 unmodified linesavailable = max(0, max_length - 2)tokens = tokens[:available]gold_labels = gold_labels[:available]gold = postprocess(tokens, gold_labels, tokenizer=tokenizer, filename=filename, use_rules=True)gold_entities = {label.split("-", 1)[1] for label in gold_labels if label.startswith(("B-", "I-"))}for optional_field, entity in (("episode", "EPISODE"), ("season", "SEASON")):if entity not in gold_entities:5 unmodified linesid2label,max_length=max_length,debug=False,use_rules=True,constrain_bio=True,)full_match = True29 unmodified linestotal = counter.get("full_total", 0)correct = counter.get("full_correct", 0)return {"sample_count": total,"field_accuracy": field_accuracy,"field_correct": {field: counter.get(f"{field}_correct", 0) for field in fields},5 unmodified lines}def remap_token_embeddings(model: BertForTokenClassification,old_vocab: Dict[str, int],297 unmodified linesif args.parse_eval_limit != 0:parse_limit = args.parse_eval_limit if args.parse_eval_limit and args.parse_eval_limit > 0 else Noneparse_metrics = parse_exact_metrics(eval_data,trainer.model,tokenizer,4 unmodified lineswith open(os.path.join(final_save_path, "parse_eval_metrics.json"), "w", encoding="utf-8") as f:json.dump(parse_metrics, f, ensure_ascii=False, indent=2)print("\nParse exact-match evaluation:")print(f" full_match: {parse_metrics['full_match_correct']}/"f"{parse_metrics['full_match_total']} ({parse_metrics['full_match_accuracy']:.4f})")for field, accuracy in parse_metrics["field_accuracy"].items():correct = parse_metrics["field_correct"][field]total = parse_metrics["field_total"][field]print(f" {field}: {correct}/{total} ({accuracy:.4f})")if not args.no_case_eval:if args.case_eval_file and os.path.isfile(args.case_eval_file):from evaluate_parser_cases import evaluate_casescase_metrics = evaluate_cases(model_dir=final_save_path,case_file=args.case_eval_file,tokenizer_variant=tokenizer_variant,max_length=config.max_seq_length,use_rules=True,constrain_bio=True,)case_output = args.case_eval_output or os.path.join(final_save_path, "case_metrics.json")os.makedirs(os.path.dirname(case_output) or ".", exist_ok=True)with open(case_output, "w", encoding="utf-8") as f:json.dump(case_metrics, f, ensure_ascii=False, indent=2)print("\nFixed case regression evaluation:")print(f" full_match: {case_metrics['full_correct']}/"f"{case_metrics['case_count']} ({case_metrics['full_accuracy']:.4f})")if case_metrics["failures"]:print(f" failures: {len(case_metrics['failures'])} (see {case_output})")elif args.case_eval_file:print(f"\nSkipping fixed case regression evaluation; file not found: {args.case_eval_file}")229 unmodified lines23023123223323423523623711 unmodified lines2492502512522532542555 unmodified lines26126226326426526626726829 unmodified lines2982993003013023033043055 unmodified lines311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347297 unmodified lines6456466476486496506514 unmodified lines656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690229 unmodified linesid2label: Dict[int, str],max_length: int,limit: Optional[int],use_rules: bool = False,constrain_bio: bool = True,) -> Dict:"""Evaluate end-to-end field exact match on filenames, not just token loss."""fields = ["group", "title", "season", "episode", "resolution", "source", "special"]11 unmodified linesavailable = max(0, max_length - 2)tokens = tokens[:available]gold_labels = gold_labels[:available]gold = postprocess(tokens, gold_labels, tokenizer=tokenizer, filename=filename, use_rules=False)gold_entities = {label.split("-", 1)[1] for label in gold_labels if label.startswith(("B-", "I-"))}for optional_field, entity in (("episode", "EPISODE"), ("season", "SEASON")):if entity not in gold_entities:5 unmodified linesid2label,max_length=max_length,debug=False,use_rules=use_rules,constrain_bio=constrain_bio,)full_match = True29 unmodified linestotal = counter.get("full_total", 0)correct = counter.get("full_correct", 0)return {"use_rules": use_rules,"constrain_bio": constrain_bio,"sample_count": total,"field_accuracy": field_accuracy,"field_correct": {field: counter.get(f"{field}_correct", 0) for field in fields},5 unmodified lines}def parse_exact_metrics_all_modes(samples: List[Dict],model: BertForTokenClassification,tokenizer: AnimeTokenizer,id2label: Dict[int, str],max_length: int,limit: Optional[int],) -> Dict:modes = {"model_only": {"use_rules": False, "constrain_bio": False},"normalized_only": {"use_rules": False, "constrain_bio": True},"rule_assisted": {"use_rules": True, "constrain_bio": True},}return {"primary_metric": "normalized_only","modes": {name: parse_exact_metrics(samples,model,tokenizer,id2label,max_length,limit,use_rules=settings["use_rules"],constrain_bio=settings["constrain_bio"],)for name, settings in modes.items()},}def remap_token_embeddings(model: BertForTokenClassification,old_vocab: Dict[str, int],297 unmodified linesif args.parse_eval_limit != 0:parse_limit = args.parse_eval_limit if args.parse_eval_limit and args.parse_eval_limit > 0 else Noneparse_metrics = parse_exact_metrics_all_modes(eval_data,trainer.model,tokenizer,4 unmodified lineswith open(os.path.join(final_save_path, "parse_eval_metrics.json"), "w", encoding="utf-8") as f:json.dump(parse_metrics, f, ensure_ascii=False, indent=2)print("\nParse exact-match evaluation:")for mode_name, mode_metrics in parse_metrics["modes"].items():print(f" {mode_name}: {mode_metrics['full_match_correct']}/"f"{mode_metrics['full_match_total']} ({mode_metrics['full_match_accuracy']:.4f})")if not args.no_case_eval:if args.case_eval_file and os.path.isfile(args.case_eval_file):from evaluate_parser_cases import evaluate_case_modescase_metrics = evaluate_case_modes(model_dir=final_save_path,case_file=args.case_eval_file,tokenizer_variant=tokenizer_variant,max_length=config.max_seq_length,)case_output = args.case_eval_output or os.path.join(final_save_path, "case_metrics.json")os.makedirs(os.path.dirname(case_output) or ".", exist_ok=True)with open(case_output, "w", encoding="utf-8") as f:json.dump(case_metrics, f, ensure_ascii=False, indent=2)print("\nFixed case regression evaluation:")for mode_name, mode_metrics in case_metrics["modes"].items():print(f" {mode_name}: {mode_metrics['full_correct']}/"f"{mode_metrics['case_count']} ({mode_metrics['full_accuracy']:.4f})")primary = case_metrics["modes"][case_metrics["primary_metric"]]if primary["failures"]:print(f" primary failures: {len(primary['failures'])} (see {case_output})")elif args.case_eval_file:print(f"\nSkipping fixed case regression evaluation; file not found: {args.case_eval_file}")
1234567891011{"eval_loss": 0.03365034610033035,"eval_precision": 0.9612760834670947,"eval_recall": 0.9719629960236955,"eval_f1": 0.9665900012105072,"eval_accuracy": 0.990421109705404,"eval_runtime": 13.2008,"eval_samples_per_second": 274.908,"eval_steps_per_second": 4.318,"epoch": 1.0}1234567891011{"eval_loss": 0.001824101316742599,"eval_precision": 0.996635213225075,"eval_recall": 0.9977786457061953,"eval_f1": 0.9972066016906769,"eval_accuracy": 0.9994733938512463,"eval_runtime": 30.171,"eval_samples_per_second": 204.269,"eval_steps_per_second": 0.829,"epoch": 2.0}
123version https://git-lfs.github.com/spec/v1oid sha256:b23b375ad7f991bc460e29c07b8250afa09ec2d62bad255e0fc6125f0982c56dsize 5265123version https://git-lfs.github.com/spec/v1oid sha256:d04646d7f2d38f632195034cf95c225cde16df9933d0fc48ecbdf375ab0e05b3size 5265
MAINTENANCE.md+8-1
README.md+28-22
benchmark_inference.py+5-4
benchmark_results.json+21-19
build_repair_focus_dataset.py+88
case_metrics.json+1725-553
datasets/AnimeName+1-1
dmhy_dataset.py+41-1
docs/onnx.md+19-11
docs/training.md+36-20
evaluate_parser_cases.py+71-20
exports/anime_filename_parser.metadata.json+1-1
exports/anime_filename_parser.onnx+2-2
inference.py+59-28
model.safetensors+1-1
onnx_inference.py+5-4
parse_eval_metrics.json+1142-566
run_metadata.json+12-12
train.py+54-22
trainer_eval_metrics.json+9-9
training_args.bin+1-1