tk_nn_classifier package

Submodules

tk_nn_classifier.config module

The module to load the config file

tk_nn_classifier.config.get_default_config()

get the default config

tk_nn_classifier.config.load_config(config_file: str)

load the config file

params:
  • config_file: the full path of the config (type: string)
output:
  • dictionary object contains config key and config value pairs
tk_nn_classifier.config.load_config_from_dikt(config_dikt)

load the config from dikt

params:
  • config_dikt: config options saved in dictionary
output:
  • dictionary object contains config key and config value pairs
tk_nn_classifier.config.spacy_lang_model_consistency(config)

check the consistency of the language and pretrained model:

params:
  • config: dict
output:
  • updated input config or die on error

tk_nn_classifier.model module

Model class:
hub to integrate methods from both spaCy and Tensorflow frame
class tk_nn_classifier.model.Model(config)

Bases: object

build_and_train()
build_graph()
evaluate(test_data_path)
load(model_path=None)
predict_on_text(text)
process_with_saved_model(input)
save(output_path)
train(train_data=None, eval_data=None)

Module contents

Top-level package for tk_nn_classifier

tk_nn_classifier.define_logger(mod_name)

Set the default logging configuration

tk_nn_classifier.set_logging_level(level=30)

Change logging level