Skip to content

Failed on case "frequency one three five point six two five" #15

@hongbo-miao

Description

@hongbo-miao

I am using text-processing-rs version 0.1.0

  1. Incorrect case when use normalize:

    use text_processing_rs::normalize;
    
    fn main() {
        let normalized_text = normalize("frequency one three five point six two five");
        println!("{normalized_text}"); // 135-625
    }

    This prints 135-625. I expect it would be 135.625.

  2. Incorrect case when use normalize_sentence:

    use text_processing_rs::normalize_sentence;
    
    fn main() {
        let normalized_text = normalize_sentence("frequency one three five point six two five");
        println!("{normalized_text}"); // frequency 9.625
    }

    This prints frequency 9.625. I expect it would be frequency 135.625.
    Seems it tries to add 1 + 3 + 5 = 9

It would be great to support this case, as this way of speaking is common in aviation. Thanks! ☺️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions