Skip to content

Commit

Permalink
Expand documentation for walker. (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikiSuen authored May 28, 2023
1 parent b47f17b commit 5c572ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Megrez/2_Walker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public extension Megrez.Compositor {
/// 的路徑(所以要找最大的權重),因為在對數概率下,較大的數值意味著較大的概率。
/// 對於 `G = (V, E)`,該算法的運行次數為 `O(|V|+|E|)`,其中 `G` 是一個有向無環圖。
/// 這意味著,即使軌格很大,也可以用很少的算力就可以爬軌。
///
/// - Remark: 利用該數學方法進行輸入法智能組句的(已知可考的)最開始的案例是
/// 郭家寶(ByVoid)的《[基於統計語言模型的拼音輸入法](https://byvoid.com/zht/blog/slm_based_pinyin_ime/) 》;
/// 再後來則是 2022 年中時期劉燈的 Gramambular 2 組字引擎。
/// - Returns: 爬軌結果+該過程是否順利執行。
@discardableResult mutating func walk() -> [Megrez.Node] {
defer { Self.reinitVertexNetwork() }
Expand Down

0 comments on commit 5c572ea

Please sign in to comment.