makcedward / nlpaug

Data augmentation for NLP
https://makcedward.github.io/
MIT License
4.44k stars 463 forks source link

Add Keyboard Errors for Turkish Q Layout #261

Closed emrecncelik closed 2 years ago

emrecncelik commented 2 years ago

Hi,

First of all, thank you for the amazing library, it's been really useful.

As a native Turkish speaker, I created some data to generate spelling errors to use myself, then decided to share it in case anyone else needs it.

Added the json file for Turkish keyboard errors based on the Turkish Q Layout from here. Language code for Turkish is "tr" and can be used with KeyboardAug as follows:

import nlpaug.augmenter.char as nac

aug = nac.KeyboardAug(lang="tr", aug_char_max=2)
aug.augment("çığırtkan", n=10)

Thank you.