Quick Start#

LangTest Quick Start#

The following can be used as a quick reference on how to get up and running with langtest:

# Install langtest from PyPI
pip install langtest==2.3.1
from langtest import Harness

# Create a Harness object
h = Harness('ner', model='dslim/bert-base-NER', hub='transformers')

# Generate, run and get a report on your test cases
h.generate().run().report()

Alternative Installation Options#

We can create a Python Virtualenv:

virtualenv langtest --python=python3.8
source langtest/bin/activate
pip install langtest==2.3.1 jupyter

Now you should be ready to create a jupyter notebook with LangTest running:

jupyter notebook

Now you should be ready to create a jupyter notebook with LangTest running:

jupyter notebook