Giter VIP home page Giter VIP logo

koml's Introduction

KoML

Introduction

AIML은 누구나 쉽게 챗봇을 만들 수 있게끔 도와주는 언어에요. AIML을 이용한 챗봇은 Loebner Prize 등 세계적인 챗봇 대회에서 우승을 하기도 했고 딥러닝 기반의 챗봇이 널리 쓰이는 요즘도 Rule-based 처리를 할 때 널리 사용되고 있어요.
하지만 string match 기반의 AIML로 한국어를 처리하기에는 어려움이 있었어요. 한국어는 영어와 달리 하나의 의미를 전달하는데 여러가지 경우의 수가 나올 수 있어서요. 예를 들어 '너'가 '점심'에 '무슨음식'을 '먹었냐' 라고 물어보고 싶을 때 영어로는 이렇게 물어보는 경우만 존재하지만

What did you eat for lunch?

한국어로는 표현할 수 있는 가짓수가 너무 많아요.

너 점심 뭐 먹었어?
너 점심 뭐 먹었니?
너 점심 뭐를 먹었니?
너 점심에 뭐를 먹었니?
너는 점심에 뭐를 먹었니?
.
.

KoML 을 이용해서 챗봇을 만들면 이렇게 만들수 있어요.

<koml>
  <case>
    <pattern>너_j 점심_j 뭐_j 먹었_e?</pattern>
    <template>로봇이 밥을 왜먹음</template>
  </case>
<koml>
<< 너는 점심에 뭐 먹었니?
>> 로봇이 밥을 왜먹음

Installation

pip install koml

Test

<!-- koml_test.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<koml>
  <case>
    <pattern>너_j 점심_j 뭐_j 먹었_e?</pattern>
    <template>로봇이 밥을 왜먹음</template>
  </case>
</koml>
# main.py
from koml import KomlBot

bot = KomlBot()
bot.learn(['getting_started.xml'])
bot.converse()

결과

<< 너는 점심에 뭐 먹었니?
>> 로봇이 밥을 왜먹음

Usage

공식문서 를 참조해주세요!

URL: https://koml-docs.readthedocs.io

koml's People

Contributors

5yearskim avatar onion-aka avatar

Stargazers

Chaeho Yu avatar

Watchers

 avatar

koml's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.