Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using dictionaries from exportdata #3396

Merged
merged 3 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 1 addition & 10 deletions provider/datagen/data/segmenter/dictionary/burmesedict.toml

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions provider/datagen/data/segmenter/dictionary/cjdict.toml

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions provider/datagen/data/segmenter/dictionary/khmerdict.toml

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions provider/datagen/data/segmenter/dictionary/laodict.toml

Large diffs are not rendered by default.

11 changes: 1 addition & 10 deletions provider/datagen/data/segmenter/dictionary/thaidict.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion provider/datagen/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl SourceData {
pub const LATEST_TESTED_CLDR_TAG: &'static str = "43.0.0";

/// The latest ICU export tag that has been verified to work with this version of `icu_datagen`.
pub const LATEST_TESTED_ICUEXPORT_TAG: &'static str = "release-73-1";
pub const LATEST_TESTED_ICUEXPORT_TAG: &'static str = "icu4x/2023-05-02/73.x";

/// The latest `SourceData` that has been verified to work with this version of `icu_datagen`.
///
Expand Down
11 changes: 8 additions & 3 deletions provider/datagen/src/transform/segmenter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,14 @@ impl crate::DatagenProvider {

sffc marked this conversation as resolved.
Show resolved Hide resolved
let toml_data: &SegmenterDictionaryData = self
.source
.builtin()
.read_and_parse_toml(filename)
.expect("built-in file present and readable");
.icuexport()
.and_then(|e| e.read_and_parse_toml(filename))
.or_else(|e| {
self.source
.builtin()
.read_and_parse_toml(filename)
.map_err(|_| e)
})?;

Ok(UCharDictionaryBreakDataV1 {
trie_data: ZeroVec::alloc_from_slice(&toml_data.trie_data),
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions provider/repodata/data/json/fingerprints.csv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading