{"id":2756,"date":"2025-12-08T18:07:59","date_gmt":"2025-12-08T08:37:59","guid":{"rendered":"https:\/\/softasia.jp\/blog\/?p=2756"},"modified":"2025-12-08T18:07:59","modified_gmt":"2025-12-08T08:37:59","slug":"%e3%80%90python%e5%85%a5%e9%96%80%e3%80%91%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e6%8c%87%e5%90%91%e3%82%92%e3%82%84%e3%81%95%e3%81%97%e3%81%8f%e8%a7%a3%e8%aa%ac%ef%bc%81%e5%ae%9f","status":"publish","type":"post","link":"https:\/\/softasia.jp\/blog\/offshore\/2756\/","title":{"rendered":"\u3010Python\u5165\u9580\u3011\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3092\u3084\u3055\u3057\u304f\u89e3\u8aac\uff01\u5b9f\u52d9\u30fbAI\u958b\u767a\u306b\u3082\u5f79\u7acb\u3064\u57fa\u790e\u77e5\u8b58"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"size-full wp-image-2760 aligncenter\" src=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT_ASIA_\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1-1000-x-1000-px-4.png\" alt=\"\" width=\"1000\" height=\"1000\" srcset=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT_ASIA_\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1-1000-x-1000-px-4.png 1000w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT_ASIA_\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1-1000-x-1000-px-4-300x300.png 300w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT_ASIA_\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1-1000-x-1000-px-4-150x150.png 150w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT_ASIA_\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1-1000-x-1000-px-4-768x768.png 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Python\u3092\u5b66\u3073\u59cb\u3081\u305f\u3070\u304b\u308a\u306e\u65b9\u304c\u3001\u5fc5\u305a\u3068\u8a00\u3063\u3066\u3044\u3044\u307b\u3069\u3064\u307e\u305a\u304f\u306e\u304c<span style=\"color: #ff0000;\"><strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\uff08Object-Oriented Programming\uff1aOOP\uff09<\/strong><\/span>\u3068\u3044\u3046\u6982\u5ff5\u3067\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u300c<strong>\u95a2\u6570\u3068\u5909\u6570\u3060\u3051\u3067\u30b3\u30fc\u30c9\u306f\u66f8\u3051\u308b\u306e\u306b\u3001\u306a\u305c\u30af\u30e9\u30b9\u3084\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5fc5\u8981\u306a\u306e\uff1f<\/strong>\u300d<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0\u300c<strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3063\u3066\u3001\u7d50\u5c40\u4f55\u304c\u4fbf\u5229\u306a\u306e\uff1f<\/strong>\u300d<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u305d\u3093\u306a\u7591\u554f\u3092\u6301\u3064\u65b9\u306e\u305f\u3081\u306b\u3001\u3053\u306e\u8a18\u4e8b\u3067\u306f<span style=\"text-decoration: underline;\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u57fa\u672c\u304b\u3089\u3001\u5b9f\u52d9\u3084AI\u958b\u767a\u3067\u306e\u6d3b\u7528\u4f8b\u307e\u3067\u3084\u3055\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059<\/span>\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">1<\/span> \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3068\u306f<\/a><\/li><li><a href=\"#Python\"><span class=\"toc_number toc_depth_1\">2<\/span> Python\u306b\u304a\u3051\u308b\u30af\u30e9\u30b9\u3068\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u57fa\u672c\u69cb\u6587<\/a><\/li><li><a href=\"#3\"><span class=\"toc_number toc_depth_1\">3<\/span> \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e3\u3064\u306e\u67f1\u3092\u7406\u89e3\u3057\u3088\u3046<\/a><ul><li><a href=\"#Encapsulation\"><span class=\"toc_number toc_depth_2\">3.1<\/span> \u30ab\u30d7\u30bb\u30eb\u5316\uff08Encapsulation\uff09<\/a><\/li><li><a href=\"#Inheritance\"><span class=\"toc_number toc_depth_2\">3.2<\/span> \u7d99\u627f\uff08Inheritance\uff09<\/a><\/li><li><a href=\"#Polymorphism\"><span class=\"toc_number toc_depth_2\">3.3<\/span> \u591a\u614b\u6027\uff08Polymorphism\uff09<\/a><\/li><\/ul><\/li><li><a href=\"#AI\"><span class=\"toc_number toc_depth_1\">4<\/span> \u5b9f\u52d9\u3067\u306e\u6d3b\u7528\u4f8b\uff1a\u30c7\u30fc\u30bf\u5206\u6790\u3084AI\u958b\u767a\u306b\u304a\u3051\u308b\u30af\u30e9\u30b9\u8a2d\u8a08<\/a><\/li><li><a href=\"#QA\"><span class=\"toc_number toc_depth_1\">5<\/span> \u3088\u304f\u3042\u308b\u8cea\u554f\uff08Q&amp;A\uff09<\/a><ul><li><a href=\"#i-2\"><span class=\"toc_number toc_depth_2\">5.1<\/span> \u30af\u30e9\u30b9\u3092\u4f7f\u3046\u3068\u51e6\u7406\u901f\u5ea6\u304c\u843d\u3061\u307e\u305b\u3093\u304b<\/a><\/li><li><a href=\"#i-3\"><span class=\"toc_number toc_depth_2\">5.2<\/span> \u30af\u30e9\u30b9\u3068\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u9055\u3044\u306f<\/a><\/li><li><a href=\"#dataclass\"><span class=\"toc_number toc_depth_2\">5.3<\/span> \u30c7\u30fc\u30bf\u30af\u30e9\u30b9\uff08@dataclass\uff09\u3068\u306f<\/a><\/li><\/ul><\/li><li><a href=\"#AI-2\"><span class=\"toc_number toc_depth_1\">6<\/span> AI\u958b\u767a\u306b\u304a\u3051\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u6d3b\u7528\u4f8b<\/a><\/li><li><a href=\"#i-4\"><span class=\"toc_number toc_depth_1\">7<\/span> \u307e\u3068\u3081<\/a><\/li><\/ul><\/div>\n<h2><span id=\"i\"><span style=\"font-weight: 400;\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3068\u306f<\/span><\/span><\/h2>\n<p><img loading=\"lazy\" class=\"size-full wp-image-2762 aligncenter\" src=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-51.png\" alt=\"\" width=\"640\" height=\"427\" srcset=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-51.png 640w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-51-300x200.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><span style=\"font-weight: 400;\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3068\u306f\u3001\u7c21\u5358\u306b\u8a00\u3048\u3070\u3001<\/span><\/span><span style=\"font-weight: 400;\"><span style=\"text-decoration: underline;\">\u73fe\u5b9f\u4e16\u754c\u306e\u30e2\u30ce\uff08\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u8868\u73fe\u3059\u308b\u65b9\u6cd5\u3067\u3059<\/span>\u3002\u4f8b\u3048\u3070\u3001\u300c\u8eca\u300d\u3068\u3044\u3046\u30e2\u30ce\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li style=\"font-weight: 400;\"><strong>\u5c5e\u6027\uff08\u30c7\u30fc\u30bf\uff09\uff1a\u8272\u3001\u30e1\u30fc\u30ab\u30fc\u3001\u901f\u5ea6\u3001\u71c3\u6599\u306e\u7a2e\u985e\u306a\u3069<\/strong><\/li>\n<li style=\"font-weight: 400;\"><strong>\u632f\u308b\u821e\u3044\uff08\u51e6\u7406\uff09\uff1a\u8d70\u308b\u3001\u6b62\u307e\u308b\u3001\u66f2\u304c\u308b<\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u3088\u3046\u306b\u3001\u3072\u3068\u3064\u306e\u30e2\u30ce\u306b\u300c\u60c5\u5831\u300d\u3068\u300c\u52d5\u4f5c\u300d\u304c\u30bb\u30c3\u30c8\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u304c\u73fe\u5b9f\u4e16\u754c\u306e\u7279\u5fb4\u3067\u3059\u3002\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3067\u306f\u3001\u3053\u308c\u3092\u305d\u306e\u307e\u307e\u30b3\u30fc\u30c9\u306b\u843d\u3068\u3057\u8fbc\u307f\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Car:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def __init__(self, color, speed):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.color = color<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.speed = speed<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def run(self):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(f&#8221;{self.color}\u306e\u8eca\u304c\u6642\u901f{self.speed}km\u3067\u8d70\u3063\u3066\u3044\u307e\u3059\u3002&#8221;)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def stop(self):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(f&#8221;{self.color}\u306e\u8eca\u304c\u6b62\u307e\u308a\u307e\u3057\u305f\u3002&#8221;)<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u3088\u3046\u306b\u3001<span style=\"text-decoration: underline;\">\u30af\u30e9\u30b9\uff08\u8a2d\u8a08\u56f3\uff09\u3092\u5b9a\u7fa9\u3057\u3001\u305d\u3053\u304b\u3089\u5b9f\u969b\u306e\u8eca\uff08\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\uff09\u3092\u4f5c\u308b\u306e\u304c\u57fa\u672c\u7684\u306a\u6d41\u308c<\/span>\u3067\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span id=\"Python\"><span style=\"font-weight: 400;\">Python\u306b\u304a\u3051\u308b\u30af\u30e9\u30b9\u3068\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u57fa\u672c\u69cb\u6587<\/span><\/span><\/h2>\n<p><img loading=\"lazy\" class=\"size-full wp-image-2765 aligncenter\" src=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-52.png\" alt=\"\" width=\"640\" height=\"427\" srcset=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-52.png 640w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-52-300x200.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Python\u3067\u306f\u3001class \u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<strong><span style=\"color: #ff0000;\">\u30af\u30e9\u30b9\u306f\u8a2d\u8a08\u56f3<\/span><\/strong>\u3001<strong><span style=\"color: #ff0000;\">\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u5b9f\u4f53<\/span><\/strong>\u3067\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\"># \u30af\u30e9\u30b9\u5b9a\u7fa9<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Dog:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def __init__(self, name):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.name = name<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def bark(self):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(f&#8221;{self.name}\u304c\u30ef\u30f3\u30ef\u30f3\u3068\u5420\u3048\u3066\u3044\u307e\u3059\uff01&#8221;)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\"># \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">my_dog = Dog(&#8220;\u30dd\u30c1&#8221;)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">my_dog.bark()<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u51fa\u529b\uff1a<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u30dd\u30c1\u304c\u30ef\u30f3\u30ef\u30f3\u3068\u5420\u3048\u3066\u3044\u307e\u3059\uff01<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u3088\u3046\u306b\u3001<span style=\"text-decoration: underline;\">\u30af\u30e9\u30b9\u304b\u3089\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3057\u3001\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u3067\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u52d5\u4f5c\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059<\/span>\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span id=\"3\"><span style=\"font-weight: 400;\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e3\u3064\u306e\u67f1\u3092\u7406\u89e3\u3057\u3088\u3046<\/span><\/span><\/h2>\n<p><img loading=\"lazy\" class=\"size-full wp-image-2764 aligncenter\" src=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-50.png\" alt=\"\" width=\"640\" height=\"427\" srcset=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-50.png 640w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-50-300x200.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3092\u652f\u3048\u308b3\u3064\u306e\u91cd\u8981\u306a\u6982\u5ff5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span id=\"Encapsulation\"><span style=\"font-weight: 400;\">\u30ab\u30d7\u30bb\u30eb\u5316\uff08Encapsulation\uff09<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400;\"><span style=\"text-decoration: underline;\">\u30c7\u30fc\u30bf\u3068\u51e6\u7406\u3092\u3072\u3068\u3064\u306e\u30af\u30e9\u30b9\u306b\u307e\u3068\u3081\u308b\u3053\u3068\u3067\u3001\u5916\u90e8\u304b\u3089\u5185\u90e8\u69cb\u9020\u3092\u96a0\u3057\u3001\u5b89\u5168\u6027\u3068\u4fdd\u5b88\u6027\u3092\u9ad8\u3081\u307e\u3059<\/span>\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class BankAccount:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def __init__(self, owner, balance=0):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.__owner = owner<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.__balance = balance<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def deposit(self, amount):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.__balance += amount<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def get_balance(self):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return self.__balance<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">__balance \u306e\u3088\u3046\u306b\u30a2\u30f3\u30c0\u30fc\u30b9\u30b3\u30a22\u3064\u3092\u4ed8\u3051\u308b\u3053\u3068\u3067\u3001\u5916\u90e8\u304b\u3089\u306e\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3092\u9632\u304e\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span id=\"Inheritance\"><span style=\"font-weight: 400;\">\u7d99\u627f\uff08Inheritance\uff09<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400;\"><span style=\"text-decoration: underline;\">\u65e2\u5b58\u306e\u30af\u30e9\u30b9\uff08\u89aa\u30af\u30e9\u30b9\uff09\u306e\u6a5f\u80fd\u3092\u3001\u65b0\u3057\u3044\u30af\u30e9\u30b9\uff08\u5b50\u30af\u30e9\u30b9\uff09\u306b\u5f15\u304d\u7d99\u3050\u4ed5\u7d44\u307f\u3067\u3059<\/span>\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Animal:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def speak(self):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(&#8220;\u4f55\u304b\u304c\u9cf4\u3044\u3066\u3044\u307e\u3059&#8221;)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Cat(Animal):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def speak(self):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(&#8220;\u30cb\u30e3\u30fc\uff01&#8221;)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">cat = Cat()<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">cat.speak()<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u51fa\u529b\uff1a<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u30cb\u30e3\u30fc\uff01<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u89aa\u30af\u30e9\u30b9\u306e\u6a5f\u80fd\u3092\u518d\u5229\u7528\u3057\u3064\u3064\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u4e0a\u66f8\u304d\uff08\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\uff09\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span id=\"Polymorphism\"><span style=\"font-weight: 400;\">\u591a\u614b\u6027\uff08Polymorphism\uff09<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400;\"><span style=\"text-decoration: underline;\">\u540c\u3058\u30e1\u30bd\u30c3\u30c9\u540d\u3067\u3082\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7a2e\u985e\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u52d5\u4f5c\u3092\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3059<\/span>\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Dog(Animal):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def speak(self):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0print(&#8220;\u30ef\u30f3\u30ef\u30f3\uff01&#8221;)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">animals = [Cat(), Dog()]<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">for a in animals:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0a.speak()<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u51fa\u529b\uff1a<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u30cb\u30e3\u30fc\uff01<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u30ef\u30f3\u30ef\u30f3\uff01<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u3088\u3046\u306b\u3001\u540c\u3058 speak() \u30e1\u30bd\u30c3\u30c9\u3067\u3082\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7a2e\u985e\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u52d5\u4f5c\u3092\u3057\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span id=\"AI\"><span style=\"font-weight: 400;\">\u5b9f\u52d9\u3067\u306e\u6d3b\u7528\u4f8b\uff1a\u30c7\u30fc\u30bf\u5206\u6790\u3084AI\u958b\u767a\u306b\u304a\u3051\u308b\u30af\u30e9\u30b9\u8a2d\u8a08<\/span><\/span><\/h2>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2767 aligncenter\" src=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-53.png\" alt=\"\" width=\"640\" height=\"427\" srcset=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-53.png 640w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-53-300x200.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306f\u3001\u5b9f\u52d9\u3067\u3082\u975e\u5e38\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u4f8b\u3048\u3070\u3001\u682a\u4fa1\u30c7\u30fc\u30bf\u3092\u6271\u3046\u5834\u5408\uff1a<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Stock:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def __init__(self, symbol, prices):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.symbol = symbol<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.prices = prices<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def average(self):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return sum(self.prices) \/ len(self.prices)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">stocks = [<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0Stock(&#8220;AAPL&#8221;, [180, 182, 179]),<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0Stock(&#8220;GOOG&#8221;, [125, 128, 126])<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">]<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">for stock in stocks:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0print(f&#8221;{stock.symbol}: \u5e73\u5747\u4fa1\u683c = {stock.average():.2f}&#8221;)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u51fa\u529b\uff1a<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">AAPL: \u5e73\u5747\u4fa1\u683c = 180.33<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">GOOG: \u5e73\u5747\u4fa1\u683c = 126.33<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u3088\u3046\u306b\u3001<span style=\"text-decoration: underline;\">\u30c7\u30fc\u30bf\u3068\u51e6\u7406\u3092\u3072\u3068\u3064\u306b\u307e\u3068\u3081\u308b\u3053\u3068\u3067\u3001\u30b3\u30fc\u30c9\u306e\u898b\u901a\u3057\u304c\u826f\u304f\u306a\u308a\u3001\u518d\u5229\u7528\u6027\u3082\u9ad8\u307e\u308a\u307e\u3059<\/span>\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>\u95a2\u6570\u578b\u3068\u306e\u9055\u3044\u3092\u6bd4\u8f03\u3057\u3066\u307f\u3088\u3046<\/b><\/p>\n<table style=\"width: 74.573495%;\">\n<tbody>\n<tr>\n<td style=\"width: 15.489749%; text-align: center;\"><b>\u6bd4\u8f03\u9805\u76ee<\/b><\/td>\n<td style=\"width: 37.585421%; text-align: center;\"><b>\u95a2\u6570\u578b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0<\/b><\/td>\n<td style=\"width: 132.528758%; text-align: center;\"><b>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411<\/b><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.489749%; text-align: center;\"><span style=\"font-weight: 400;\">\u69cb\u9020<\/span><\/td>\n<td style=\"width: 37.585421%; text-align: center;\"><span style=\"font-weight: 400;\">\u30c7\u30fc\u30bf\u3068\u51e6\u7406\u304c\u5206\u96e2<\/span><\/td>\n<td style=\"width: 132.528758%; text-align: center;\"><span style=\"font-weight: 400;\">\u30c7\u30fc\u30bf\u3068\u51e6\u7406\u304c\u4e00\u4f53\u5316<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.489749%; text-align: center;\"><span style=\"font-weight: 400;\">\u518d\u5229\u7528\u6027<\/span><\/td>\n<td style=\"width: 37.585421%; text-align: center;\"><span style=\"font-weight: 400;\">\u95a2\u6570\u5358\u4f4d\u3067\u518d\u5229\u7528<\/span><\/td>\n<td style=\"width: 132.528758%; text-align: center;\"><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u5358\u4f4d\u3067\u518d\u5229\u7528<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.489749%; text-align: center;\"><span style=\"font-weight: 400;\">\u62e1\u5f35\u6027<\/span><\/td>\n<td style=\"width: 37.585421%; text-align: center;\"><span style=\"font-weight: 400;\">\u624b\u52d5\u3067\u8ffd\u52a0\u304c\u5fc5\u8981<\/span><\/td>\n<td style=\"width: 132.528758%; text-align: center;\"><span style=\"font-weight: 400;\">\u7d99\u627f\u30fb\u591a\u614b\u6027\u3067\u67d4\u8edf\u306b\u5bfe\u5fdc<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.489749%; text-align: center;\"><span style=\"font-weight: 400;\">\u898f\u6a21\u611f<\/span><\/td>\n<td style=\"width: 37.585421%; text-align: center;\"><span style=\"font-weight: 400;\">\u5c0f\u898f\u6a21\u5411\u304d<\/span><\/td>\n<td style=\"width: 132.528758%; text-align: center;\"><span style=\"font-weight: 400;\">\u4e2d\uff5e\u5927\u898f\u6a21\u958b\u767a\u306b\u6700\u9069<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u7279\u306b\u30c1\u30fc\u30e0\u958b\u767a\u3084\u9577\u671f\u904b\u7528\u3092\u524d\u63d0\u3068\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u8a2d\u8a08\u304c\u4e0d\u53ef\u6b20\u3067\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span id=\"QA\"><span style=\"font-weight: 400;\">\u3088\u304f\u3042\u308b\u8cea\u554f\uff08<\/span><b>Q&amp;A\uff09<\/b><\/span><\/h2>\n<p><img loading=\"lazy\" class=\"size-full wp-image-2770 aligncenter\" src=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-54.png\" alt=\"\" width=\"640\" height=\"427\" srcset=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-54.png 640w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-54-300x200.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h3><\/h3>\n<h3><span id=\"i-2\"><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u3092\u4f7f\u3046\u3068\u51e6\u7406\u901f\u5ea6\u304c\u843d\u3061\u307e\u305b\u3093\u304b<\/span><\/span><\/h3>\n<p>\u901a\u5e38\u306e\u958b\u767a\u898f\u6a21\u3067\u3042\u308c\u3070\u3001\u30af\u30e9\u30b9\u3092\u4f7f\u3063\u3066\u3082\u51e6\u7406\u901f\u5ea6\u306b\u5927\u304d\u306a\u5f71\u97ff\u306f\u3042\u308a\u307e\u305b\u3093<b>\u3002<\/b><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u306f\u3042\u304f\u307e\u3067\u69cb\u9020\u3092\u6574\u7406\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3042\u308a\u3001Python\u306e\u5b9f\u884c\u901f\u5ea6\u3092\u5927\u304d\u304f\u5de6\u53f3\u3059\u308b\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3080\u3057\u308d\u3001\u30af\u30e9\u30b9\u3092\u4f7f\u3046\u3053\u3068\u3067\u30b3\u30fc\u30c9\u304c\u30b9\u30c3\u30ad\u30ea\u3068\u6574\u7406\u3055\u308c\u3001\u4fdd\u5b88\u6027\uff08\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u306e\u3057\u3084\u3059\u3055\uff09\u3084\u62e1\u5f35\u6027\uff08\u65b0\u3057\u3044\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u3084\u3059\u3044\u69cb\u9020\uff09\u304c\u5927\u304d\u304f\u5411\u4e0a\u3057\u307e\u3059\u3002\u7d50\u679c\u7684\u306b\u3001\u30c1\u30fc\u30e0\u958b\u767a\u3084\u9577\u671f\u904b\u7528\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001\u30af\u30e9\u30b9\u3092\u4f7f\u3063\u305f\u65b9\u304c\u30c8\u30fc\u30bf\u30eb\u306e\u958b\u767a\u52b9\u7387\u306f\u9ad8\u304f\u306a\u308b\u3053\u3068\u304c\u307b\u3068\u3093\u3069\u3067\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span id=\"i-3\"><span style=\"font-weight: 400;\">\u30af\u30e9\u30b9\u3068\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u9055\u3044\u306f<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">\u3069\u3061\u3089\u3082\u6a5f\u80fd\u3092\u307e\u3068\u3081\u308b\u4ed5\u7d44\u307f\u3060\u304b\u3089\u540c\u3058\u3067\u306f\uff1f<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3068\u601d\u3046\u65b9\u3082\u591a\u3044\u3067\u3059\u304c\u3001\u5b9f\u306f<\/span>\u5f79\u5272\u306e\u30b9\u30b3\u30fc\u30d7\uff08\u7bc4\u56f2\uff09\u304c\u7570\u306a\u308a\u307e\u3059<b>\u3002<\/b><\/p>\n<p>&nbsp;<\/p>\n<p><b>\u30fb<\/b><strong>\u30e2\u30b8\u30e5\u30fc\u30eb\uff08module\uff09<\/strong><span style=\"font-weight: 400;\"><strong> \u306f\u3001\u300c\u30d5\u30a1\u30a4\u30eb\u5358\u4f4d\u300d\u3067\u6a5f\u80fd\u3092\u307e\u3068\u3081\u308b\u4ed5\u7d44\u307f\u3067\u3059<\/strong>\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u4f8b\uff1apreprocessing.py \u3084 model.py \u306e\u3088\u3046\u306a1\u30d5\u30a1\u30a4\u30eb\u306b\u51e6\u7406\u3092\u6574\u7406\u3057\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>\u30fb<\/b><strong>\u30af\u30e9\u30b9\uff08class\uff09<\/strong><span style=\"font-weight: 400;\"><strong> \u306f\u3001\u300c\u30c7\u30fc\u30bf\u69cb\u9020\u5358\u4f4d\u300d\u3067\u6a5f\u80fd\u3092\u307e\u3068\u3081\u307e\u3059<\/strong>\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u4f8b\uff1aPreprocessor \u30af\u30e9\u30b9\u3084 ModelTrainer \u30af\u30e9\u30b9\u306a\u3069\u30011\u3064\u306e\u76ee\u7684\u3084\u6982\u5ff5\u306b\u57fa\u3065\u3044\u3066\u8a2d\u8a08\u3057\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\"><strong><span style=\"color: #ff0000;\">\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30d5\u30a1\u30a4\u30eb\u3067\u307e\u3068\u3081\u308b\u7bb1<\/span><\/strong>\u3001<strong><span style=\"color: #ff0000;\">\u30af\u30e9\u30b9\u306f\u6a5f\u80fd\u3092\u6301\u3064\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u8a08\u56f3<\/span><\/strong>\u3068\u3044\u3046\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002\u3053\u306e\u9055\u3044\u3092\u7406\u89e3\u3057\u3066\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u6574\u7406\u3055\u308c\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u69cb\u6210\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span id=\"dataclass\"><span style=\"font-weight: 400;\">\u30c7\u30fc\u30bf\u30af\u30e9\u30b9\uff08@dataclass\uff09\u3068\u306f<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Python 3.7\u4ee5\u964d\u3067\u306f\u3001<\/span><span style=\"font-weight: 400;\">@dataclass<\/span><span style=\"font-weight: 400;\"> \u3068\u3044\u3046\u4fbf\u5229\u306a\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001<\/span><span style=\"color: #ff0000;\"><b>\u5c5e\u6027\uff08\u30c7\u30fc\u30bf\uff09\u4e2d\u5fc3\u306e\u30af\u30e9\u30b9\u3092\u7c21\u5358\u306b\u5b9a\u7fa9\u3067\u304d\u308b\u69cb\u6587<\/b><\/span><span style=\"font-weight: 400;\">\u3067\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u4f8b\u3048\u3070\u3001\u6b21\u306e\u3088\u3046\u306b\u5ea7\u6a19\uff08x, y\uff09\u3092\u6271\u3046\u30af\u30e9\u30b9\u3092\u4f5c\u308a\u305f\u3044\u3068\u304d\u3001\u901a\u5e38\u306f<\/span><span style=\"font-weight: 400;\">__init__<\/span><span style=\"font-weight: 400;\">\u30e1\u30bd\u30c3\u30c9\u3092\u81ea\u5206\u3067\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Point:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def __init__(self, x, y):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.x = x<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.y = y<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">@dataclass<\/span><span style=\"font-weight: 400;\">\u3092\u4f7f\u3046\u3068\u3001\u308f\u305a\u304b\u6570\u884c\u3067\u540c\u3058\u3053\u3068\u304c\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">from dataclasses import dataclass<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">@dataclass<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Point:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0x: int<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0y: int<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u308c\u3060\u3051\u3067\u3001\u81ea\u52d5\u7684\u306b\u521d\u671f\u5316\u51e6\u7406\u3084\u8868\u793a\u30e1\u30bd\u30c3\u30c9\uff08<\/span><span style=\"font-weight: 400;\">__repr__<\/span><span style=\"font-weight: 400;\">\uff09\u306a\u3069\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30af\u30e9\u30b9\u3092\u4f7f\u3048\u3070\u3001<\/span>\u30c7\u30fc\u30bf\u306e\u5b9a\u7fa9\u306b\u96c6\u4e2d\u3067\u304d\u3001\u4f59\u8a08\u306a\u30b3\u30fc\u30c9\u3092\u7701\u7565\u3067\u304d\u308b<span style=\"font-weight: 400;\">\u305f\u3081\u3001AI\u958b\u767a\u306a\u3069\u3067\u6271\u3046\u8a2d\u5b9a\u60c5\u5831\u3084\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6574\u7406\u3059\u308b\u306e\u306b\u3082\u6700\u9069\u3067\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span id=\"AI-2\"><span style=\"font-weight: 400;\">AI\u958b\u767a\u306b\u304a\u3051\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u6d3b\u7528\u4f8b<\/span><\/span><\/h2>\n<p><img loading=\"lazy\" class=\"size-full wp-image-2772 aligncenter\" src=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-55.png\" alt=\"\" width=\"640\" height=\"427\" srcset=\"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-55.png 640w, https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT-_ASIA-55-300x200.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u6a5f\u68b0\u5b66\u7fd2\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30af\u30e9\u30b9\u8a2d\u8a08\u304c\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">class Preprocessor:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def __init__(self, stopwords):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0self.stopwords = stopwords<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0def clean(self, text):<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0for word in self.stopwords:<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0text = text.replace(word, &#8220;&#8221;)<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return text<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u3053\u306e\u3088\u3046\u306b\u3001\u524d\u51e6\u7406\u3084\u30e2\u30c7\u30eb\u69cb\u7bc9\u3001\u8a55\u4fa1\u306a\u3069\u306e\u5404\u5de5\u7a0b\u3092\u30af\u30e9\u30b9\u3068\u3057\u3066\u5206\u96e2\u3059\u308b\u3053\u3068\u3067\u3001\u30b3\u30fc\u30c9\u306e\u518d\u5229\u7528\u6027\u304c\u9ad8\u307e\u308a\u3001\u30c1\u30fc\u30e0\u958b\u767a\u306b\u3082\u9069\u3057\u305f\u69cb\u9020\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span id=\"i-4\"><span style=\"font-weight: 400;\">\u307e\u3068\u3081<\/span><\/span><\/h2>\n<p>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u8003\u3048\u65b9\u3092\u8eab\u306b\u3064\u3051\u308b\u3053\u3068\u3067\u3001Python\u306f\u5358\u306a\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u3067\u306f\u306a\u304f\u3001\u30c1\u30fc\u30e0\u958b\u767a\u3084\u5927\u898f\u6a21\u30b7\u30b9\u30c6\u30e0\u306b\u3082\u5bfe\u5fdc\u3067\u304d\u308b\u300c\u672c\u683c\u7684\u306a\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3078\u3068\u5909\u308f\u308a\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u6700\u521d\u306f\u30af\u30e9\u30b9\u3084\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3068\u3044\u3063\u305f\u6982\u5ff5\u304c\u62bd\u8c61\u7684\u306b\u611f\u3058\u3089\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u5b9f\u969b\u306b\u624b\u3092\u52d5\u304b\u3057\u3066\u3044\u304f\u3046\u3061\u306b\u3001\u305d\u306e\u4fbf\u5229\u3055\u3068\u518d\u5229\u7528\u6027\u306e\u9ad8\u3055\u3092\u5b9f\u611f\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002\u3082\u3057\u300c\u5b9f\u969b\u306e\u958b\u767a\u3067\u3069\u3046\u8a2d\u8a08\u3059\u308c\u3070\u3088\u3044\u304b\u300d\u300c\u81ea\u793e\u306e\u30b7\u30b9\u30c6\u30e0\u306bPython\u3092\u5c0e\u5165\u3057\u305f\u3044\u300d\u306a\u3069\u3001\u3088\u308a\u5b9f\u8df5\u7684\u306a\u30b5\u30dd\u30fc\u30c8\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001\u305c\u3072\u304a\u6c17\u8efd\u306b<strong><em><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/softasia.jp\/#contact\">3ink<\/a><\/span><\/em><\/strong>\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u3042\u306a\u305f\u306e\u8ab2\u984c\u3084\u30a2\u30a4\u30c7\u30a2\u3092\u3082\u3068\u306b\u3001\u6700\u9069\u306aPython\u30b7\u30b9\u30c6\u30e0\u30fb\u30c4\u30fc\u30eb\u958b\u767a\u3092\u3054\u63d0\u6848\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Python\u3092\u5b66\u3073\u59cb\u3081\u305f\u3070\u304b\u308a\u306e\u65b9\u304c\u3001\u5fc5\u305a\u3068\u8a00\u3063\u3066\u3044\u3044\u307b\u3069\u3064\u307e\u305a\u304f\u306e\u304c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\uff08Object-Oriented Programming\uff1aOOP\uff09\u3068\u3044\u3046\u6982\u5ff5\u3067\u3059\u3002 &nbsp; \u300c\u95a2\u6570\u3068\u5909\u6570\u3060\u3051\u3067\u30b3\u30fc [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":2760,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[4,1,9],"tags":[],"jetpack_featured_media_url":"https:\/\/softasia.jp\/blog\/wp-content\/uploads\/2025\/10\/SOFT_ASIA_\u30a2\u30a4\u30ad\u30e3\u30c3\u30c1-1000-x-1000-px-4.png","_links":{"self":[{"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/posts\/2756"}],"collection":[{"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/comments?post=2756"}],"version-history":[{"count":16,"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/posts\/2756\/revisions"}],"predecessor-version":[{"id":2804,"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/posts\/2756\/revisions\/2804"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/media\/2760"}],"wp:attachment":[{"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/media?parent=2756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/categories?post=2756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softasia.jp\/blog\/wp-json\/wp\/v2\/tags?post=2756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}