Cover JSON subcategory generation matrix
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user