refactor: splitting models

This commit is contained in:
2026-08-07 10:43:42 -04:00
parent eb3c510911
commit f1288e155e
30 changed files with 453 additions and 413 deletions
+13 -13
View File
@@ -1058,11 +1058,7 @@ fn jaccard(a: &BTreeSet<String>, b: &BTreeSet<String>) -> f64 {
}
let inter = a.intersection(b).count() as f64;
let union = a.union(b).count() as f64;
if union == 0.0 {
0.0
} else {
inter / union
}
if union == 0.0 { 0.0 } else { inter / union }
}
/// The Flesch-Kincaid grade level of a passage.
@@ -1313,8 +1309,9 @@ options:
#[test]
fn stem_without_a_task_is_flagged_but_completions_are_not() {
assert!(codes(
r#"
assert!(
codes(
r#"
id: q-a-001
status: draft
level: 1
@@ -1323,11 +1320,13 @@ options:
- { id: A, text: aaaa, correct: true }
- { id: B, text: bbbb }
"#
)
.contains(&"clarity-no-task"));
)
.contains(&"clarity-no-task")
);
assert!(!codes(
r#"
assert!(
!codes(
r#"
id: q-a-001
status: draft
level: 1
@@ -1336,8 +1335,9 @@ options:
- { id: A, text: aaaa, correct: true }
- { id: B, text: bbbb }
"#
)
.contains(&"clarity-no-task"));
)
.contains(&"clarity-no-task")
);
}
#[test]