12345678910111213141516171819202122 |
- import sys
- from word_processor.generators import Generator
- from word_processor.parsers import JavascriptParser
- from word_processor.strategies import leaf_strategy
- def calculate_names(text: str):
- generator = Generator(text=text, strategy=leaf_strategy, parser=JavascriptParser())
- generator.suggest()
- presentation = generator.present()
- print('\n'.join(presentation))
- # Press the green button in the gutter to run the script.
- if __name__ == '__main__':
- calculate_names(sys.argv[1])
- # See PyCharm help at https://www.jetbrains.com/help/pycharm/
|