diff --git a/rustfst-python/mkdocs.yml b/rustfst-python/mkdocs.yml index 5138f009e..6e53cea11 100644 --- a/rustfst-python/mkdocs.yml +++ b/rustfst-python/mkdocs.yml @@ -36,6 +36,8 @@ nav: - rustfst/algorithms/rm_epsilon/index.md - reverse: - rustfst/algorithms/reverse/index.md + - inversion: + - rustfst/algorithms/inversion/index.md - project: - rustfst/algorithms/project/index.md - randgen: @@ -83,7 +85,7 @@ plugins: show_signature_annotations: true show_submodules: true watch: - - rustfst-python/rustfst + - rustfst - docs repo_name: rustfst repo_url: https://github.com/Garvys/rustfst diff --git a/rustfst-python/rustfst/algorithms/tr_sort.py b/rustfst-python/rustfst/algorithms/tr_sort.py index 5958e4e0e..ac595f1f6 100644 --- a/rustfst-python/rustfst/algorithms/tr_sort.py +++ b/rustfst-python/rustfst/algorithms/tr_sort.py @@ -9,11 +9,15 @@ def tr_sort(fst: VectorFst, ilabel_cmp: bool): - """ - tr_sort(fst) - sort fst trs according to their ilabel or olabel - :param fst: Fst - :param ilabel_cmp: bool + """Sort fst trs in place according to their input or output label. + + This is often necessary for composition to work properly. It + corresponds to `ArcSort` in OpenFST. + + Args: + fst: FST to be tr-sorted + ilabel_cmp: Sort on input labels if `True`, output labels + if `False`. """ ret_code = lib.fst_tr_sort(fst.ptr, ctypes.c_bool(ilabel_cmp))