Repository: makcedward/nlpaug

Issue:
Bugfix for issue #203539
I think there is a bug in the char augmenter:

https://github.com/makcedward/nlpaug/blob/5238e0be734841b69651d2043df535d78a8cc594/nlpaug/augmenter/char/char_augmenter.py#L98

the behavior is not consistent with that of the word augmenter:

https://github.com/makcedward/nlpaug/blob/5238e0be734841b69651d2043df535d78a8cc594/nlpaug/augmenter/word/word_augmenter.py#L80

this is related to issue #203539

After changing `return None` to `return []`, the code below will not raise an exception.

```
import nlpaug.augmenter.char as nac
aug = nac.KeyboardAug(aug_word_min=0.0, aug_word_p=0.05)
aug.augment("| 4 ||  || ½ || 0 || ½ || - || 1 || 1 || 1 || 0 || 0 || 0 || 1 || 1 || 1 || 1 || 1 || 1 || 10 || 67.75")
```

Discussion:

Patch:
diff --git a/nlpaug/augmenter/char/char_augmenter.py b/nlpaug/augmenter/char/char_augmenter.py
index be44785..c431ac5 100755
--- a/nlpaug/augmenter/char/char_augmenter.py
+++ b/nlpaug/augmenter/char/char_augmenter.py
@@ -95,7 +95,7 @@ class CharAugmenter(Augmenter):
                 exception = WarningException(name=WarningName.OUT_OF_VOCABULARY,
                                              code=WarningCode.WARNING_CODE_002, msg=WarningMessage.NO_WORD)
                 exception.output()
-            return None
+            return []
         if len(idxes) < aug_cnt:
             aug_cnt = len(idxes)
         aug_idxes = self.sample(idxes, aug_cnt)


Test patch:
diff --git a/test/augmenter/char/test_char.py b/test/augmenter/char/test_char.py
index d964bbc..a6ba349 100755
--- a/test/augmenter/char/test_char.py
+++ b/test/augmenter/char/test_char.py
@@ -38,6 +38,13 @@ class TestCharacter(unittest.TestCase):
             tokens = aug.tokenizer(text)
             self.assertEqual(tokens, expected_tokens)
 
+    def test_no_aug(self):
+        aug = nac.KeyboardAug(aug_word_min=0.0, aug_word_p=0.05)
+        text = '| 4 ||  || ½ || 0 || ½ || - || 1 || 1 || 1 || 0 || 0 || 0 || 1 || 1 || 1 || 1 || 1 || 1 || 10 || 67.75'
+
+        augmented_data = aug.augment(text)
+        self.assertEqual(text.replace(' ', ''), augmented_data.replace(' ', ''))
+
     def test_multi_thread(self):
         text = 'The quick brown fox jumps over the lazy dog.'
         n = 3