[TTS] expand to support flexible dictionary entry formats in IPAG2P.
State: closed | Pull request: yes

* expand to support flexible dictionary entry formats in IPAG2P.
* removed unused imports in test.collections.tts
* removed unused imports in nemo.collections.tts.modules
* removed unused imports in nemo_text_processing.text_normalization.zh
* updated unit tests with new cases
* renamed test function names because we only test IPAG2P rather than all classes in the `modules.py`.

Signed-off-by: Xuesong Yang <1646669+XuesongYang@users.noreply.github.com>

```bash
$ pytest --cpu tests/nemo_text_processing/g2p/test_modules.py
A valid `test_data.tar.gz` test archive (10445891B) found in the `/Users/xueyang/workspace/NeMo/tests/.data` folder.
/Users/xueyang/miniconda3/envs/nemo/lib/python3.8/site-packages/torch/utils/tensorboard/__init__.py:4: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if not hasattr(tensorboard, "__version__") or LooseVersion(
/Users/xueyang/miniconda3/envs/nemo/lib/python3.8/site-packages/torch/utils/tensorboard/__init__.py:6: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  ) < LooseVersion("1.15"):
[NeMo W 2022-11-03 19:03:03 optimizers:55] Apex was not found. Using the lamb or fused_adam optimizer will error out.
Setting numba compat : True
==================================================================== test session starts =====================================================================
platform darwin -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 -- /Users/xueyang/miniconda3/envs/nemo/bin/python
cachedir: .pytest_cache
rootdir: /Users/xueyang/workspace/NeMo, configfile: setup.cfg
plugins: anyio-3.5.0, hydra-core-1.1.2
collected 13 items

tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_normalize_dict_with_phonemes PASSED                                                   [  7%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_normalize_dict_with_graphemes_and_phonemes PASSED                                     [ 15%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call PASSED                                                                   [ 23%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_with_file_or_object_dict_type PASSED                                     [ 30%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_with_oov_word PASSED                                                     [ 38%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_with_oov_func PASSED                                                     [ 46%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_with_graphemes_uppercase PASSED                                          [ 53%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_with_graphemes_lowercase PASSED                                          [ 61%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_with_escaped_characters PASSED                                           [ 69%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_instantiate_unsupported_locale PASSED                                                 [ 76%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_de_de PASSED                                                             [ 84%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_en_us PASSED                                                             [ 92%]
tests/nemo_text_processing/g2p/test_modules.py::TestIPAG2P::test_forward_call_es_es PASSED                                                             [100%]

===================================================================== slowest durations ======================================================================

(39 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================== 13 passed in 0.43s =====================================================================
```


# What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

**Collection**: [Note which collection this PR will affect]

# Changelog 
- Add specific line by line info of high level changes in this PR.

# Usage
* You can potentially add a usage example below



# Before your PR is "Ready for review"
**Pre checks**:
- [ ] Make sure you read and followed [Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md)
- [ ] Did you write any new necessary tests?
- [ ] Did you add or update any necessary documentation?
- [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
  - [ ] Reviewer: Does the PR have correct import guards for all optional libraries?
  
**PR Type**:
- [ ] New Feature
- [ ] Bugfix
- [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.


## Who can review?

Anyone in the community is free to review the PR once the checks have passed. 
[Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md) contains specific people who can review PRs to various areas.

# Additional Information
* Related to # (issue)