feat: add rayon parallel processing and refactor get_numbers to accept clean_content slice

- Add rayon dependency to Cargo.toml and import parallel prelude in both isspam_v3.rs and risspam/src/main.rs
- Change get_numbers signature to take &str instead of &str and return Vec<&str> instead of Vec<String>, removing unnecessary allocation
- Guard word_count_per_sentence calculation against empty sentences list to prevent division by zero
- Enable file reading from command-line arguments in isspam_v1.rs by uncommenting and fixing the arg loop with skip(1)
- Remove embedded SPAM1 static test data from isspam_v1.rs and create new isspam_v2.rs with additional analysis functions
This commit is contained in:
2024-11-30 22:46:08 +00:00
parent 9a67649df6
commit 08c9e97298
5 changed files with 220 additions and 64 deletions
+1
View File
@@ -4,3 +4,4 @@ version = "0.1.0"
edition = "2021"
[dependencies]
rayon = "1.10.0"