Ktrain

Latest version: v0.41.4

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 22 of 29

0.12.0

New:
- BERT and Elmo embeddings for NER and other downstream tasks

Changed
- `wv_path_or_url` parameter moved from `entities_from*` to `sequence_taggers`
- Added `use_char` parameter and ensure it is not used unless `DISABLE_V2_BEHAVIOR` is enabled:
- `batch_size` argument added to `get_predictor` and `load_predictor`
- `eval_batch_size` argument added to `get_learner`
- added `val_pct` argument to `entities_from_array`


Fixed:
- properly set threshold in `text.eda` (PR 99)
- fixed error when no validation data is supplied to `entities_from_array`

0.11.3

New:
- N/A

Changed:
- N/A

Fixed:
- prevent errors with reading word vector files on Windows by specifying `encoding='utf-8'`

0.11.2

New:
- N/A

Changed:
- N/A

Fixed:
- `ktrain.text.eda.visualize_documents` now properly processes filepath argument

0.11.1

New:
- `entities_from_txt`, `entities_from_gmb`, and `entities_from_conll2003` functions now discover
the encoding of the file automatically when `encoding=None` (which is the default now)

Changed:
- N/A

Fixed:
- N/A

0.11.0

New:
- sequence-taging (e.g., NER) now supports ELMo embeddings with `use_elmo=True` argument to data-loading
functions like `entities_from_array` and `entities_from_txt`A
- pretrained word embeddings (i.e., fasttext word2vec embeddings) can be specified by providing the URL to
a `.vec.gz` file from [here](https://fasttext.cc/docs/en/crawl-vectors.html). The URL (or path) is
supplied as `wv_path_or_url` argument to data-loading functions like `entities_from_array` and `entities_from_txt`
- `show_random_images`: show random images from folder in Jupyter notebook
- `NERPreprocessor` now includes a `preprocess_test` method for easier evaluation of test sets in datasets
that contain a training, validation, and test set

Changed:
- ensure `DISABLE_V2_BEHAVIOR=True` when `ImagePredictor.explain` is invoked
- added `SUPPRESS_TF_WARNINGS` environment variable. Default is '1'. If set to '0', TF warnings will be displayed.
- `merge_entities` method of `ktrain.text.shallownlp.ner.NER` changed to `merge_tokens`
- moved `load_predictor` to constructor in `krain.text.shallownlp.ner.NER`
- `ktrain.text.shallownlp.ner.NER` now supports `predictor_path` argument

Fixed:
- convert `class_names` to strings in `core.validate` to prevent error from scikit-learn
- fixed error arising when no data augmentation scheme is provided to the `images_from*` functions
- fixed bug in `images_from_fname` to ensure supplied `pattern` is used
- added `val_folder` argument to `images_from_fname`
- raise Exception when `preproc` is not found in `load_predictor`
- check for existence of `preproc` in `text_classifier` and `text_regression_model`
- fixed `text.eda` so that `detect_lang` is called correctly after being moved to `textutils`

0.10.1

New:
- N/A

Changed:
- `shallownlp.Classifier.texts_from_folder` changed to `shallownlp.Classifier.load_texts_from_folder`
- `shallownlp.Classifier.texts_from_csv` changed to `shallownlp.Classifier.load_texts_from_csv`
- In `text.preprocessor`, added warning that `class_names` is being ignored when `class_names` were supplied
and `y_train` and `y_test` contain string labels

Fixed:
- N/A

Page 22 of 29

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.