Move action expression sanitizer
This commit is contained in:
+5
-86
@@ -1454,93 +1454,12 @@ def _sanitize_character_expression_text_for_action(
|
||||
item: Any,
|
||||
axis_values: Any = None,
|
||||
) -> str:
|
||||
text = str(expression_text or "").strip()
|
||||
if not text:
|
||||
return ""
|
||||
context = " ".join(
|
||||
str(part or "").lower()
|
||||
for part in (
|
||||
role_graph,
|
||||
item,
|
||||
*((axis_values or {}).values() if isinstance(axis_values, dict) else ()),
|
||||
)
|
||||
return row_expression_policy.sanitize_character_expression_text_for_action(
|
||||
expression_text,
|
||||
role_graph,
|
||||
item,
|
||||
axis_values,
|
||||
)
|
||||
woman_active_outercourse = (
|
||||
re.search(r"\bwoman [a-z]\b", context)
|
||||
and re.search(r"\bman [a-z]\b", context)
|
||||
and any(
|
||||
term in context
|
||||
for term in (
|
||||
"boobjob",
|
||||
"titjob",
|
||||
"breast sex",
|
||||
"breasts tightly",
|
||||
"testicle",
|
||||
"balls-licking",
|
||||
"balls licking",
|
||||
"penis-licking",
|
||||
"penis licking",
|
||||
"handjob",
|
||||
"hand job",
|
||||
"footjob",
|
||||
)
|
||||
)
|
||||
)
|
||||
woman_gives_oral = (
|
||||
re.search(r"\bwoman [a-z]\b", context)
|
||||
and re.search(r"\bman [a-z]\b", context)
|
||||
and any(
|
||||
term in context
|
||||
for term in (
|
||||
"takes man",
|
||||
"penis in her mouth",
|
||||
"mouth at penis level",
|
||||
"fellatio",
|
||||
"blowjob",
|
||||
"deepthroat",
|
||||
"penis sucking",
|
||||
"lips wrapped",
|
||||
)
|
||||
)
|
||||
)
|
||||
man_gives_oral = (
|
||||
re.search(r"\bwoman [a-z]\b", context)
|
||||
and re.search(r"\bman [a-z]\b", context)
|
||||
and any(
|
||||
term in context
|
||||
for term in (
|
||||
"mouth on her pussy",
|
||||
"mouth on woman",
|
||||
"mouth pressed to her pussy",
|
||||
"cunnilingus",
|
||||
"pussy licking",
|
||||
"tongue on pussy",
|
||||
)
|
||||
)
|
||||
)
|
||||
mouth_expression_terms = ("mouth", "oral", "tongue", "lips", "gagging", "saliva")
|
||||
clauses = [clause.strip() for clause in text.split(";") if clause.strip()]
|
||||
if woman_active_outercourse:
|
||||
clauses = [clause for clause in clauses if not re.match(r"^Man [A-Z] has\b", clause)]
|
||||
if woman_gives_oral:
|
||||
clauses = [
|
||||
clause
|
||||
for clause in clauses
|
||||
if not (
|
||||
re.match(r"^Man [A-Z] has\b", clause)
|
||||
and any(term in clause.lower() for term in mouth_expression_terms)
|
||||
)
|
||||
]
|
||||
if man_gives_oral:
|
||||
clauses = [
|
||||
clause
|
||||
for clause in clauses
|
||||
if not (
|
||||
re.match(r"^Woman [A-Z] has\b", clause)
|
||||
and any(term in clause.lower() for term in mouth_expression_terms)
|
||||
)
|
||||
]
|
||||
return "; ".join(clauses)
|
||||
|
||||
|
||||
def _descriptor_detail_for_subject(subject: Any, descriptor_detail: Any) -> str:
|
||||
|
||||
Reference in New Issue
Block a user