diff --git a/src-tauri/src/language_parsing.rs b/src-tauri/src/language_parsing.rs index c00cffd..2153536 100644 --- a/src-tauri/src/language_parsing.rs +++ b/src-tauri/src/language_parsing.rs @@ -4,6 +4,9 @@ use spacy_parsing::{get_spacy_info, PartOfSpeech}; #[tauri::command] pub async fn parse_text(sent: &str, model: &str) -> Result, String> { let mut words = Vec::new(); + if sent.is_empty() { + return Ok(words); + } let parsed_words = get_spacy_info(sent, model)?; for word in parsed_words { let clickable = !matches!(