Repository: TRoboto/Maha

Issue:
Adding a list of strings to cleaner functions
### What problem are you trying to solve?

Enhance the cleaners functions to take a list of strings as input if needed.

### Examples (if relevant)

```py
>>> from maha.cleaners.functions import remove
>>> text = "من اليوم سوف ينتقل صديقي منور من المدينة المنورة وعنوانه الجديد هو الرياض"
>>>remove(text, custom_expressions = [r"\bمن\b", r"\bعن\b")
'اليوم سوف ينتقل صديقي منور المدينة المنورة وعنوانه الجديد هو الرياض'

```

### Definition of Done

- It must adhere to the coding style used in the defined cleaner functions.
- The implementation should cover most use cases.
- Adding tests

Discussion:
codecov[bot]: # [Codecov](https://codecov.io/gh/TRoboto/Maha/pull/103?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mohammad+Al-Fetyani) Report
> Merging [#103](https://codecov.io/gh/TRoboto/Maha/pull/103?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mohammad+Al-Fetyani) (a0bfe40) into [main](https://codecov.io/gh/TRoboto/Maha/commit/8908cd383ec4af6805be25bfe04ec3e4df6f7939?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mohammad+Al-Fetyani) (8908cd3) will **increase** coverage by `0.00%`.
> The diff coverage is `100.00%`.

> :exclamation: Current head a0bfe40 differs from pull request most recent head 9a3a978. Consider uploading reports for the commit 9a3a978 to get more accurate results

```diff
@@           Coverage Diff           @@
##             main     #103   +/-   ##
=======================================
  Coverage   97.03%   97.03%           
=======================================
  Files          70       70           
  Lines        2660     2663    +3     
=======================================
+ Hits         2581     2584    +3     
  Misses         79       79           
```


| [Impacted Files](https://codecov.io/gh/TRoboto/Maha/pull/103?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mohammad+Al-Fetyani) | Coverage Δ | |
|---|---|---|
| [maha/cleaners/functions/remove\_fn.py](https://codecov.io/gh/TRoboto/Maha/pull/103/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mohammad+Al-Fetyani#diff-bWFoYS9jbGVhbmVycy9mdW5jdGlvbnMvcmVtb3ZlX2ZuLnB5) | `100.00% <100.00%> (ø)` | |

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. [Learn more](https://about.codecov.io/product/feature/runtime-insights/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Mohammad+Al-Fetyani)


Patch:
diff --git a/maha/cleaners/functions/remove_fn.py b/maha/cleaners/functions/remove_fn.py
index 1385f34..47786b8 100644
--- a/maha/cleaners/functions/remove_fn.py
+++ b/maha/cleaners/functions/remove_fn.py
@@ -3,6 +3,8 @@ Functions that operate on a string and remove certain characters.
 """
 from __future__ import annotations
 
+from maha.rexy import non_capturing_group
+
 __all__ = [
     "remove",
     "remove_strings",
@@ -92,7 +94,7 @@ def remove(
     emojis: bool = False,
     use_space: bool = True,
     custom_strings: list[str] | str | None = None,
-    custom_expressions: ExpressionGroup | Expression | str | None = None,
+    custom_expressions: ExpressionGroup | Expression | list[str] | str | None = None,
 ):
 
     """Removes certain characters from the given text.
@@ -168,7 +170,7 @@ def remove(
         for more information, by default True
     custom_strings:
         Include any other string(s), by default None
-    custom_expressions: Union[:class:`~.ExpressionGroup`, :class:`~.Expression`, str]
+    custom_expressions:
         Include any other regular expression expressions, by default None
 
     Returns
@@ -213,11 +215,15 @@ def remove(
     if isinstance(custom_strings, str):
         custom_strings = [custom_strings]
 
+    chars_to_remove.extend(custom_strings)
+
+    # expressions to remove
     if isinstance(custom_expressions, str):
         custom_expressions = Expression(custom_expressions)
 
-    chars_to_remove.extend(custom_strings)
-    # expressions to remove
+    elif isinstance(custom_expressions, list):
+        custom_expressions = Expression(non_capturing_group(*custom_expressions))
+
     expressions_to_remove = ExpressionGroup(custom_expressions)
 
     # Since each argument has the same name as the corresponding constant


Test patch:
diff --git a/tests/cleaners/test_remove.py b/tests/cleaners/test_remove.py
index df184a8..071f5a6 100644
--- a/tests/cleaners/test_remove.py
+++ b/tests/cleaners/test_remove.py
@@ -823,3 +823,12 @@ def test_remove_arabic_letter_dots_with_edge_case(input: str, expected: str):
 def test_remove_arabic_letter_dots_general(input: str, expected: str):
 
     assert remove_arabic_letter_dots(input) == expected
+
+
+def test_remove_list_input(simple_text_input: str):
+    list_ = ["بِسْمِ", "the", "ال(?=ر)"]
+    processed_text = remove(text=simple_text_input, custom_expressions=list_)
+    assert (
+        processed_text
+        == "1. ،اللَّهِ رَّحْمَٰنِ رَّحِيمِ In name of Allah,Most Gracious, Most Merciful."
+    )