__main__.py 590 B

12345678910111213141516171819202122
  1. import sys
  2. from word_processor.generators import Generator
  3. from word_processor.parsers import JavascriptParser
  4. from word_processor.strategies import flip_prep_pobj_strategy
  5. def calculate_names(text: str):
  6. generator = Generator(text=text, strategy=flip_prep_pobj_strategy, parser=JavascriptParser())
  7. generator.suggest()
  8. presentation = generator.present()
  9. print('\n'.join(presentation))
  10. # Press the green button in the gutter to run the script.
  11. if __name__ == '__main__':
  12. calculate_names(sys.argv[1])
  13. # See PyCharm help at https://www.jetbrains.com/help/pycharm/