ããã«è©³ç´°ãªå©ç¨æ¹æ³ãç¥ãããæ¹ã¯ãYahoo!ãããããã¼ãºãããã¯ã¼ã¯ã®ããã¥ã¢ã«ãåç §ãã¦ãã ããã ãã¤ã¸ã¢ã³ãã£ã«ã¿ã®å®è£ ããããæ¬æ ¼çã«ãã¤ã¸ã¢ã³ãã£ã«ã¿ã®å®è£ ã«å ¥ã£ã¦ããã¾ãã ãã®åã«ãã¾ãã¯å ç¨ã®ãªã¹ã1ã®ã³ã¼ããå©ç¨ãã¦å ¥åãããæç« ãããã¡æ¸ãããåèªã®éåãè¿ãé¢æ°ãä½æãnaivebayes.pyã¨ãã¦ä¿åãã¾ãããããã¡ããå ç¨ã®morphological.pyã¨åæ§ã«utf-8ã§ä¿åãã¦ãã ããã ãªã¹ã2ãæç« ã®åå²ãããé¢æ°ï¼naivebayes.pyï¼ # -*- coding: utf-8 -*- import math import sys #yahoo!å½¢æ ç´ è§£æ import morphological def getwords(doc): words = [s.lower() for s in morphological.split(doc)
ãµã³ãã«ã³ã¼ããåããã¦çµ±è¨ã®ç´è¦³çãªç解ãä¿ãããThink Stats âããã°ã©ãã®ããã®çµ±è¨å ¥éãã®èè ã«ãããã¤ãºçµ±è¨ã»ãã¤ãºæ¨è«ã®è§£èª¬æ¸ã§ãããã¤ãºçµ±è¨ã¯ãä¸ç¢ºå®ãªåé¡ãæ±ããæ¡ä»¶ãä»ããäºæ¸¬ãå¿ è¦ãªã¨ãã«å¨åãçºæ®ããçµ±è¨ææ³ã®1ã¤ãã¡ã¼ã«ã®ãã£ã«ã¿ãã«ã¼ããã§ä½¿ããã¦ãããã¨ã¯æåã§ããæ¬æ¸ã¯ãThink Statsãã¨åæ§ãæ°å¦çãªè¦³ç¹ã§ã®è¨è¿°ã¯æå°éã«ã¨ã©ããå®ä¾ãå¤ã使ã£ã¦å®ç¨ç観ç¹ãããã¤ãºææ³ã解説ãã¾ããPythonã§æ¸ããããµã³ãã«ã³ã¼ãã使ã£ã¦å®éã«æãåãããªãããã¤ãºçµ±è¨ãå¦ã¶ãã¨ãã§ãã¾ãããããã°ã©ãã³ã°ãç¥ããªã人ã«ãå½¹ç«ã¤å 容ã§ãã ç®æ¬¡ ã¾ããã 1ç« ãã¤ãºã®å®ç 1.1 æ¡ä»¶ä»ã確ç 1.2 çµå確ç 1.3 ã¯ããã¼åé¡ 1.4 ãã¤ãºã®å®ç 1.5 éæç解é 1.6 M&M'Såé¡ 1.7 ã¢ã³ãã£ã»ãã¼ã«åé¡ 1.8 è°è« 2ç« è¨
Yoshihiro Sato @yoshisatose æè¿ãTLã§å½é½æ§ã®è©±é¡ãç®ã«ããã®ã§ãä¸ã¤ç·´ç¿åé¡ãç´¹ä»ãã¾ããããã¯æ¨ç§ãç§ãæ å½ãã¦ããçµ±è¨å¦ï¼1å¹´çåãï¼ã®è©¦é¨ã§åºé¡ããåé¡ã§ããã¨ã§è¤æ°ã®å¦çãããã¨ã¦ãé¢ç½ãåé¡ã ã£ããã¨ããåå¿ãããã¾ãããããã¤ãºã®å®çãã®åé¡ãªã®ã§ãåãã人ã«ã¯ç°¡åã§ããååæ¼ç®ã§è§£ãã¾ãã 2013-03-18 21:31:42 Yoshihiro Sato @yoshisatose ãåé¡ã 人å£ã®5%ãããç æ°ã«ç½¹ã£ã¦ããã¨ãã¾ãããã®ç æ°ã«ç½¹ã£ã¦ãããã©ããã確ãããæ¤æ»ãããã®ã§ããå®å ¨ãªãã®ã§ã¯ãªããç æ°ã«å®éã«ç½¹ã£ã¦ãã人ãåããã¨90%ã®ç¢ºçã§é½æ§ã¨ãªããç æ°ã«ç½¹ã£ã¦ããªã人ãåããã¨90%ã®ç¢ºçã§é°æ§ã¨åºã¾ããï¼ç¶ãâ¦ï¼ 2013-03-18 21:32:29
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}