├── simple-code.yooz └── README.md /simple-code.yooz: -------------------------------------------------------------------------------- 1 | members {Ashkan, Matin} 2 | #Iran: A country in West Asia. 3 | ( 4 | + What is your name? 5 | - My name is Yooz. 6 | ) 7 | ( 8 | + How are you? 9 | - I'm good, thank you . 10 | ) 11 | ( 12 | + How's it going? 13 | - Thank you _ How about you? 14 | ) 15 | ( 16 | + Where is Iran? 17 | - #Iran 18 | ) 19 | ( 20 | + My name is *1. 21 | - Nice to meet you, *1. 22 | ) 23 | ( 24 | + I travel to the city of *2 *1 times a year. 25 | - Do you enjoy your *1 trips to the city of *2? 26 | ) 27 | ( 28 | + {Iran, country} 29 | - #Iran 30 | ) 31 | ( 32 | + Tell me about yourself. 33 | - I'm good!> 34 | ) 35 | ( 36 | + Tell me about yourself. 37 | - Thanks . 38 | ) 39 | ( 40 | + I am &members 41 | - You are a member of this club. 42 | ) 43 | ( 44 | + Are you good? 45 | - Thanks! 46 | =Topic: Greeting 47 | ) 48 | ( 49 | + What were we talking about? 50 | - We were talking about =Topic. 51 | ) 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Yooz Language 3 | 4 | Yooz is a powerful and flexible AI-powered markup language designed to make chatbot interactions and data categorization seamless and intuitive. Yooz simplifies the process of creating conversational patterns for intelligent agents, making it easy to define responses based on keywords, patterns, and dynamic content replacement. 5 | 6 | 7 | ## Installation 8 | 9 | To get started with Yooz, you can download the necessary libraries from the GitHub repository and integrate them into your project. Additionally, you can explore and test the functionality directly on the official website yooz.run. The website provides a user-friendly interface for experimenting with Yooz, allowing you to quickly see how the language operates and build your own interactive chatbots with ease. 10 | 11 | 12 | ## How Yooz Works 13 | 14 | Yooz language allows developers to define **patterns**, **keywords**, **stop words**, **definitions**, and **data categorization** that control how a chatbot interprets and responds to user inputs. By parsing these components, Yooz creates a structured system that helps match user messages to appropriate responses. It utilizes a combination of exact matches, keyword detection, response templates, and dynamic parameter handling to ensure accurate and context-aware interactions. 15 | 16 | ## Features 17 | 18 | - **General Definitions:** Define general terms using the `#` symbol. 19 | - **Conversational Patterns:** Define question and response patterns with support for variables (`*1`, `*2`, etc.). 20 | - **Stop Words:** Remove unnecessary words from user inputs. 21 | - **Keywords:** Identify and respond based on a set of keywords. 22 | - **Additional Responses:** Append multiple responses using `!>`. 23 | - **Word Categories:** Define categories like pronouns and verbs and use them in patterns with `&`. 24 | - **Support for Multiple Variables:** Use multiple variables in patterns and replace them in responses. 25 | 26 | ## Syntax Overview 27 | 28 | The Yooz language is composed of different elements, including **definitions**, **patterns**, **keywords**, and **stop words**. 29 | 30 | ### 1. Definitions 31 | 32 | Definitions are used to create variables that can be dynamically replaced in responses. 33 | 34 | ```yooz 35 | #name : John Doe . 36 | #country : Iraq . 37 | ``` 38 | 39 | ### 2. Patterns 40 | 41 | Patterns are used to match specific user inputs. The bot responses are defined after the pattern. 42 | 43 | ```yooz 44 | ( 45 | + How are you? 46 | - I'm doing great, thank you! 47 | ) 48 | ( 49 | + What's your name? 50 | - My name is #name . 51 | ) 52 | ``` 53 | 54 | ### 3. Keywords 55 | 56 | Keywords are used to create a more flexible response, where the chatbot can respond based on the presence of certain keywords in the input. 57 | 58 | ```yooz 59 | ( 60 | + {food, eat} 61 | - I love food! What's your favorite dish? 62 | ) 63 | ``` 64 | 65 | ### 4. Stop Words 66 | 67 | Stop words are ignored during input matching, which can help to ensure more accurate responses by excluding irrelevant words. 68 | 69 | ```yooz 70 | - {the, a, an, of, in, on, with} 71 | ``` 72 | 73 | ### 5. Dynamic Parameters 74 | 75 | Dynamic placeholders allow responses to include specific parts of the user input. For example: 76 | 77 | ```yooz 78 | ( 79 | + My name is *1. 80 | - Nice to meet you, *1! 81 | ) 82 | ``` 83 | 84 | ## Examples 85 | 86 | ### Example Input Code 87 | 88 | ```yooz 89 | #name : AI Bot . 90 | ( 91 | + What's your name? 92 | - My name is #name . 93 | ) 94 | ( 95 | + I am feeling *1. 96 | - Why are you feeling *1? 97 | ) 98 | - {I, you, he, she, it} 99 | ( 100 | + {hello, hi} 101 | - Hello! How can I assist you today? 102 | ) 103 | ``` 104 | 105 | ### Sample User Messages and Responses 106 | 107 | **User:** What's your name? 108 | **Bot:** My name is AI Bot. 109 | 110 | **User:** I am feeling happy. 111 | **Bot:** Why are you feeling happy? 112 | 113 | **User:** Hello 114 | **Bot:** Hello! How can I assist you today? 115 | --------------------------------------------------------------------------------