Skip to content

Commit eeef9d1

Browse files
committed
feat(README.md): add documentation for --split-chunks option to improve usability
1 parent 48ab849 commit eeef9d1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ option is not provided, the translated content will be printed to stdout.
7777
dragoman source.json --out target.json
7878
```
7979

80+
**`--split-chunks`**
81+
82+
Split the source document into chunks before translating. This can help to fit
83+
the documents into the context size of OpenAI's models. Each line that starts
84+
with one of the provided prefixes will create a new chunk.
85+
86+
**Example: Split a Markdown file into chunks when encountering H2 and H3 headings:**
87+
```bash
88+
dragoman source.json --split-chunks "## " --split-chunks "### "
89+
```
90+
8091
**`-u` or `--update`**
8192

8293
Enable this option to only translate missing fields from the source file that

0 commit comments

Comments
 (0)