import json
"""
input topic name

input tag
input listen data
answer data
"""

class make_json:
    def __init__(self):
        pass

    def add_tag(self):
        pass


dic = {
        "intents": [
          {
            "tag": "greeting",
            "patterns": [
              "For test see saw wanted",
              "Hi",
              "Hey",
              "How are you",
              "Is anyone there?",
              "Hello",
              "Good day"
            ],
            "responses": [
              "안녕",
              "Hello, thanks for visiting",
              "Hi there, what can I do for you?",
              "Hi there, how can I help?"
            ]
          },
          {
            "tag": "goodbye",
            "patterns": ["Bye", "See you later", "Goodbye"],
            "responses": [
              "See you later, thanks for visiting",
              "Have a nice day",
              "Bye! Come back again soon."
            ]
          },
          {
            "tag": "thanks",
            "patterns": ["Thanks", "Thank you", "That's helpful", "Thank's a lot!"],
            "responses": ["Happy to help!", "Any time!", "My pleasure"]
          },
          {
            "tag": "items",
            "patterns": [
              "Which items do you have?",
              "What kinds of items are there?",
              "What do you sell?"
            ],
            "responses": [
              "We sell coffee and tea",
              "We have coffee and tea"
            ]
          },
          {
            "tag": "payments",
            "patterns": [
              "Do you take credit cards?",
              "Do you accept Mastercard?",
              "Can I pay with Paypal?",
              "Are you cash only?"
            ],
            "responses": [
              "We accept VISA, Mastercard and Paypal",
              "We accept most major credit cards, and Paypal"
            ]
          },
          {
            "tag": "delivery",
            "patterns": [
              "How long does delivery take?",
              "How long does shipping take?",
              "When do I get my delivery?"
            ],
            "responses": [
              "Delivery takes 2-4 days",
              "Shipping takes 2-4 days"
            ]
          },
          {
            "tag": "funny",
            "patterns": [
              "Tell me a joke!",
              "Tell me something funny!",
              "Do you know a joke?"
            ],
            "responses": [
              "Why did the hipster burn his mouth? He drank the coffee before it was cool.",
              "What did the buffalo say when his son left for college? Bison."
            ]
          }
        ]
      }

json_object = json.dumps(dic, indent = 4)

with open("sample.json", "w") as outfile: 
    outfile.write(json_object) 