Model updates, bugfixes, and a new muxing cli tool

This commit is contained in:
2026-05-29 22:26:22 -06:00
parent cf4327389a
commit b6ad592951
32 changed files with 2246 additions and 453 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "flix-model"
version = "0.0.18"
version = "0.0.19"
license-file.workspace = true
description = "Core types for flix data"
+18 -15
View File
@@ -12,22 +12,25 @@ fn split_normalized_words(input: &str) -> impl Iterator<Item = String> {
panic!("Input is not ASCII: {input}");
}
input.split_ascii_whitespace().map(|s| {
let chars = s
.chars()
.filter(|c| c.is_ascii_alphanumeric() || *c == '-')
.map(|c| c.to_ascii_lowercase());
input
.split_ascii_whitespace()
.map(|s| {
let chars = s
.chars()
.filter(|c| c.is_ascii_alphanumeric() || *c == '-')
.map(|c| c.to_ascii_lowercase());
if s.len() > 4
&& s.len().is_multiple_of(2)
&& chars.clone().tuples().all(|(l, r)| l != '.' && r == '.')
{
// Collapse acronym
chars.tuples().map(|(l, _)| l).collect()
} else {
chars.collect()
}
})
if s.len() > 4
&& s.len().is_multiple_of(2)
&& chars.clone().tuples().all(|(l, r)| l != '.' && r == '.')
{
// Collapse acronym
chars.tuples().map(|(l, _)| l).collect()
} else {
chars.collect()
}
})
.filter(|part: &String| !part.is_empty())
}
fn split_leading_article<I: Iterator<Item = String>>(iter: I) -> (Option<String>, Peekable<I>) {