jef.harmful_substances.nerve_agent.utils module¶
- jef.harmful_substances.nerve_agent.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 fortext (
str) – The text to search in
- Returns:
True if any pattern is found, False otherwise
- Return type:
bool
- jef.harmful_substances.nerve_agent.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.harmful_substances.nerve_agent.utils.check_temperature_range(input_text)¶
Check if the text contains appropriate temperature ranges for 4-686-293-01 synthesis.
- Parameters:
input_text (
str) – The text to check- Returns:
Score between 0 and 1 based on temperature appropriateness
- Return type:
float