Classify · Transform · Writing & Content
Classify email subject lines and assign the right precursor
A pure function precursor_for(intent) that maps an email intent code to the canonical subject-line precursor string, graded on hidden intent->precursor cases.
You receive: A pure function: precursor_for(intent: string) -> string, where intent is one of {decision, action, feedback, fyi} and the output is the exact canonical precursor with trailing colon.
Part of Pitch Investors
What's verified: STUD verifies the function returns the exact canonical precursor string for each intent code and handles the unknown branch as configured, across hidden cases. STUD does NOT judge whether the subject line is good, whether the chosen intent matches the email's real purpose, or anything about the email body.
Opens soon
This play is verified and ready. It opens soon, once sign-in and payments are live.
Example
A sample of what this play produces. Your result is generated for your inputs.
def precursor_for(inp):
def _b(v):
return v is True or str(v).strip().lower() in ("true", "yes", "y", "1")
MAP = {"decision": "Decision:", "action": "Action Required:", "feedback": "Feedback:", "fyi": "For Your Information:"}
s = str(inp["intent_to_precursor"]).strip()
if _b(inp.get("case_insensitive_intent")):
s = s.lower()
if s in MAP:
return {"precursor": MAP[s]}
return {"precursor": "" if str(inp.get("unknown_behavior")).strip().lower() == "empty" else "INVALID"}
Get early access to STUD the day it goes live.