Thanks to visit codestin.com
Credit goes to github.com

Skip to content

normalize_sentence failed on "United seven eighty eight" #14

@hongbo-miao

Description

@hongbo-miao

I am using text-processing-rs version 0.1.0

Case 1 (Correct): Using normalize:

use text_processing_rs::normalize;

fn main() {
    let normalized_text = normalize("United seven eighty eight");
    println!("{normalized_text}"); // 788
}

Case 2 (Incorrect): Using normalize_sentence:

use text_processing_rs::normalize_sentence;

fn main() {
    let normalized_text = normalize_sentence("United seven eighty eight");
    println!("{normalized_text}"); // United 95
}

This gives me United 95, however, I expect it to be United 788
Seems it tries to add 7 + 88 = 95

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