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:
@@ -1,5 +1,6 @@
|
||||
#!+[feature(let_chains)]
|
||||
#![feature(let_chains)]
|
||||
|
||||
use std::{env, fs};
|
||||
|
||||
fn clean_content(content: &str) -> String {
|
||||
let alloed_ichars = "01234567891abcdefghijklmnopqrstuvwxyz \n.,!?";
|
||||
@@ -98,17 +99,17 @@ fn analyze(data: &str) {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// // Read in files from args
|
||||
// for arg in env::args() {
|
||||
// let Ok(text) = fs::read_to_string(arg) else {
|
||||
// eprintln!("{arg} isn't a valid file or couldn't be read");
|
||||
// continue;
|
||||
// };
|
||||
//
|
||||
// analyze(&text);
|
||||
// }
|
||||
|
||||
analyze(&SPAM1);
|
||||
// Read in files from args
|
||||
for arg in env::args().skip(1) { // skip program arg
|
||||
let Ok(text) = fs::read_to_string(&arg) else {
|
||||
eprintln!("{arg} isn't a valid file or couldn't be read");
|
||||
continue;
|
||||
};
|
||||
|
||||
analyze(&text);
|
||||
}
|
||||
|
||||
// analyze(&SPAM1);
|
||||
}
|
||||
|
||||
static FORBIDDEN_WORDS: &'static [&'static str] = &[
|
||||
@@ -118,23 +119,3 @@ static FORBIDDEN_WORDS: &'static [&'static str] = &[
|
||||
"transaction", "essential", "managing", "contact", "contacting", "understanding", "assets", "funds"
|
||||
];
|
||||
|
||||
static SPAM1: &'static str = "HIRE Century Web Recovery TO RECOVER YOUR LOST BITCOIN
|
||||
If you’ve lost your Bitcoin to an online scam, hiring a professional recovery service can significantly improve your chances of getting your funds back. Century Web Recovery specializes in Bitcoin recovery, helping victims reclaim their stolen assets. Here’s what you need to know:
|
||||
|
||||
Understanding the Recovery Process
|
||||
The recovery process begins with contacting Century Web Recovery. Their team will guide you through the steps necessary to initiate an investigation into your case. Understanding the process is key to managing your expectations.
|
||||
|
||||
Documenting Your Case
|
||||
To facilitate recovery, it’s essential to document all relevant information regarding the scam. This includes transaction records, wallet addresses, and any communications with the scammer. Century Web Recovery will help you gather this information to build a strong case.
|
||||
|
||||
Investigation and Tracking
|
||||
Once you hire Century Web Recovery, their experts will begin investigating your case. They use sophisticated tools to track the stolen Bitcoin, identifying the paths taken by the scammers. This tracing is crucial for successful recovery.
|
||||
|
||||
Freezing Stolen Assets
|
||||
Quick action is vital in recovering stolen Bitcoin.Century Web Recovery works directly with cryptocurrency exchanges to freeze any stolen assets, preventing the scammers from cashing out your funds. This collaboration is essential for a successful recovery.
|
||||
|
||||
Legal Support and Guidance
|
||||
If necessary, Century Web Recovery can provide legal support. They will guide you on reporting the scam to law enforcement and assist in filing any legal claims. Their expertise in crypto-related cases ensures you receive the best advice on how to proceed.
|
||||
|
||||
If you’ve lost Bitcoin to an online scam, don’t hesitate. Hire Century Web Recovery to recover your lost assets and regain your financial security.";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user