This commit is contained in:
parent
750d18bdab
commit
5640eb1c78
@ -1,8 +1,6 @@
|
|||||||
use crate::{FORBIDDEN_WORDS, stats::Stats};
|
use crate::{FORBIDDEN_WORDS, stats::Stats};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
/// typically 5000ms
|
|
||||||
/// with trie this is 1600ms
|
|
||||||
pub fn parse(stats: &mut Stats, text: &str) {
|
pub fn parse(stats: &mut Stats, text: &str) {
|
||||||
for sentence in text
|
for sentence in text
|
||||||
.split('.')
|
.split('.')
|
||||||
|
|||||||
@ -2,9 +2,6 @@ use crate::{FORBIDDEN_WORDS, stats::Stats};
|
|||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
/// probably buggy. for example, are new lines sentences? what if the text has no last period?
|
/// probably buggy. for example, are new lines sentences? what if the text has no last period?
|
||||||
/// 500ms is without forbidden words check, but...
|
|
||||||
/// 6000ms if adding forbidden words.. so not faster
|
|
||||||
/// with trie this is 2600ms
|
|
||||||
pub fn parse(stats: &mut Stats, text: &str) {
|
pub fn parse(stats: &mut Stats, text: &str) {
|
||||||
let mut capitalized = true;
|
let mut capitalized = true;
|
||||||
let mut whitespaced = false;
|
let mut whitespaced = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user