• Xian Li's avatar
    Extend WordShuffle noising function to apply to non-bpe tokens · 90c01b3a
    Xian Li authored
    Summary:
    We'd like to resue the noising functions and DenoisingDataset in
    adversarial training. However, current noising functions assume the input are
    subword tokens. The goal of this diff is to extend it so the noising can be
    applied to word tokens. Since we're mostly interested in the word shuffle
    noising, so I only modified the WordShuffle class.
    
    Reviewed By: liezl200
    
    Differential Revision: D10523177
    
    fbshipit-source-id: 1e5d27362850675010e73cd38850c890d42652ab
    90c01b3a
test_noising.py 14.1 KB