Add numeric flag in generate ontology to control namespace package root depth
Is your feature request related to a problem? Please describe. This is a follow-up to https://github.com/asyml/forte/issues/497
Instead of adding a boolean flag use_name_space_packaging, it's better to set an integer argument namespace_depth to allow a customized number of levels of namespace packaging. By doing so, we want to disable the generation of __init__.py for all the directory levels above namespace_depth.
For example, if we have an ontology level1.levle2.level3.something and namespace_depth=2, then we remove __init__.py under level1 and level1/level2 while keeping __init__.py under level1/level2/level3 (or any layer deeper). When namespace_depth<=0, we just disable namespace packaging and include __init__.py in all directory levels.
Further, there is one part not resolved in issue 497, where this new feature should be reflected in generate-ontology command line tool: https://github.com/asyml/forte/blob/master/forte/command_line/generate_ontology/main.py. For example, we can add a new integer argument called --namespace_depth. Only by doing this we can expose the feature to users.
Describe the solution you'd like Same as above.
Describe alternatives you've considered
Additional context Add any other context or screenshots about the feature request here.