File size: 523 Bytes
64a6414 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import nlpaug.augmenter.word as naw
import nlpaug.augmenter.sentence as nas
import nltk
sent = "I am really happy with the new job and I mean that with sincere feeling"
def main():
nltk.download("omw-1.4")
# this seems legit! I could definitely use this to increase the accuracy of the model
# for a few idioms (possibly ten, ten very different but frequent idioms)
aug = naw.ContextualWordEmbsAug()
augmented = aug.augment(sent, n=10)
print(augmented)
if __name__ == '__main__':
main()
|