MCPcopy Create free account
hub / github.com/AI45Lab/Code / significant_terms

Function significant_terms

core/src/agent/auto_delegation.rs:416–437  ·  view source on GitHub ↗
(text: &str)

Source from the content-addressed store, hash-verified

414}
415
416fn significant_terms(text: &str) -> Vec<&str> {
417 text.split(|ch: char| !ch.is_alphanumeric() && ch != '_')
418 .filter(|term| term.len() >= 4)
419 .filter(|term| {
420 !matches!(
421 *term,
422 "agent"
423 | "task"
424 | "with"
425 | "that"
426 | "this"
427 | "from"
428 | "only"
429 | "read"
430 | "write"
431 | "code"
432 | "file"
433 | "files"
434 )
435 })
436 .collect()
437}
438
439fn contains_any(text: &str, terms: &[&str]) -> bool {
440 terms.iter().any(|term| text.contains(term))

Callers 1

description_confidenceFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected