opennmt.data.WordPermutation

class opennmt.data.WordPermutation(max_distance)[source]

Randomly permutes words in a sequence with a maximum distance.

Inherits from: opennmt.data.Noise

__init__(max_distance)[source]

Initializes the noise module.

Parameters

max_distance – The maximum permutation distance.