ãã«ã³ãã¢ãã«ã使ã£ã人工ç¡è½ã®ä½ãæ¹
2014/12/13 追è¨
ãã®ããã°ã§åèã«ãã¦ãã絶çæ¬ã®å¾©å»çãåºãããã§ãã
追è¨ããã¾ã§
å æ¥ãチャットボットを作りましたã
ãæããããã°ã©ã ãã¨ããæ¬ãåèã«ããã®ã§ããããã®æ¬ãæ¢ã«çµ¶çã«ãªã£ã¦ãã¦ãAmazonã®ãã¼ã±ãããã¬ã¤ã¹ã§ã¯ãªãã¨å®ä¾¡ã®3å以ä¸ã®å¤æ®µã§å£²ããã¦ãã¾ãï¼
ãã¼ããããã ã¨æãåºãªãããã©å 容ç¥ãããããã¨ããæ¹ã®ããã«ã¯ã©ã¹å³ãæãã¾ãããæ¬æ¸ã«ã¯è¨è¨å³ããããã¦ãªãã£ãã®ã§ãæã£ã¦ã人ã確èªããæå³ã§ã®å½¹ã«ã¯ç«ã¤ããç¥ãã¾ããããRubyã¯æ¸ããªããï¼ã¨ããæ¹ã®åèã«ããªããã¨æãã¾ãã
æ¬æ¸ã§ç´¹ä»ãã¦ãã人工ç¡è½ã®æçµå½¢ã¯ãããªæãã§ãã
Nobyã¨ããã®ã人工ç¡è½ã®ãã£ã©ã¯ã¿ã¼ãUnmoã人工ç¥è½ã®ã¡ã¤ã³ã¯ã©ã¹ã§ããEmotionã¯ææ ã®ã¢ãã«ãResponderãè¿çå 容ãä½ãã¯ã©ã¹ã§ãDictionaryãMorphãGuguluãªã©ãåç §ãã¦ãã¾ãã
ãããã·ã³ãã«ã«è¡¨ãã¨ãããªæãã
以ä¸ãæ¬æ¸ã§ã©ã®ããã«å®è£ ããã¦ããããç°¡åã«èª¬æãã¦ããã¾ãã
ææ
ããã§ã¯ãæ©å«ãã¨ããä¸å ã§ææ ãã¢ãã«åãã¦ãã¾ããææ å¤ã¯ã¢ã«ã´ãªãºã ã«ãã©ã¡ã¼ã¿ã¨ãã¦æ¸¡ããã¾ãã
è¾æ¸
ã¢ã«ã´ãªãºã ã§åç §ããã¾ããã¾ããã¦ã¼ã¶ã¼ããã®ã¤ã³ããããå ã«å¦ç¿ãã¾ãã
ã¢ã«ã´ãªãºã
WhatResponder
inputã«ãã£ã¦ä½ï¼ããä»å ããã ãã®è¿çãè¿ãã¾ãã
RondomResponder
å®åæãè¿ãã¾ãã
PatternResponder
ãããã¼ã¯ã¼ããããã°ãããã«å¯¾å¿ããæãè¿ãã¾ãã
ãä¸ã¤ã®ãã¼ã¯ã¼ãã«å¯¾ãã¦è¤æ°ã®æç« ãä¿æãã¾ãã
TemplateResponder
ãââã¯ÃÃã§ããã¨ãããããªãã³ãã¬ã¼ããæã¡ãåè©ãå½ã¦ã¯ãã¦ããã¾ãã
MarkovResponder
åèªã®ã¤ãªãããåºã«ããããã«ã³ãã¢ãã«ãããã¨ã«ãæç« ãçµã¿åããã¦æ°ãã«ä½ãåºãã¾ãã
ãã«ã³ãã¢ãã«ã«ã¤ãã¦ã¯ä¸ã§ã
GoogleResponder
ã¦ã¼ã¶ã®ã¤ã³ããããããã¼ã¯ã¼ããæãåºãããã®ãã¼ã¯ã¼ãã§Googleæ¤ç´¢ããããããããããã¼ã¸ããæç« ãæãåºãããã«ã³ãã¢ãã«ã§æç« ãçæãã¦è¿ãã¾ãã
ãã«ã³ãã¢ãã«ã®å®è£
æ¬æ¸ã§ã¯å½¢æ ç´ è§£æããã2åèªããã¬ãã£ãã¯ã¹ã¨ãã¦ã¢ãã«å
ç§ãã¯ãã³ã¼ããããæ¸ããã¾ããã
ã¯ä»¥ä¸ã®ããã«ã¢ãã«åããã¾ãã
â ç§ | 㯠| â | ã³ã¼ã |
㯠| ã³ã¼ã | â | ã |
ã³ã¼ã | ã | â | æ¸ã |
ã | æ¸ã | â | ã¾ã |
æ¸ã | ã¾ã | â | ã |
ã¾ã | ã | â | END |
ãå¥ã®æç« ã§
ã³ã¼ããããåã£ãã¦ããã ãã
ã¨ããã®ããã£ãå ´åã
â ç§ | 㯠| â | ã³ã¼ã |
㯠| ã³ã¼ã | â | ã |
â ã³ã¼ã | ã | â | æ¸ãããå㣠|
ã | æ¸ã | â | ã¾ã |
æ¸ã | ã¾ã | â | ã |
ã¾ã | ã | â | END |
ã | å㣠| â | 㦠|
å㣠| 㦠| â | ãã ãã |
㦠| ãã ãã | â | END |
â
ãä»ãã¦ãã®ãæç« ã®ã¹ã¿ã¼ããã¤ã³ãã§ãã
æåã«ãç§ãã¯ããé¸ãã ã¨ããã¨ã次ã¯ãã³ã¼ããããã¯ãã³ã¼ããã§ããããã³ã¼ããããã§ãæ¸ããããåã£ãã®ã©ã¡ããã¨ãªãã¾ãããåã£ãã®æ¹ãé¸ã°ããã¨ããã¨ãããåã£ãã§ãã¦ãããåã£ãã¦ãã§ããã ãããããã¦ããã ãããã§ENDã¨ãªãã
ç§ã¯ã³ã¼ããåã£ã¦ãã ãã
ã¨ãªãã¾ããä¸ã®ä¾ã¯ç¡çããå½ã¦ã¯ããæãã§ãããçµã¿åãããå¢ããã¨æå¤ãªæç« ãã§ãã¦ãªããªãé¢ç½ããªãã¾ããï¼
課é¡
æ¬æ¸ã®æå¾ã«ãä»å¾ã®èª²é¡ã¨ãã¦ä»¥ä¸ãããããã¦ãã¾ã
- GuguleResponderã®ãã«ãã¹ã¬ããå
ç¾ç¶ã§ã¯ãã¼ã¯ã¼ãã§æ¤ç´¢ãã¦ãã¦ã§ãããæç« ãåã£ã¦ãã¦ããã«ã³ãã¢ãã«åããã¾ã§å¾ ãããã¦ãã¾ãã¾ãã
- è¾æ¸ã®è¨è¨
è¾æ¸ã¯ããã¹ããã¡ã¤ã«ã¨Marshalãã³ããããã¡ã¤ã«ã使ã£ã¦ãã¾ããMarshalããããã®ã¯Ruby以å¤ã§ã¯æ±ããªãã®ã§ã¡ã³ããã³ã¹ãã¼ã«ãå¿ è¦ã§ããã¾ãããã¡ã¤ã«ã§ã®ä¿åã«ã¯éçãããã®ã§DBã使ã£ãã»ããããã§ããã
- ä¼è©±ã®è³ªãé«ãã
以ä¸ã®ãããªæ¹æ³ã§ãä¼è©±ã®è³ªãããé«ãããã¨ãã§ããããããã¾ãã
-
- æèã¨ããæ¦å¿µãåãå ¥ãã
- ãã¼ã¯ã¼ãAã¨Bã¯é¢é£ãããã¨ãã£ãæ å ±ãè¾æ¸ã«çãè¾¼ã
- ããããããã¥ã¼ã¹ã天æ°ãªã©æ§ã ãªæ å ±ãåã£ã¦ãã
- æ§ã ãªã¤ã³ã¿ã¼ãã§ã¼ã¹ã§
æ¬æ¸ã§ã¯ã¹ã¿ã³ãã¢ãã¼ã³ã®ä¼è©±ããããç´¹ä»ãã¦ãã¾ãããããã£ãããæ²ç¤ºæ¿ãããã°ãªã©æ§ã ãªãã®ã«å¿ç¨å¯è½ã§ããããããæå³ã§ã¯これã¯ãã®ä¸ä¾ã§ããã
æå¾ã«ãæ¬æ¸ã®ç´¹ä»ã§ããæåã«æ¸ããã¨ããã絶çã§ããããã
復å»çï¼