Skip to content

apps cli guide

Ozan KANIK edited this page Apr 12, 2026 · 2 revisions

Apps CLI Guide (.NET Port)

This page documents the command-line applications in ZemberekDotNet.Apps.

Run without arguments to list available apps:

dotnet run --project ZemberekDotNet.Apps/ZemberekDotNet.Apps.csproj

Available Commands

  • TrainClassifier: Train a fastText-based text classifier from labeled __label__... lines.
  • EvaluateClassifier: Evaluate a classifier model on a labeled test set.
  • ClassificationConsole: Interactive prediction console for a trained classification model.
  • PreprocessTurkishCorpus: Sentence split and tokenize corpus files (with optional lemma preprocessing).
  • MorphologyConsole: Interactive Turkish morphology analysis and disambiguation.
  • TrainNerModel: Train Turkish perceptron NER model and export text + compressed variants.
  • EvaluateNer: Evaluate NER output from either a model run or a hypothesis file.
  • FindNamedEntities: Run NER on plain text input.

Examples

Train a Classifier

dotnet run --project ZemberekDotNet.Apps/ZemberekDotNet.Apps.csproj -- TrainClassifier \
  --input data/news.train \
  --output model/news.bin \
  --learningRate 0.1 \
  --epochCount 50

Evaluate a Classifier

dotnet run --project ZemberekDotNet.Apps/ZemberekDotNet.Apps.csproj -- EvaluateClassifier \
  --input data/news.test \
  --model model/news.bin

Preprocess a Corpus

dotnet run --project ZemberekDotNet.Apps/ZemberekDotNet.Apps.csproj -- PreprocessTurkishCorpus \
  --input data/raw.txt \
  --output data/tokenized.txt \
  --operation TOKENIZED

Allowed preprocess operations:

  • TOKENIZED
  • LEMMA

Train and Evaluate NER

dotnet run --project ZemberekDotNet.Apps/ZemberekDotNet.Apps.csproj -- TrainNerModel \
  --train data/ner-train.txt \
  --dev data/ner-dev.txt \
  --outputRoot out/ner
dotnet run --project ZemberekDotNet.Apps/ZemberekDotNet.Apps.csproj -- EvaluateNer \
  --reference data/ner-dev.txt \
  --modelRoot out/ner/model-compressed

Interactive Morphology Console

dotnet run --project ZemberekDotNet.Apps/ZemberekDotNet.Apps.csproj -- MorphologyConsole

Notes

  • Commands are discovered by class name. You can provide full class names or unique prefixes.
  • Resource paths are resolved automatically in app startup, so commands can run from common working directories.
  • For classification data format and workflow details, see Classification Training Guide.

Clone this wiki locally