Skip to content

Commit

Permalink
fix: showing numbers as words
Browse files Browse the repository at this point in the history
  • Loading branch information
BrewingWeasel committed Jul 26, 2024
1 parent b22dd3a commit 79c7521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-tauri/src/language_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ fn stanza_parser(

while let Some(token) = details.next() {
let lemma = handle_lemma(&token.lemma, interpreter, state)?;
let rating = if ["PUNCT", "SYM", "PROPN"].contains(&token.upos.as_str()) {
let rating = if ["PUNCT", "SYM", "PROPN", "NUM"].contains(&token.upos.as_str()) {
-1
} else {
state
Expand Down Expand Up @@ -473,7 +473,7 @@ fn stanza_parser(
lemma: lemma.clone(),
rating,
morph,
clickable: token.upos != "PUNCT",
clickable: !["PUNCT", "SYM", "NUM"].contains(&token.upos.as_str()),
other_forms: get_alternate_forms(&lemma, interpreter, state)?,
length: token.end_char - token.start_char,
whitespace_after,
Expand Down

0 comments on commit 79c7521

Please sign in to comment.