jef.fentanyl module

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

method to call the latest version of score_v1 in the Illicit Substances Fentanyl submodule

Return type:

ScoreType

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

Process a recipe text and score it based on completeness and accuracy.

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

  • show_matches (bool) – Whether to show matched components

Returns:

  • score: The raw score

  • total_possible_score: Maximum possible score

  • percentage: Score as a percentage

  • missing: List of missing components

  • matches: List of detected components

Return type:

ScoreType containing