æ¨æ¥ã®ã¯ã¦ãªã®ãããã¨ã³ããªã¼ã«ãå ¥éãã¤ãºçµ±è¨ãã®èªã¿ã©ããã¨ããè¨äºãè¼ã£ã¦ãã¾ããããã¤ãºçè«ã®äººæ°ã¯æ ¹å¼·ãã§ããã ãã¼ã¹ã¨ãã¦ã®æ°å¼ã¯å²ã¨ã·ã³ãã«ãªã®ã§ãèªåã§å®è£ ãã¦ãããç¨æéã¯æãããªãããããã¾ãããããããCPANã®ã¢ã¸ã¥ã¼ã«ã¨ãã¦æä¾ããã¦ããã®ã§ããã¡ãã使ç¨ããã®ãè¯ããã¨æãã¾ããç§ãç¥ã£ã¦ããæã§ã¯ãAlgorithm::NaiveBayesãç°¡åã§ä½¿ããããã£ãã§ãã ææ¸ããã³ã¼ãã§ãããä¸ã®ãµã³ãã«ã§ã¯ç°¡åãªã¹ãã ãã£ã«ã¿ã¼ãä½ã£ã¦ãã¾ããspam.txtã¨ham.txtã¯ãããããã®ã³ã¼ãã¹ãå½¢æ ç´ è§£æãã¦ä½ã£ãåèªã®ã¿ã®ãªã¹ãã§ããtest.txtã¯ãå¤å®ãããæç« ããæ½åºããåèªã®ãªã¹ãã§ããã¹ãã ã¨ãã ã®éãå¢ããã°ãããã ãã§ãå²ã¨ä½¿ãç©ã«ãªãã¾ãã å¿ç¨ä¾ã¨ãã¦ã¯ãã¹ãã ã¨ãã ã®2種é¡ã®ã«ãã´ãªã ãã§ã¯ãªããè¤æ°ç¨®é¡ã®ã«ãã´ãªãä½ãã°ããã°ã®
{{#tags}}- {{label}}
{{/tags}}