-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to openfst 1.8.3. Add README.md information
- Loading branch information
1 parent
95c2846
commit 7a1715c
Showing
5 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,50 @@ | ||
# OpenFST | ||
|
||
Implements finite state transducers via the C++ library [OpenFST](https://www.openfst.org). Its syntax follows closely that of the C++ library. | ||
|
||
```julia | ||
julia> using Pkg; Pkg.add("OpenFST"); Pkg.build("OpenFST") | ||
|
||
julia> # the sheep language: ba, baa, baaa, ... | ||
|
||
julia> # start state is 0, accept states are [3], alphabet is {a,b} | ||
|
||
julia> sheep = StdVectorFst(0, [(0, 1, :b), (1, 2, :a), (2, 3, :a), (3, 3, :a)], [3], Dict(:a => 1, :b => 2)) | ||
StdVectorFst(4 state(s)…) | ||
|
||
julia> OpenFST.growth(sheep) # number of words | ||
OpenFST.growth(sheep) | ||
10-element Vector{BigInt}: | ||
0 | ||
0 | ||
0 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
|
||
julia> sheepsheep = concat(sheep,sheep) # concatenation: baba, baaba, babaa, ... | ||
StdVectorFst(8 state(s)…) | ||
|
||
julia> OpenFST.growth(sheepsheep) | ||
10-element Vector{BigInt}: | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
1 | ||
2 | ||
3 | ||
4 | ||
|
||
julia> sheep∪sheepsheep |> determinize |> minimize | ||
StdVectorFst(9 state(s)…) | ||
|
||
julia> (initial, transitions, accepting) = unpack(ans) | ||
(0, [(0, 1, :ϵ), (1, 2, :b), (2, 3, :a), (3, 4, :a), (4, 5, :ϵ), (4, 4, :a), (5, 6, :b), (6, 7, :a), (7, 8, :a), (8, 8, :a)], [4, 8]) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
7a1715c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
7a1715c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request updated: JuliaRegistries/General/110928
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
Also, note the warning: This looks like a new registration that registers version 0.1.1.
Ideally, you should register an initial release with 0.0.1, 0.1.0 or 1.0.0 version numbers
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.