Skip to content

Commit

Permalink
Fixing Datagen docs (unicode-org#3979)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Aug 31, 2023
1 parent 1c46029 commit e7b0d79
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
7 changes: 2 additions & 5 deletions provider/datagen/README.md

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

6 changes: 6 additions & 0 deletions provider/datagen/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ impl DatagenDriver {
}
}

/// This option is only relevant if using `icu::collator`.
///
/// By default, the collations `big5han`, `gb2312`, and those starting with `search`
/// are excluded. This method can be used to reennable them.
///
Expand All @@ -105,6 +107,8 @@ impl DatagenDriver {
}
}

/// This option is only relevant if using `icu::segmenter`.
///
/// Sets this driver to generate the given segmentation models, to the extent required by the
/// chosen data keys.
///
Expand Down Expand Up @@ -137,6 +141,8 @@ impl DatagenDriver {
/// Exports data from the given provider to the given exporter.
///
/// See
/// [`DatagenProvider`](crate::DatagenProvider),
/// [`make_exportable_provider!`](icu_provider::make_exportable_provider),
/// [`BlobExporter`](icu_provider_blob::export),
/// [`FileSystemExporter`](icu_provider_fs::export),
/// and [`BakedExporter`](crate::baked_exporter).
Expand Down
7 changes: 2 additions & 5 deletions provider/datagen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,10 @@
//! "fallback": "runtimeManual",
//! "locales": "all",
//! "segmenterModels": ["burmesedict"],
//! "additionalCollations": ["big5han"],
//!
//!
//! "additionalCollations": ["big5han"],<br/>
//! "cldr": "latest",
//! "icuExport": "73.1",
//! "segmenterLstm": "none",
//!
//! "segmenterLstm": "none",<br/>
//! "export": {
//! "blob": {
//! "path": "blob.postcard"
Expand Down
18 changes: 9 additions & 9 deletions provider/datagen/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ impl DatagenProvider {
.clone()
}

/// Adds CLDR data to this `SourceData`. The root should point to a local
/// `cldr-{tag}-json-full.zip` directory or ZIP file (see
/// Adds CLDR source data to the provider. The root should point to a local
/// `cldr-{tag}-json-full` directory or ZIP file (see
/// [GitHub releases](https://github.com/unicode-org/cldr-json/releases)).
pub fn with_cldr(self, root: PathBuf) -> Result<Self, DataError> {
Ok(Self {
Expand All @@ -114,8 +114,8 @@ impl DatagenProvider {
})
}

/// Adds ICU export data to this `SourceData`. The path should point to a local
/// `icuexportdata_{tag}.zip` directory or ZIP file (see [GitHub releases](
/// Adds ICU export source data to the provider. The path should point to a local
/// `icuexportdata_{tag}` directory or ZIP file (see [GitHub releases](
/// https://github.com/unicode-org/icu/releases)).
pub fn with_icuexport(self, root: PathBuf) -> Result<Self, DataError> {
Ok(Self {
Expand All @@ -126,8 +126,8 @@ impl DatagenProvider {
})
}

/// Adds segmenter LSTM data to this `SourceData`. The path should point to a local
/// `models.zip` directory or ZIP file (see [GitHub releases](
/// Adds segmenter LSTM source data to the provider. The path should point to a local
/// `models` directory or ZIP file (see [GitHub releases](
/// https://github.com/unicode-org/lstm_word_segmentation/releases)).
pub fn with_segmenter_lstm(self, root: PathBuf) -> Result<Self, DataError> {
Ok(Self {
Expand All @@ -138,7 +138,7 @@ impl DatagenProvider {
})
}

/// Adds CLDR data to this `SourceData`. The data will be downloaded from GitHub
/// Adds CLDR source data to the provider. The data will be downloaded from GitHub
/// using the given tag (see [GitHub releases](https://github.com/unicode-org/cldr-json/releases)).
///
/// Also see: [`LATEST_TESTED_CLDR_TAG`](Self::LATEST_TESTED_CLDR_TAG)
Expand All @@ -156,7 +156,7 @@ impl DatagenProvider {
}
}

/// Adds ICU export data to this `SourceData`. The data will be downloaded from GitHub
/// Adds ICU export source data to the provider. The data will be downloaded from GitHub
/// using the given tag. (see [GitHub releases](https://github.com/unicode-org/icu/releases)).
///
/// Also see: [`LATEST_TESTED_ICUEXPORT_TAG`](Self::LATEST_TESTED_ICUEXPORT_TAG)
Expand All @@ -178,7 +178,7 @@ impl DatagenProvider {
}
}

/// Adds segmenter LSTM data to this `SourceData`. The data will be downloaded from GitHub
/// Adds segmenter LSTM source data to the provider. The data will be downloaded from GitHub
/// using the given tag. (see [GitHub releases](https://github.com/unicode-org/lstm_word_segmentation/releases)).
///
/// Also see: [`LATEST_TESTED_SEGMENTER_LSTM_TAG`](Self::LATEST_TESTED_SEGMENTER_LSTM_TAG)
Expand Down

0 comments on commit e7b0d79

Please sign in to comment.