Command-line scripts to analyze Greek syntax

Running an analysis from the command line

You can run an analysis from the command line with the wrapper script syntaxer_main.py. It needs an .env file in this folder with your LM credentials, like this:

API_BASE=https://localmodel/api
MODEL=litellm/modelname
API_KEY=your-key-here

Then:

python3 syntaxer_main.py --passage "τὴν θύραν ἀνέῳξεν."

--citation is an optional second argument giving a citation label for the passage (e.g. a CTS URN), recorded on every resulting token via Token.citation; it defaults to no citation if omitted:

python3 syntaxer_main.py --passage "τὴν θύραν ἀνέῳξεν." --citation "urn:cts:greekLit:tlg0059.tlg030.perseus-grc2:1"

syntaxer_main.py reads API_BASE / MODEL / API_KEY from .env, configures the LM, and prints the analysis.

For a local, unauthenticated model (e.g. Ollama), leave API_KEY present but empty:

API_BASE=http://localhost:11434
MODEL=ollama_chat/llama3
API_KEY=

syntaxer_main.py only raises “Missing API key” when API_KEY isn’t in .env at all; an empty value is treated as “this model doesn’t need one” and is left out of the LM call entirely, rather than sent through as an empty credential.