clj-duckling.core
The main unit, contains global tests and examples of library use
check-lang
(check-lang lang)
(check-lang level res lang)
default-context
(default-context opt)
Build a default context for testing. opt can be either :corpus or :now
make-config
(make-config lang level)
Build an integrant config map.
Args:
lang (string): language (iso code)
level (key): log level
Returns:
(map): the integrant config map
play
(play tool text dims context)
Show processing details for one sentence. Defines a 'details' function.
print-stash
(print-stash stash classifiers winners)
print-tokens
(print-tokens tokens classifiers)
(print-tokens tokens classifiers depth)
(print-tokens tokens classifiers depth prefix)
Recursively prints a tree representing a route
run
(run level)
Run the NLP modules for all languages in resources/languages.
Args:
level (key): log level
Returns:
(map): a map with languages as keys and the list of errors as values
run-lang
(run-lang lang level)
Run the NLP modules for a specific language.
Args:
lang (string): language (iso code)
level (key): log level
Returns:
(list): a list of vectors [0|1 text error-msg]