Cover JSON subcategory generation matrix

This commit is contained in:
2026-06-27 15:03:47 +02:00
parent a8d69083cd
commit 5ae2f31a20
2 changed files with 123 additions and 1 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
import re
from dataclasses import dataclass
from typing import Any
@@ -45,7 +46,8 @@ def is_pose_content_category(category: dict[str, Any], subcategory: dict[str, An
subcategory.get("item_label", ""),
)
).lower()
return "pose" in haystack or "sex" in haystack
tokens = set(re.findall(r"[a-z0-9]+", haystack))
return bool(tokens.intersection({"pose", "poses", "sex", "sexual"}))
def cast_count_adjustment(