diff options
| author | Matthieu Pignolet <matthieu@puffer.fish> | 2025-05-19 08:16:13 +0400 |
|---|---|---|
| committer | Matthieu Pignolet <matthieu@puffer.fish> | 2025-05-19 08:16:13 +0400 |
| commit | 55e703d94760468632aa90b430b93e05e741eced (patch) | |
| tree | f682304488a3a88b3518a57b6b88ae947745b38c | |
| parent | 819c5f6ae79b5257d61c72f76ec274273a777e32 (diff) | |
feat: fix formatting for the crate doc
| -rw-r--r-- | src/lib.rs | 82 |
1 files changed, 41 insertions, 41 deletions
@@ -1,44 +1,44 @@ -/// ALINE -/// https://webdocs.cs.ualberta.ca/~kondrak/ -/// Copyright 2002 by Grzegorz Kondrak. -/// -/// ALINE is an algorithm for aligning phonetic sequences, described in [1]. -/// This module is a port of Kondrak's (2002) ALINE. It provides functions for -/// phonetic sequence alignment and similarity analysis. These are useful in -/// historical linguistics, sociolinguistics and synchronic phonology. -/// -/// ALINE has parameters that can be tuned for desired output. These parameters are: -/// - C_skip, C_sub, C_exp, C_vwl -/// - Salience weights -/// - Segmental features -/// -/// In this implementation, some parameters have been changed from their default -/// values as described in [1], in order to replicate published results. All changes -/// are noted in comments. -/// -/// # Get optimal alignment of two phonetic sequences -/// -/// ``` -/// use aline::align; -/// -/// let alignment = align("θin", "tenwis", 0.0); -/// -/// assert_eq!( -/// alignment, -/// vec![ -/// vec![ -/// ("θ", "t"), -/// ("i", "e"), -/// ("n", "n") -/// ].iter() -/// .map(|(a, b)| (a.to_string(), b.to_string())) -/// .collect::<Vec<(String, String)>>() -/// ] -/// ); -/// ``` -/// -/// [1] G. Kondrak. Algorithms for Language Reconstruction. PhD dissertation, -/// University of Toronto. +//! ALINE +//! https://webdocs.cs.ualberta.ca/~kondrak/ +//! Copyright 2002 by Grzegorz Kondrak. +//! +//! ALINE is an algorithm for aligning phonetic sequences, described in [1]. +//! This module is a port of Kondrak's (2002) ALINE. It provides functions for +//! phonetic sequence alignment and similarity analysis. These are useful in +//! historical linguistics, sociolinguistics and synchronic phonology. +//! +//! ALINE has parameters that can be tuned for desired output. These parameters are: +//! - C_skip, C_sub, C_exp, C_vwl +//! - Salience weights +//! - Segmental features +//! +//! In this implementation, some parameters have been changed from their default +//! values as described in [1], in order to replicate published results. All changes +//! are noted in comments. +//! +//! # Get optimal alignment of two phonetic sequences +//! +//! ``` +//! use aline::align; +//! +//! let alignment = align("θin", "tenwis", 0.0); +//! +//! assert_eq!( +//! alignment, +//! vec![ +//! vec![ +//! ("θ", "t"), +//! ("i", "e"), +//! ("n", "n") +//! ].iter() +//! .map(|(a, b)| (a.to_string(), b.to_string())) +//! .collect::<Vec<(String, String)>>() +//! ] +//! ); +//! ``` +//! +//! [1] G. Kondrak. Algorithms for Language Reconstruction. PhD dissertation, +//! University of Toronto. use std::{collections::HashSet, f64}; |
