diff options
| author | pks <pks@users.noreply.github.com> | 2026-02-27 12:09:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-27 12:09:49 +0100 |
| commit | e7189f97ec29bd576fe79a260fa0e8cd25dcc968 (patch) | |
| tree | 227bc72ff0f7f72b8c6b3e6f735d922dd13da147 /rs/README.md | |
| parent | c13b5650ac4bee7e674d263fcb778599bb449bff (diff) | |
| parent | 1377ffbdd2791e50cb3ca21d11c8c21febdbf911 (diff) | |
Claude
Diffstat (limited to 'rs/README.md')
| -rw-r--r-- | rs/README.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/rs/README.md b/rs/README.md new file mode 100644 index 0000000..5daa458 --- /dev/null +++ b/rs/README.md @@ -0,0 +1,39 @@ +# odenwald + +Rust implementation of the Odenwald SCFG (synchronous context-free grammar) machine translation decoder. + +## Build + +``` +cargo build --release +``` + +## Usage + +``` +odenwald -g <grammar> -w <weights> [-i <input>] [-l] [-p] +``` + +- `-g, --grammar` — grammar file (required) +- `-w, --weights` — weights file (required) +- `-i, --input` — input file (default: stdin) +- `-l, --add-glue` — add glue rules +- `-p, --add-pass-through` — add pass-through rules + +Output: `translation ||| log_score` per input line. + +## Examples + +``` +cargo run -- -g ../example/toy/grammar -w ../example/toy/weights.toy -i ../example/toy/in -l +# → i saw a small shell ||| -0.5 + +cargo run -- -g ../example/toy-reorder/grammar -w ../example/toy-reorder/weights.toy -i ../example/toy-reorder/in -l +# → he reads the book ||| -1.5 +``` + +## Tests + +``` +cargo test +``` |
