Breaking changes
- Updated the minimum required Python version to 3.8.
- Renamed `insert_punctutaions` function to `insert_punctuation`.
Composition
- Switch from albumentations to textmentations for composition.
Old way:
python
import albumentations as A
A.Compose([...])
A.OneOf([...])
...
New way:
python
import textmentations as T
T.Compose([...])
T.OneOf([...])
...
Deprecations
AEDA
Old way:
python
AEDA(
insertion_prob_limit=(0.1, 0.3),
punctuations=(",", "."),
)
New way:
python
AEDA(
insertion_prob_range=(0.1, 0.3),
punctuation=(",", "."),
)
RandomDeletion
Old way:
python
RandomDeletion(min_words_each_sentence=1)
New way:
python
RandomDeletion(min_words_per_sentence=1)
Minor changes
- Speedup in `RandomInsertion` when processing long text.
- If punctuation parameter in AEDA is an empty tuple, now raise TypeError.
- The `insert_synonym` function no longer inserts a synonym at the first index.
- Fixed `delete_*` functions remove each word with equal probability, regardless of word order.