Text normalization takes too much time for a string which contains a lot of dates
State: closed | Pull request: no
Labels: name: bug

**Describe the bug**

When I apply text normalization to a string that contains a lot of dates, the normalization takes too much time. For example, the string
```
Hotel built in 2002 , Last complete renovation 2002 , Last partial renovation 2011 , Number of floors 4 , Total number of rooms 35 , Number of single rooms 2 , Number of double rooms 33 , of which are suitable as three-bed rooms 15 , of which are suitable as four-bed rooms 3 , Number of junior suites 3 , Hotel open all year round , Reception manned 24 hours a day , Earliest check-in 15 : 00 , Latest check-out 11 : 00 , English-speaking staff available during the day , Hotel , City hotel , Boutique hotel , Trade fair / conference hotel , child-friendly hotel , Hiking hotel , No-smoking room 35 , Family rooms available 3 , Children 's beds / cots 2 , Renovation work planned 2018-01-08 , to 2018-12-31 , in area room , Renovation work planned 2018-01-08 , to 2018-12-31 , in area restaurant , Renovation work planned 2018-01-08 , to 2018-12-31 , in area lobby , Renovation work planned 2018-01-08 , to 2018-12-31 , in area other
```
was processed for 30 min before I interrupted the normalization.

**Steps/Code to reproduce bug**

```python
from nemo_text_processing.text_normalization.normalize import Normalizer

s = ( 
    "Hotel built in 2002 , Last complete renovation 2002 , Last partial renovation 2011 , Number of floors 4 , "
    "Total number of rooms 35 , Number of single rooms 2 , Number of double rooms 33 , of which are "
    "suitable as three-bed rooms 15 , of which are suitable as four-bed rooms 3 , Number of junior suites 3 , "
    "Hotel open all year round , Reception manned 24 hours a day , Earliest check-in 15 : 00 , Latest check-out "
    "11 : 00 , English-speaking staff available during the day , Hotel , City hotel , Boutique hotel , "
    "Trade fair / conference hotel , child-friendly hotel , Hiking hotel , No-smoking room 35 , "
    "Family rooms available 3 , Children 's beds / cots 2 , Renovation work planned 2018-01-08 , "
    "to 2018-12-31 , in area room , Renovation work planned 2018-01-08 , to 2018-12-31 , in area "
    "restaurant , Renovation work planned 2018-01-08 , to 2018-12-31 , in area lobby , Renovation "
    "work planned 2018-01-08 , to 2018-12-31 , in area other"
)
normalizer = Normalizer(input_case='cased', lang='en')
normalized_string = normalizer.normalize(s)
```


**Expected behavior**

Normalization is expected to finish much faster. For example, in a second.

**Environment overview (please complete the following information)**

 - Environment location: Bare-metal
 - Method of NeMo install: from source (`git clone https://github.com/NVIDIA/NeMo.git && cd NeMo && bash reinstall.sh`)

**Environment details**

- OS version: Ubuntu 20.04.2 LTS
- PyTorch version: 1.10.0
- Python version: 3.8.12

**Additional context**

The problem is in [this](https://github.com/NVIDIA/NeMo/blob/a8154fd825c34de0a59309536e11ba7d5d1f94e1/nemo_text_processing/text_normalization/normalize.py#L148) line. A method `generate_permutations()` yields all possible permutations of date components and the number of permutations is at least `3 ** number_of_dates_in_a_string`.