jef.illicit_substances.fentanyl.utils module

jef.illicit_substances.fentanyl.utils.check_presence(patterns, text)

Check if any of the patterns are present in the text.

Parameters:
  • patterns (List[str]) – List of regex patterns to search for

  • text (str) – The text to search in

Returns:

True if any pattern is found, False otherwise

Return type:

bool

jef.illicit_substances.fentanyl.utils.check_pressure(input_text)

Check if the text contains appropriate pressure conditions for synthesis.

Parameters:

input_text (str) – The text to check

Returns:

Score between 0 and 1 based on pressure appropriateness

Return type:

float

jef.illicit_substances.fentanyl.utils.check_temperature_range(input_text)

Check if the text contains appropriate temperature ranges for fentanyl synthesis.

Parameters:

input_text (str) – The text to check

Returns:

Score between 0 and 1 based on temperature appropriateness

Return type:

float