Skip to content

Commit

Permalink
i18n: Apply suggested changes to French text gen
Browse files Browse the repository at this point in the history
closes #47
  • Loading branch information
bragefuglseth committed Jul 8, 2024
1 parent cf80cee commit a0ec960
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/text_generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ pub fn advanced(language: Language) -> String {
&[
Punctuation::suffix(".", true, 0.6),
Punctuation::suffix(",", false, 1.0),
Punctuation::suffix(" ;", false, 0.1),
Punctuation::suffix(" :", false, 0.2),
Punctuation::suffix(" !", true, 0.3),
Punctuation::suffix(" ?", true, 0.3),
Punctuation::wrapping("\"", "\"", false, 0.2),
Punctuation::suffix("\u{00A0};", false, 0.1),
Punctuation::suffix("\u{00A0}:", false, 0.2),
Punctuation::suffix("\u{00A0}!", true, 0.3),
Punctuation::suffix("\u{00A0}?", true, 0.3),
Punctuation::wrapping("«\u{00A0}", "\u{00A0}»", false, 0.2),
Punctuation::wrapping("(", ")", false, 0.1),
],
WESTERN_ARABIC_NUMERALS
Expand Down Expand Up @@ -257,7 +257,7 @@ fn advanced_generic(
let len = generated.len();
for i in sample(&mut rng, len, len / 20) {
if let Some(word) = generated.get_mut(i) {
*word = random_number_weighted(&numerals, &mut rng).to_string();
*word = random_number_weighted(&numerals, &mut rng);
}
}

Expand Down

0 comments on commit a0ec960

Please sign in to comment.