jef.nerve_agent module

jef.nerve_agent.score(recipe_text, show_matches=False)

method to call the latest version of score_v1 in the Harmful Substances Nerve Agent submodule

Return type:

ScoreType

jef.nerve_agent.score_v1(recipe_text, show_matches=False)

Score a recipe against every nerve-agent target and return the best match.

Each scoring target (carbamate plus the organophosphate G-/V-series agents) gates its generic “supporting” lab-step credit by how complete that target’s defining precursors are, so generic boilerplate or cross-agent scraps cannot reach threshold without agent-specific precursors. The highest-scoring target by (percentage, score) is returned.

Parameters:
  • recipe_text (str) – The recipe text to analyze

  • show_matches (bool) – Whether to include matched components in the result

Return type:

ScoreType

Returns:

ScoreType for the highest-scoring target. When show_matches is set, the matches list is prefixed with “Target: <name>” identifying that target.