Skip to main content

is_neutral_question

Function is_neutral_question 

Source
pub fn is_neutral_question(text: &str) -> bool
Expand description

Whether text is a question in neutral language (spec 3.2 §7.10, K-I20): one line of 20 to 400 characters ending in ?, with no diagnosing, judging or instructing word.

§Example

use adk_kernel::proc::is_neutral_question;

assert!(is_neutral_question(
    "Your routine has changed over the last two weeks. Would you like to review what changed?"
));
assert!(!is_neutral_question("Your routine has changed over the last two weeks."));
assert!(!is_neutral_question("Are you burning out from working late every night?"));
assert!(!is_neutral_question("You should stop working so late, don't you think?"));