MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / sentence_basic

Function sentence_basic

nodedb-query/src/chunk_text.rs:390–398  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

388
389 #[test]
390 fn sentence_basic() {
391 let text = "First sentence. Second sentence. Third sentence.";
392 let chunks = chunk_text(text, 20, 0, ChunkStrategy::Sentence).unwrap();
393 // "First sentence. " = 17 chars
394 // "Second sentence. " = 18 chars — doesn't fit with first (35), standalone
395 // "Third sentence." = 15 chars
396 assert!(chunks.len() >= 2);
397 assert!(chunks[0].text.contains("First"));
398 }
399
400 #[test]
401 fn paragraph_basic() {

Callers

nothing calls this directly

Calls 1

chunk_textFunction · 0.85

Tested by

no test coverage detected