Replication Functions
Available functions:
replace_word_with_synonym
(word)
: Replace the given word with a synonym.augment_text_with_synonyms
(text, augmentation_factor, probability, progress=True)
: Augment the input text by replacing words with synonyms.load_text_file
(filepath)
: Load the contents of a text file.augment_file_with_synonyms
(file_path, augmentation_factor, probability, progress=True)
: Augment a text file by replacing words with synonyms.insert_random_word
(text, word)
: Insert a random word into the input text.delete_random_word
(text)
: Delete a random word from the input text.insert_synonym
(text, word)
: Insert a synonym of the given word into the input text.paraphrase
(text)
: Paraphrase the input text.flip_horizontal
(image)
: Flip the input image horizontally.flip_vertical
(image)
: Flip the input image vertically.rotate
(image, angle)
: Rotate the input image by a specified angle.random_rotation
(image, max_angle)
: Randomly rotate the input image by an angle within the specified range.resize
(image, size)
: Resize the input image to the specified size.crop
(image, box)
: Crop the input image to the specified rectangular region.random_crop
(image, size)
: Randomly crop a region from the input image.shuffle_words
(text)
: Randomly shuffle the order of words in each sentence.
Replace word with synonym
Replace the given word with a synonym.
Augment text with synonyms
Augment the input text by replacing words with synonyms.
Load text file
Load the contents of a text file.
Augment file with synonyms
Augment a text file by replacing words with synonyms.
Insert random word
Insert a random word into the input text.
Delete random word
Delete a random word from the input text.
Insert synonym
Insert a synonym of the given word into the input text.
Paraphrase
Paraphrase the input text.
Flip horizontal
Flip the input image horizontally.
Flip vertical
Flip the input image vertically.
Rotate
Rotate the input image by a specified angle.
Random rotation
Randomly rotate the input image by an angle within the specified range.
Resize
Resize the input image to the specified size.
Crop
Crop the input image to the specified rectangular region.
Random crop
Randomly crop a region from the input image.
Shuffle words
This function takes a list of sentences and randomly shuffles the order of words in each sentence, creating variations for text augmentation or diversity.
Last updated