Ktrain

Latest version: v0.41.3

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

Scan your dependencies

Page 22 of 29

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

0.10.0

New:
- `Transformer` API in *ktrain* now supports using community-uploaded transformer models
- added `shallownlp` module with out-of-the-box NER for English, Russian, and Chinese
- `text.eda` module now supports NMF in addition to LDA

Changed:
- `texts_from_csv` and `texts_from_df` now accept a single column of labels in string format and will
1-hot-encode labels automatically for classification or multi-class classification problems.
- reorganized language-handling to `text.textutils`
- more suppression of warnings due to spurious warnings from TF2 causing confusion in output
- `classes` argument to `Transformer` constructor has been changed to `class_names` for consistency with `texts_from_array`

Fixed:
- N/A

Page 22 of 29

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.