Hoang Viet Ng
Hoang Viet Ng

Reputation: 9

Lack of libraries in textattack.augmentation

I am trying to augment my text data using textattack.augmentation (running on Kaggle).

The error is ImportError: cannot import name 'IdentityCache' from 'botocore.utils' (/opt/conda/lib/python3.10/site-packages/botocore/utils.py)

I have found a solution for this on another stack overflow question. But it doesn't work, and I can see 4 downvoted.

So I expect some solutions can deal with this problem. Furthermore, are there any augmentation methods with high speed and performance?Thank!

Upvotes: 0

Views: 207

Answers (1)

Sasanka Weerakoon
Sasanka Weerakoon

Reputation: 424

Check your both botocore and boto3 are updated to the latest versions.

Some release of boto3 can have some issues , try to use specefic version

!pip install botocore==x.xx.x boto3==x.xx.x

check this for more details boto3

Part 2

you can use WordNetAugmenter() for synonym replacement

For Random,

you can use RandomInsertionAugmenter() for random insetion RandomSwapAugmenter() use for random swap RandomDeletionAugmenter() can be use for random deletion

For Back translation -> BackTranslationAugmenter()

In the textattack there are more you can go through the documentions

Upvotes: 0

Related Questions