<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Python on サブカル科学研究会のブログ</title>
    <link>https://www.subcul-science.com/tags/python/</link>
    <description>Recent content in Python on サブカル科学研究会のブログ</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 20 Apr 2026 21:00:00 +0900</lastBuildDate>
    <atom:link href="https://www.subcul-science.com/tags/python/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>StreamlitでChatGPTのUIを作る—LangChain ReActエージェントとGoogle検索の組み合わせ</title>
      <link>https://www.subcul-science.com/post/chatgpt-streamlit/</link>
      <pubDate>Mon, 20 Apr 2026 21:00:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/chatgpt-streamlit/</guid>
      <description>Streamlit と LangChain を組み合わせて、Google検索・Wikipedia検索ツールを持つ ChatGPT エージェントのWebUIを作りました。LangChain の ReAct（Reason + Act）エージェントが自律的にツールを選択して質問に答えます。</description>
    </item>
    <item>
      <title>EasyOCRで日本語画像をテキスト化—セットアップから実運用まで</title>
      <link>https://www.subcul-science.com/post/ocr/</link>
      <pubDate>Mon, 20 Apr 2026 20:00:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/ocr/</guid>
      <description>EasyOCRを使ってJPEG画像から日本語テキストを抽出するスクリプトを作りました。フォルダにまとめて置いた画像を一括処理し、テキストファイルに書き出します。日本語OCRの精度と前処理のコツも解説します。</description>
    </item>
    <item>
      <title>GradioでAI水平思考クイズを作ってHugging Face Spacesにデプロイした話</title>
      <link>https://www.subcul-science.com/post/umigame-chat/</link>
      <pubDate>Mon, 20 Apr 2026 19:00:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/umigame-chat/</guid>
      <description>水平思考クイズ（海亀スープ）のAI GMをGradioで作りました。Cohere の command-r-plus モデルが「はい」「いいえ」「わからない」で答えるGMを担当し、CSVで問題を管理します。Hugging Face Spacesに無料でデプロイしています。</description>
    </item>
    <item>
      <title>Xのタイムラインを自動要約！FastAPI &#43; LLMで作るトピックダイジェストシステムの設計</title>
      <link>https://www.subcul-science.com/post/topic-digestx/</link>
      <pubDate>Mon, 20 Apr 2026 18:00:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/topic-digestx/</guid>
      <description>関心のあるトピック（キーワード）を登録すると、X（Twitter）の関連ツイートを収集しLLMで要約するWebアプリ「TopicDigestX」の設計を紹介します。FastAPI + SQLAlchemy + React + Viteの構成で、Docker Composeで手軽に起動できます。</description>
    </item>
    <item>
      <title>Apple SiliconでLLMをファインチューニング！MLX &#43; LoRAで日本語読解モデルを自作する方法</title>
      <link>https://www.subcul-science.com/post/ft-llm/</link>
      <pubDate>Mon, 20 Apr 2026 16:00:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/ft-llm/</guid>
      <description>LiquidAI の LFM2.5-1.2B-JP モデルを Apple Silicon の MLX フレームワークで LoRA ファインチューニングするパイプラインを構築しました。JsQuAD（日本語読解）データセットで学習し、カスタム Chunked Loss と早期停止も実装しています。</description>
    </item>
    <item>
      <title>バンドのセットリストをAIで自動生成！OR-Tools TSPで転換コストを最小化する方法</title>
      <link>https://www.subcul-science.com/post/setlist-automation/</link>
      <pubDate>Mon, 20 Apr 2026 15:00:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/setlist-automation/</guid>
      <description>バンド「Luke Avenue」のセットリスト作成を自動化するスクリプトを開発しました。OR-ToolsのTSP（巡回セールスマン問題）ソルバーで、メンバー交代によるパート転換コストを最小化した最適な曲順を自動生成します。YouTube APIで曲の長さも自動取得します。</description>
    </item>
    <item>
      <title>声を学習してテキスト読み上げ！TADAで作る日本語ボイスクローンTTSシステム</title>
      <link>https://www.subcul-science.com/post/tts/</link>
      <pubDate>Mon, 20 Apr 2026 14:00:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/tts/</guid>
      <description>HumeAIのTADA（Text-Acoustic Dual Alignment）を使って、参照音声の声質でテキストを読み上げるボイスクローンTTSシステムを構築しました。FastAPIサーバーとCLIツールで構成し、日本語の読み上げに対応しています。</description>
    </item>
    <item>
      <title>配信録画を自動で分割！FFmpegのsilencedetectで作る動画分割Webアプリ</title>
      <link>https://www.subcul-science.com/post/jam-slicer/</link>
      <pubDate>Mon, 20 Apr 2026 09:00:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/jam-slicer/</guid>
      <description>FFmpegのsilencedetect フィルターを使って動画を無音区間で自動分割する Webアプリ「JamSlicer」を開発しました。従来の librosa/moviepy 実装と比べてメモリ使用量を 1/100 以下に抑えつつ、分割速度を10〜20倍に向上させた実装を解説します。</description>
    </item>
    <item>
      <title>How to Efficiently Solve Low Accuracy and High Cost Issues in Japanese Text Generation with T5</title>
      <link>https://www.subcul-science.com/post/20250705japanese-text-generation-solution/</link>
      <pubDate>Sat, 05 Jul 2025 21:00:38 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20250705japanese-text-generation-solution/</guid>
      <description>&lt;h2 id=&#34;challenges-in-japanese-text-generation&#34;&gt;Challenges in Japanese Text Generation&lt;/h2&gt;&#xA;&lt;p&gt;When working on Japanese text summarization, title generation, and document classification tasks, do you face these problems?&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-accuracy-issues&#34;&gt;1. Accuracy Issues&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Traditional rule-based methods cannot generate natural Japanese text&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;English-oriented models cannot handle Japanese grammar and expressions&lt;/li&gt;&#xA;&lt;li&gt;Need to build separate models for multiple tasks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;2-development-cost-issues&#34;&gt;2. Development Cost Issues&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Time and resources required for task-specific model development&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Different approaches needed for document classification, summarization, and title generation&lt;/li&gt;&#xA;&lt;li&gt;Enormous effort required for preparing training data and building models&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;3-operational-complexity&#34;&gt;3. Operational Complexity&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Need to manage and operate multiple models&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;Different APIs and interfaces for each task&lt;/li&gt;&#xA;&lt;li&gt;Complex model updates and maintenance&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;real-world-text-generation-challenge-cases&#34;&gt;Real-world Text Generation Challenge Cases&lt;/h2&gt;&#xA;&lt;h3 id=&#34;failure-case-limitations-of-task-specific-individual-development&#34;&gt;Failure Case: Limitations of Task-specific Individual Development&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Traditional approach&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;classification_model&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;load_bert_classifier&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;      &lt;span class=&#34;c1&#34;&gt;# For document classification&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;summarization_model&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;load_summarization_model&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;   &lt;span class=&#34;c1&#34;&gt;# For summarization&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;title_generation_model&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;load_title_model&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;        &lt;span class=&#34;c1&#34;&gt;# For title generation&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Problems:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# - Managing 3 separate models&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# - 3x memory usage&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# - High development and maintenance costs&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The solution to this problem is &lt;strong&gt;Japanese T5 (Text-To-Text Transfer Transformer)&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>日本語文書の意味的類似度計算が遅い・精度が低い問題をSentence BERTで解決する方法</title>
      <link>https://www.subcul-science.com/post/20250705document-similarity-solution/</link>
      <pubDate>Sat, 05 Jul 2025 20:32:15 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20250705document-similarity-solution/</guid>
      <description>&lt;h2 id=&#34;文書類似度計算で直面する課題&#34;&gt;文書類似度計算で直面する課題&lt;/h2&gt;&#xA;&lt;p&gt;日本語の文書検索や推薦システムを構築する際、以下のような問題に直面していませんか？&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-精度の問題&#34;&gt;1. 精度の問題&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;単語レベルの一致だけでは文書の意味的類似度を正確に測れない&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;同じ意味でも表現が異なる文書を関連文書として発見できない&lt;/li&gt;&#xA;&lt;li&gt;従来のTF-IDFやBM25では意味的な類似度が取得できない&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;2-計算速度の問題&#34;&gt;2. 計算速度の問題&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;BERTモデルで毎回文書をエンコードすると時間がかかりすぎる&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;大量の文書との類似度計算がリアルタイムで実行できない&lt;/li&gt;&#xA;&lt;li&gt;文書検索のレスポンス時間が数秒〜数十秒かかる&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;3-日本語対応の問題&#34;&gt;3. 日本語対応の問題&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;英語向けのモデルでは日本語の意味的類似度が正確に取得できない&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;日本語特有の表現や文法構造に対応していない&lt;/li&gt;&#xA;&lt;li&gt;カスタムモデルの構築が困難&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;実際に遭遇した文書類似度の課題事例&#34;&gt;実際に遭遇した文書類似度の課題事例&lt;/h2&gt;&#xA;&lt;h3 id=&#34;失敗事例従来手法での限界&#34;&gt;失敗事例：従来手法での限界&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# TF-IDFによる類似度計算の例&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sklearn.feature_extraction.text&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;TfidfVectorizer&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sklearn.metrics.pairwise&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;cosine_similarity&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 以下のような文書では類似度が正しく計算されない&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;doc1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;機械学習の精度を向上させる方法&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;doc2&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;AIモデルの性能を改善する手法&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 結果: 低い類似度（単語が異なるため）&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# BERTの直接利用も計算コストが高い&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 毎回エンコードが必要で、大量データに不向き&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;この問題を解決するのが**&lt;a href=&#34;https://github.com/UKPLab/sentence-transformers&#34;&gt;Sentence BERT&lt;/a&gt;**です。&lt;/p&gt;</description>
    </item>
    <item>
      <title>文書分類の精度・速度・導入コストの三重苦をFasttextで一気に解決する戦略</title>
      <link>https://www.subcul-science.com/post/20250705document-classification-solution/</link>
      <pubDate>Sat, 05 Jul 2025 20:28:41 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20250705document-classification-solution/</guid>
      <description>&lt;h2 id=&#34;文書分類で直面する三重苦&#34;&gt;文書分類で直面する三重苦&lt;/h2&gt;&#xA;&lt;p&gt;文書分類プロジェクトに取り組む際、以下のような問題に直面していませんか？&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-精度の問題&#34;&gt;1. 精度の問題&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;既存の手法では十分な精度が出ない&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;複雑なディープラーニングモデルでも期待した結果が得られない&lt;/li&gt;&#xA;&lt;li&gt;データセットによって性能が大きく左右される&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;2-速度の問題&#34;&gt;2. 速度の問題&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;学習時間が長すぎてイテレーションが回せない&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;GPUリソースが必要で開発コストが高い&lt;/li&gt;&#xA;&lt;li&gt;本格的なモデル訓練に数時間〜数日かかる&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;3-導入コストの問題&#34;&gt;3. 導入コストの問題&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;複雑なモデルの構築・運用が困難&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;環境構築が複雑で他のメンバーに共有できない&lt;/li&gt;&#xA;&lt;li&gt;プロトタイプ作成に時間がかかりすぎる&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;実際に遭遇した文書分類の課題事例&#34;&gt;実際に遭遇した文書分類の課題事例&lt;/h2&gt;&#xA;&lt;h3 id=&#34;失敗事例複雑なモデルでの挫折&#34;&gt;失敗事例：複雑なモデルでの挫折&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# NeuralClassifierを使った事例&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 複雑な設定ファイルが必要&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# GPU環境の準備が必要  &lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# 結果：精度が期待値以下、学習時間が長い&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;このような状況で、&lt;strong&gt;&lt;a href=&#34;https://research.facebook.com/&#34;&gt;Facebook Research&lt;/a&gt;が公開する&lt;a href=&#34;https://fasttext.cc/&#34;&gt;Fasttext&lt;/a&gt;ライブラリ&lt;/strong&gt;が解決策として注目されています。&lt;/p&gt;</description>
    </item>
    <item>
      <title>機械学習実験が管理できず再現性がない問題をMLflowで体系的に解決する方法</title>
      <link>https://www.subcul-science.com/post/20250705ml-experiment-chaos-solution/</link>
      <pubDate>Sat, 05 Jul 2025 20:23:24 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20250705ml-experiment-chaos-solution/</guid>
      <description>&lt;h2 id=&#34;機械学習実験で直面する再現性の課題&#34;&gt;機械学習実験で直面する再現性の課題&lt;/h2&gt;&#xA;&lt;p&gt;機械学習の実験を繰り返していると、以下のような問題に直面することがありませんか？&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;良い結果が出たモデルのパラメータを忘れてしまう&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;過去の実験結果を比較できず、改善が進まない&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;チームメンバーと実験結果を共有できない&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;同じ実験を再実行しても結果が再現できない&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;これらの問題は、機械学習の実践が「ある種の黒魔術」となってしまう原因でもあります。&lt;/p&gt;</description>
    </item>
    <item>
      <title>キーワード検索では見つからない関連文書を発見する方法</title>
      <link>https://www.subcul-science.com/post/20250620document-similarity-solution/</link>
      <pubDate>Fri, 20 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.subcul-science.com/post/20250620document-similarity-solution/</guid>
      <description>&lt;h2 id=&#34;問題なぜキーワード検索では欲しい文書が見つからないのか&#34;&gt;問題：なぜキーワード検索では欲しい文書が見つからないのか&lt;/h2&gt;&#xA;&lt;p&gt;社内の膨大な文書データベースから「機械学習の性能向上に関する文書」を探しているとします。キーワード検索で「機械学習」「性能向上」と入力しても、本当に必要な文書が見つからない経験はありませんか？&lt;/p&gt;</description>
    </item>
    <item>
      <title>少ないデータで高精度な文書分類を実現する戦略</title>
      <link>https://www.subcul-science.com/post/20250620limited-data-classification/</link>
      <pubDate>Fri, 20 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.subcul-science.com/post/20250620limited-data-classification/</guid>
      <description>&lt;h2 id=&#34;問題なぜ実際のプロジェクトでは十分なデータが集まらないのか&#34;&gt;問題：なぜ実際のプロジェクトでは十分なデータが集まらないのか&lt;/h2&gt;&#xA;&lt;p&gt;「ニュース記事を『政治・経済・スポーツ・エンタメ』に自動分類したい。でも各カテゴリ30件ずつしかラベル付きデータがない&amp;hellip;」&lt;/p&gt;&#xA;&lt;p&gt;機械学習の教科書では数万件のデータセットが当たり前ですが、実際のビジネス現場では全く異なります。&lt;/p&gt;</description>
    </item>
    <item>
      <title>日本語自然言語処理で直面する現実的な課題と解決策</title>
      <link>https://www.subcul-science.com/post/20250620japanese-nlp-challenges/</link>
      <pubDate>Fri, 20 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.subcul-science.com/post/20250620japanese-nlp-challenges/</guid>
      <description>&lt;h2 id=&#34;問題なぜ日本語のテキスト処理は難しいのか&#34;&gt;問題：なぜ日本語のテキスト処理は難しいのか&lt;/h2&gt;&#xA;&lt;p&gt;「英語のNLPライブラリを日本語に適用したら、全然うまくいかない&amp;hellip;」&lt;/p&gt;&#xA;&lt;p&gt;日本語の自然言語処理は、英語中心に設計されたツールでは対応できない独特な課題が多数存在します。&lt;/p&gt;</description>
    </item>
    <item>
      <title>機械学習実験の混乱を解決する：再現できない結果との戦い</title>
      <link>https://www.subcul-science.com/post/20250620ml-experiment-chaos-solution/</link>
      <pubDate>Fri, 20 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.subcul-science.com/post/20250620ml-experiment-chaos-solution/</guid>
      <description>&lt;h2 id=&#34;問題なぜ機械学習の実験結果が再現できないのか&#34;&gt;問題：なぜ機械学習の実験結果が再現できないのか&lt;/h2&gt;&#xA;&lt;p&gt;「先週良い結果が出たモデルがあったんだけど、どのパラメータを使ったか覚えてる？」&lt;/p&gt;&#xA;&lt;p&gt;機械学習プロジェクトでこんな会話を聞いたことはありませんか？多くのチームが直面する典型的な問題です。&lt;/p&gt;</description>
    </item>
    <item>
      <title>ctranslate2でpytorchがimportできないエラーが出たので回避方法メモ</title>
      <link>https://www.subcul-science.com/post/20230818ctranslate2/</link>
      <pubDate>Fri, 18 Aug 2023 16:23:27 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20230818ctranslate2/</guid>
      <description>&lt;h2 id=&#34;公式のインストール方法&#34;&gt;公式のインストール方法&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;pip install ctranslate2&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/OpenNMT/CTranslate2&#34;&gt;CTranslate2（GitHub）&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;macでは上手く動作しない&#34;&gt;Macでは上手く動作しない&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;segmentatioin fault&lt;/code&gt;になった。&lt;/p&gt;&#xA;&lt;p&gt;しかしlinuxでは動作するとの情報を得た。&#xA;なのでまずはMacの中でDocker環境を構築して問題を回避できないか確認しようとした。&lt;/p&gt;</description>
    </item>
    <item>
      <title>pysenをインストールするとmypy周りで他のライブラリがエラーになる</title>
      <link>https://www.subcul-science.com/post/20230618pysen/</link>
      <pubDate>Sun, 18 Jun 2023 01:53:52 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20230618pysen/</guid>
      <description>&lt;h2 id=&#34;pysenhttpsgithubcompfnetpysenが入っていたらlangchainhttpspythonlangchaincomと依存関係がバッティングする&#34;&gt;&lt;a href=&#34;https://github.com/pfnet/pysen&#34;&gt;pysen&lt;/a&gt;が入っていたら&lt;a href=&#34;https://python.langchain.com/&#34;&gt;LangChain&lt;/a&gt;と依存関係がバッティングする？&lt;/h2&gt;&#xA;&lt;h2 id=&#34;環境&#34;&gt;環境&lt;/h2&gt;&#xA;&lt;p&gt;Mac OS&#xA;poetry&#xA;python == 3.9&lt;/p&gt;&#xA;&lt;h2 id=&#34;langchainのインストールに失敗する&#34;&gt;LangChainのインストールに失敗する&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;poetry add langchain&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;が失敗する&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-py&#34; data-lang=&#34;py&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;CLANG&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;〜&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;C言語関係のエラーかと思われた。&lt;/p&gt;&#xA;&lt;p&gt;なんだっけ&lt;/p&gt;&#xA;&lt;p&gt;xcode-toolsのインストールとアップデート&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pip install --update pip&#xA;pip install --upgrade setuptools&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;mypyのバージョンによるエラーらしい&lt;/p&gt;</description>
    </item>
    <item>
      <title>poetry環境でpytorchをインストールしても失敗したのでその対処法</title>
      <link>https://www.subcul-science.com/post/20230607poetrytorch/</link>
      <pubDate>Wed, 07 Jun 2023 05:47:12 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20230607poetrytorch/</guid>
      <description>&lt;h2 id=&#34;poetry-add-torch-でパスが通らない&#34;&gt;&lt;code&gt;poetry add torch&lt;/code&gt; でパスが通らない&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dcokerfile＋&lt;a href=&#34;https://python-poetry.org/&#34;&gt;Poetry&lt;/a&gt;で環境構築をしていた&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;poetry add torch&lt;/code&gt;でpytorchをインストールした&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;import torch&lt;/code&gt;でエラー&lt;/li&gt;&#xA;&lt;li&gt;cuda周りのパスが通っていないらしい&lt;/li&gt;&#xA;&lt;li&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;対処法&#34;&gt;対処法&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;poetry run python -m pip install torch&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;poetry.tomlに記述することもできるらしい&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;機械学習の基礎からモデルの仕組みまで体系的に学びたい方へ&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>日本語要約の手法・サービスのまとめ</title>
      <link>https://www.subcul-science.com/post/20220309summarize-matome/</link>
      <pubDate>Wed, 09 Mar 2022 14:51:58 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20220309summarize-matome/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;日本語文章の自動要約について調べたのでまとめておく&lt;/li&gt;&#xA;&lt;li&gt;原文から一部を選択的に抜粋する抽出型と機械翻訳のように対応する要約文を生成する生成型がある&lt;/li&gt;&#xA;&lt;li&gt;またウェブで公開されている要約サービスもある&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;生成型要約&#34;&gt;生成型要約&lt;/h2&gt;&#xA;&lt;h3 id=&#34;モデル&#34;&gt;モデル&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DNN　言語モデル&#xA;&lt;ul&gt;&#xA;&lt;li&gt;BERTの文脈から派生した要約手法が多い&lt;/li&gt;&#xA;&lt;li&gt;BART&#xA;&lt;ul&gt;&#xA;&lt;li&gt;BERTから文の要約に特化して派生したもの&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20210119huggingface/&#34;&gt;BART(文章要約モデル)&lt;/a&gt;は日本語に対応していない&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;T5&#xA;&lt;ul&gt;&#xA;&lt;li&gt;学習をすべて自然言語で設定して行うことで複数のタスクへと柔軟に対応する、というコンセプトのモデル&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20210701t5/&#34;&gt;T5がhugging face で公開&lt;/a&gt;されたモデルをファインチューニングして使うことが割と手軽にできた&lt;/li&gt;&#xA;&lt;li&gt;要約だけでなく単語の分散表現を得ることにも使える&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;整数計画問題&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ソルバーで厳密に解くことができる&#xA;&lt;ul&gt;&#xA;&lt;li&gt;無償のソルバーはpythonだと&lt;a href=&#34;https://coin-or.github.io/pulp/index.html&#34;&gt;pulp&lt;/a&gt;, &lt;a href=&#34;https://www.python-mip.com/&#34;&gt;Python-MIP&lt;/a&gt;が選択肢になる&lt;/li&gt;&#xA;&lt;li&gt;式を記述する際の挙動の軽さから私はPython-MIPを勧める&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;制約条件として文の数、文字数を指定できる&lt;/li&gt;&#xA;&lt;li&gt;計算時間が短いというわけではない&#xA;&lt;ul&gt;&#xA;&lt;li&gt;定式化の問題か？&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;各モデル&#xA;&lt;ul&gt;&#xA;&lt;li&gt;文全体が一つのトピックを扱っていると仮定して、その代表的な文を拾ってくるイメージ&lt;/li&gt;&#xA;&lt;li&gt;McDonaldモデル&lt;/li&gt;&#xA;&lt;li&gt;最大被覆モデル&lt;/li&gt;&#xA;&lt;li&gt;施設配置モデル&#xA;&lt;ul&gt;&#xA;&lt;li&gt;劣モジュラ最適化問題に帰着できる&lt;/li&gt;&#xA;&lt;li&gt;文の類似度を計算する必要がある&lt;/li&gt;&#xA;&lt;li&gt;原論文では単語の重複をスコアとしている&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ROUGEみたいな&lt;/li&gt;&#xA;&lt;li&gt;２０２２年現在では&lt;a href=&#34;https://www.subcul-science.com/post/20220302embedding-matome/&#34;&gt;文の分散表現を求める&lt;/a&gt;こともできるのでそこはケースバイケースで特徴量を選択する&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;LexRank&#xA;&lt;ul&gt;&#xA;&lt;li&gt;文間の類似度からグラフ関係を計算して、重要な文をランキングする&lt;/li&gt;&#xA;&lt;li&gt;文字数の指定はできない&lt;/li&gt;&#xA;&lt;li&gt;Sentence Transformersのサイトに&lt;a href=&#34;https://sbert.net/examples/applications/text-summarization/README.html&#34;&gt;実装例&lt;/a&gt;がある&#xA;&lt;ul&gt;&#xA;&lt;li&gt;日本語に適用するには多少の修正が必要になる&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;別に文の間の類似度が出せるならSBERTでなくてもいい&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ROUGE, &lt;a href=&#34;https://www.subcul-science.com/post/universal-sentence-encoder/&#34;&gt;USE&lt;/a&gt;など&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;サービス&#34;&gt;サービス&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.digest.elyza.ai/&#34;&gt;イライザダイジェスト&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;３文に要約&lt;/li&gt;&#xA;&lt;li&gt;割と内容を理解した出力をする印象&lt;/li&gt;&#xA;&lt;li&gt;生成型特有のゆらぎが見られる&#xA;&lt;ul&gt;&#xA;&lt;li&gt;不自然な箇所に句読点など&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;タンテキ（サービス終了）&#xA;&lt;ul&gt;&#xA;&lt;li&gt;３文に要約&lt;/li&gt;&#xA;&lt;li&gt;抜粋型か？&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;関連記事&#34;&gt;関連記事&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20250705japanese-text-generation-solution/&#34;&gt;日本語テキスト生成の精度が低い・コストが高い問題をT5で解決&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;機械学習の基礎からモデルの仕組みまで体系的に学びたい方へ&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>日本語の分散表現の計算方法まとめ</title>
      <link>https://www.subcul-science.com/post/20220302embedding-matome/</link>
      <pubDate>Wed, 02 Mar 2022 20:59:30 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20220302embedding-matome/</guid>
      <description>&lt;h2 id=&#34;単語単位の分散表現&#34;&gt;単語単位の分散表現&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20200615google-colaboratory-word2vec/&#34;&gt;Word2vec&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;自然言語処理における分散表現の一つのオリジナル&lt;/li&gt;&#xA;&lt;li&gt;基本原理くらいは知っていてもいいかもしれない&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://radimrehurek.com/gensim/&#34;&gt;gensim&lt;/a&gt;がよく使われる&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20200613fasttext/&#34;&gt;Fasttext で文書分類問題までやったった&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;fastと名前がついているだけあってfacebookが公開しているモデルは高速に動作する&lt;/li&gt;&#xA;&lt;li&gt;分散表現とクラス分類に対応していたり、利便性が高い&lt;/li&gt;&#xA;&lt;li&gt;特にこのモデルで利用されている分かち書きの特徴から未知語に強いとされている&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/wikipediabert/&#34;&gt;日本語Wikipediaで学習済みのBERTが公開されているので使い方メモ&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Google の検索エンジンにも採用されている、らしい&lt;/li&gt;&#xA;&lt;li&gt;自然言語処理の研究を大きく変えたモデル&lt;/li&gt;&#xA;&lt;li&gt;関連する技術であるTransformerは自然言語処理だけでなく、画像処理の界隈にも流用された&lt;/li&gt;&#xA;&lt;li&gt;huggingfaceで日本語版のBERTも色々と公開されている&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20210701t5/&#34;&gt;日本語に対応したT5&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;この日本語版のモデルの作者が公開しているサンプルがわかりやすい&lt;/li&gt;&#xA;&lt;li&gt;また同じ作者がSBERTのモデルも公開している&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;機械学習の基礎からモデルの仕組みまで体系的に学びたい方へ&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>poetry環境でstreamlitを実行する方法</title>
      <link>https://www.subcul-science.com/post/20220224streamlit/</link>
      <pubDate>Thu, 24 Feb 2022 16:01:29 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20220224streamlit/</guid>
      <description>&lt;h2 id=&#34;症状&#34;&gt;症状&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;streamlitをpoetryを使ってインストールした場合に、streamlitが実行できない&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;poetry add streamlit&lt;/code&gt;でstreamlitを追加した場合、通常のシェルからはstreamlitのパスが通っていない&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;which streamlit&lt;/code&gt;の実行結果でなにもでてこない&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;対処&#34;&gt;対処&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;poetry からシェルを実行する&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;poetry shell&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;streamlit run sample.py&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;streamlitコマンドが実行できるようになる&lt;/li&gt;&#xA;&lt;li&gt;仮想環境にstreamlitをインストールした場合には通常のシェルからはstreamlitを実行できない&lt;/li&gt;&#xA;&lt;li&gt;その場合の対処法は公式サイトに載っている&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;関連記事&#34;&gt;関連記事&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20220224poetry/&#34;&gt;pycharmからpoetryで環境の作成ができない&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/chatgpt-streamlit/&#34;&gt;StreamlitでChatGPTのUIを作る&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;参考リンク&#34;&gt;参考リンク&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://streamlit.io/&#34;&gt;streamlit 公式サイト&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://python-poetry.org/&#34;&gt;poetry 公式サイト&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;script language=&#34;javascript&#34; src=&#34;//ad.jp.ap.valuecommerce.com/servlet/jsbanner?sid=3639942&amp;pid=887928593&#34;&gt;&lt;/script&gt;&lt;noscript&gt;&lt;a href=&#34;//ck.jp.ap.valuecommerce.com/servlet/referral?sid=3639942&amp;pid=887928593&#34; rel=&#34;nofollow&#34;&gt;&lt;img src=&#34;//ad.jp.ap.valuecommerce.com/servlet/gifbanner?sid=3639942&amp;pid=887928593&#34; border=&#34;0&#34;&gt;&lt;/a&gt;&lt;/noscript&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;関連書籍&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>pycharmからpoetryで環境の作成ができない</title>
      <link>https://www.subcul-science.com/post/20220224poetry/</link>
      <pubDate>Thu, 24 Feb 2022 11:56:49 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20220224poetry/</guid>
      <description>&lt;h2 id=&#34;症状&#34;&gt;症状&lt;/h2&gt;&#xA;&lt;p&gt;pycharmでinterpreterの指定にエラーが出た。&#xA;改めてpoetryの環境構築を行おうとしたところ、以下のエラーが出た。&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-py&#34; data-lang=&#34;py&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;ne&#34;&gt;ModuleNotFoundError&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;No&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;module&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;named&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;virtualenv.activation.xonsh&amp;#39;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;at&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;frozen&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;importlib&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_bootstrap&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;984&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_find_and_load_unlocked&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;解決方法&#34;&gt;解決方法&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip3 uninstall virtualenv&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;原因&#34;&gt;原因&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/anyenv/anyenv&#34;&gt;anyenv&lt;/a&gt;のアップデートをかけたのが悪かったか？&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;反省&#34;&gt;反省&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;不用意なアップデートは不具合の原因になる&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;関連記事&#34;&gt;関連記事&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20230607poetrytorch/&#34;&gt;poetry環境でpytorchをインストールしても失敗したのでその対処法&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;script language=&#34;javascript&#34; src=&#34;//ad.jp.ap.valuecommerce.com/servlet/jsbanner?sid=3639942&amp;pid=887928593&#34;&gt;&lt;/script&gt;&lt;noscript&gt;&lt;a href=&#34;//ck.jp.ap.valuecommerce.com/servlet/referral?sid=3639942&amp;pid=887928593&#34; rel=&#34;nofollow&#34;&gt;&lt;img src=&#34;//ad.jp.ap.valuecommerce.com/servlet/gifbanner?sid=3639942&amp;pid=887928593&#34; border=&#34;0&#34;&gt;&lt;/a&gt;&lt;/noscript&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;関連書籍&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>日本語で学習済みのT5がhugging face で公開されたので使い方メモ</title>
      <link>https://www.subcul-science.com/post/20210701t5/</link>
      <pubDate>Thu, 01 Jul 2021 20:57:39 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210701t5/</guid>
      <description>&lt;h2 id=&#34;t5text-to-text-transfer-transformer-とは&#34;&gt;T5(Text-To-Text Transfer Transformer) とは&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;事前学習における入出力を文に統一してしまうことで、&#xA;複数の形式の問題に対しても適応できる様式となった。&lt;/li&gt;&#xA;&lt;li&gt;モデルの基本構造としては Transformer が使われており、その点はBERTと共通している。&lt;/li&gt;&#xA;&lt;li&gt;事前学習の形式をすべてテキストによる指定にするというアイデアはGPT-3などでも用いられている。&#xA;&lt;ul&gt;&#xA;&lt;li&gt;0 shot learning など入力文で模範解答例を入力するだけで、出力を操作するということも行われている&lt;/li&gt;&#xA;&lt;li&gt;&amp;ldquo;操作の指定:入力文１、出力に期待する文、操作の指定：入力文２&amp;quot;で、&amp;ldquo;出力文２&amp;quot;が得られるという次第&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;できること&#34;&gt;できること&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;下流のタスクとして転移学習を行うことで以下のようなことが実行できる。&#xA;&lt;ul&gt;&#xA;&lt;li&gt;文書分類&lt;/li&gt;&#xA;&lt;li&gt;タイトル生成&lt;/li&gt;&#xA;&lt;li&gt;文章生成&lt;/li&gt;&#xA;&lt;li&gt;生成要約&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;機械学習の基礎からモデルの仕組みまで体系的に学びたい方へ&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Building a python environment with poetry on mac os</title>
      <link>https://www.subcul-science.com/post/20210520poetry/</link>
      <pubDate>Thu, 20 May 2021 20:53:52 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210520poetry/</guid>
      <description>&lt;p&gt;Pip is a major method of installing python libraries.&lt;/p&gt;&#xA;&lt;p&gt;poetry is a more advanced version control tool for development environments.&lt;/p&gt;&#xA;&lt;p&gt;It seems to have official support for pyenv integration.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll write down how to install it on mac os and what I got stuck.&lt;/p&gt;&#xA;&lt;h2 id=&#34;advantages-of-poetry&#34;&gt;Advantages of poetry&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Can organize library dependencies.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There are some unexpected side effects depending on the version of the library.&lt;/li&gt;&#xA;&lt;li&gt;Trying to recreate the environment can cause errors with library versions and installation order.&lt;/li&gt;&#xA;&lt;li&gt;Building the environment is an inevitable part of human work, so it should be automated if possible.&lt;/li&gt;&#xA;&lt;li&gt;Also, it seems to be able to update the library version to take dependencies into account.&lt;/li&gt;&#xA;&lt;li&gt;And it keeps a record of the status.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Is it possible to separate the dependency records by git branch?&lt;/li&gt;&#xA;&lt;li&gt;The libraries you can install are comparable to pip&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Does it have the same references as pypy?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Usability is not much different from pip&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Poetry add instead of pip install&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;It recognizes virtual environments created with pyenv and works with them.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I&amp;rsquo;m going to install it because it seems to be a convenient way to build an environment without much effort.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why is fasttext so fast?</title>
      <link>https://www.subcul-science.com/post/20210519fasttext/</link>
      <pubDate>Wed, 19 May 2021 02:10:01 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210519fasttext/</guid>
      <description>&lt;h2 id=&#34;features-of-fasttext&#34;&gt;Features of fasttext&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Improved objective function&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Consideration of negative samples&lt;/li&gt;&#xA;&lt;li&gt;This should not affect training time.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Change in optimization method&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use of stochastic optimization&lt;/li&gt;&#xA;&lt;li&gt;If it affects the learning time, it should be this one&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Implementation in C language&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This is the most effective, isn&amp;rsquo;t it?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If we implement it in ## pytorch, it won&amp;rsquo;t be much different from word2vec.&#xA;It would depend on the amount of data to be trained.&lt;/p&gt;</description>
    </item>
    <item>
      <title>word2vecでteratailの検索システムっぽいものを作る</title>
      <link>https://www.subcul-science.com/post/20210416teratailword2vec/</link>
      <pubDate>Fri, 16 Apr 2021 12:21:29 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210416teratailword2vec/</guid>
      <description>&lt;h2 id=&#34;概要&#34;&gt;概要&lt;/h2&gt;&#xA;&lt;p&gt;分散表現を用いた検索システムを作る。&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;teratailから質問をスクレイピングする。&lt;/li&gt;&#xA;&lt;li&gt;スクレイピングした文章をもとにword2vecを学習する。&lt;/li&gt;&#xA;&lt;li&gt;word2vecによって得られた分散表現をもとにcosine similarityを計算して、クエリと質問文の類似度を得る。&lt;/li&gt;&#xA;&lt;li&gt;類似度をもとにソートする。&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;ソース&#34;&gt;ソース&lt;/h2&gt;&#xA;&lt;h2 id=&#34;teratail_w2v_questionipynbhttpscolabresearchgooglecomdrive1yewbftptrooury6dji9ly7j-fvmtdyeiuspsharing&#34;&gt;&lt;a href=&#34;https://colab.research.google.com/drive/1YeWBFTptroOury6DjI9ly7j-fVmtdYei?usp=sharing&#34;&gt;teratail_w2v_question.ipynb&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;関連書籍&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>アテンションを用いた画像処理モデルの作成</title>
      <link>https://www.subcul-science.com/post/20210408attentionimage/</link>
      <pubDate>Thu, 08 Apr 2021 13:45:55 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210408attentionimage/</guid>
      <description>&lt;h2 id=&#34;アテンションを用いた画像処理モデルの作成のまとめ&#34;&gt;アテンションを用いた画像処理モデルの作成のまとめ&lt;/h2&gt;&#xA;&lt;p&gt;画像認識にアテンションという機構を付与して、判断の根拠を可視化しました。&lt;/p&gt;&#xA;&lt;h2 id=&#34;前振り&#34;&gt;前振り&lt;/h2&gt;&#xA;&lt;p&gt;画像認識についてはもう深層学習が人間を超えてから(2015)しばらく経っています。&lt;/p&gt;</description>
    </item>
    <item>
      <title>AI(深層学習) を用いて観賞魚の品種識別</title>
      <link>https://www.subcul-science.com/post/20210408imageclassifier/</link>
      <pubDate>Thu, 08 Apr 2021 13:18:55 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210408imageclassifier/</guid>
      <description>&lt;h2 id=&#34;ai-を用いて観賞魚の品種識別のまとめ&#34;&gt;AI を用いて観賞魚の品種識別のまとめ&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;AI はもはや普通の人間を超える性能を発揮している&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;深層学習系の手法がメジャー&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;デバイスは2 万円〜から利用が可能&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;前振り&#34;&gt;前振り&lt;/h2&gt;&#xA;&lt;p&gt;仕事がらAIについて調べております。調べると言ってもプレスリリースを漁るといったものではなく、主に公開されている論文やソースコードを読みこなして自力でAIを構築できるように取り組んでいます。&lt;/p&gt;</description>
    </item>
    <item>
      <title>ポートフォリオ</title>
      <link>https://www.subcul-science.com/portfolio/</link>
      <pubDate>Thu, 08 Apr 2021 13:07:22 +0900</pubDate>
      <guid>https://www.subcul-science.com/portfolio/</guid>
      <description>&lt;h2 id=&#34;実績&#34;&gt;実績&lt;/h2&gt;&#xA;&lt;h3 id=&#34;-最新プロジェクト2023-2025&#34;&gt;🚀 最新プロジェクト（2023-2025）&lt;/h3&gt;&#xA;&lt;h4 id=&#34;フルスタックwebアプリケーション&#34;&gt;フルスタックWebアプリケーション&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;X Favorites Gallery&lt;/strong&gt; - X(Twitter)いいねギャラリー + AIレコメンド&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/lp/x-fav-rich/&#34;&gt;X Favorites Gallery LP&lt;/a&gt; / &lt;a href=&#34;https://x-fav-gellery.com/&#34;&gt;アプリを開く&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;技術スタック: Next.js + React + PostgreSQL + pgvector, Chrome拡張, Docker&lt;/li&gt;&#xA;&lt;li&gt;成果: いいねしたコンテンツをAI（DINOv2）が自動レコメンド、NSFW自動フィルタリング対応&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;tsuzukan（続刊）&lt;/strong&gt; - 漫画・小説の続刊管理アプリ&lt;/p&gt;</description>
    </item>
    <item>
      <title>pythonで環境構築の為にきれいなrequirements.txtを作成する方法</title>
      <link>https://www.subcul-science.com/post/20210317pipreq/</link>
      <pubDate>Wed, 17 Mar 2021 12:00:16 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210317pipreq/</guid>
      <description>&lt;p&gt;python で環境構築をする際にrequirements.txtを利用することがある。&lt;/p&gt;&#xA;&lt;p&gt;ただ、素直にrequirements.txtを作ると環境構築の再現性が低い場合がある。&lt;/p&gt;</description>
    </item>
    <item>
      <title>MLops　実験開発環境の整備の必要性</title>
      <link>https://www.subcul-science.com/post/20210226mlops/</link>
      <pubDate>Fri, 26 Feb 2021 15:21:44 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210226mlops/</guid>
      <description>&lt;h1 id=&#34;mlops&#34;&gt;MLops&lt;/h1&gt;&#xA;&lt;p&gt;レベル1だけでもやっとけばええんちゃうか&lt;/p&gt;&#xA;&lt;h2 id=&#34;やること&#34;&gt;やること&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;データの前処理と保存&lt;/li&gt;&#xA;&lt;li&gt;特徴量の抽出と保存&lt;/li&gt;&#xA;&lt;li&gt;分類器の学習と保存&lt;/li&gt;&#xA;&lt;li&gt;それぞれのパラメータの保存&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;利点&#34;&gt;利点&lt;/h2&gt;&#xA;&lt;p&gt;実験する部分や追加したい機能の切り分けがしやすくなる。&lt;/p&gt;</description>
    </item>
    <item>
      <title>pythonに引数をとらせるArgparseの例</title>
      <link>https://www.subcul-science.com/post/20210226argparse/</link>
      <pubDate>Fri, 26 Feb 2021 15:17:54 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210226argparse/</guid>
      <description>&lt;h2 id=&#34;サンプルプログラム&#34;&gt;サンプルプログラム&lt;/h2&gt;&#xA;&lt;p&gt;以下公式サイトより引用&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-py&#34; data-lang=&#34;py&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;argparse&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;add_argument&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;square&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;n&#34;&gt;help&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;display a square of a given number&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;add_argument&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;-v&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;--verbose&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;action&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;store_true&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    &lt;span class=&#34;n&#34;&gt;help&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;increase output verbosity&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;args&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;parser&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;parse_args&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;answer&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;args&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;square&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;**&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;解説&#34;&gt;解説&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;parser.add_argument(&amp;quot;square&amp;quot;, type=int,&#xA;                help=&amp;quot;display a square of a given number&amp;quot;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;引数の名前がsquare&lt;/p&gt;&#xA;&lt;p&gt;型を指定できる。デフォルトはstr。&lt;/p&gt;&#xA;&lt;p&gt;前に-がつかない名前は位置引数。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Creating data in Natural Language Inference (NLI) format for Sentence transformer</title>
      <link>https://www.subcul-science.com/post/20210217nlibert/</link>
      <pubDate>Wed, 17 Feb 2021 10:32:03 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210217nlibert/</guid>
      <description>&lt;p&gt;Using the Sentence Transformer to&#xA;I&amp;rsquo;m trying to use Sentence Transformer to infer causal relationships between documents.&lt;/p&gt;&#xA;&lt;p&gt;If we can do this, we can extract the cause and symptoms of the incident from the report.&lt;/p&gt;&#xA;&lt;p&gt;So, I wondered if NLI could be used for feature learning to extract causal information. I thought.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-is-nli&#34;&gt;What is NLI?&lt;/h2&gt;&#xA;&lt;p&gt;Inference of the relationship between two sentences&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Forward&lt;/li&gt;&#xA;&lt;li&gt;Inverse&lt;/li&gt;&#xA;&lt;li&gt;Unrelated&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The three relations are.&lt;/p&gt;&#xA;&lt;h2 id=&#34;apply-to-causal-relationships&#34;&gt;Apply to causal relationships&lt;/h2&gt;&#xA;&lt;p&gt;If we apply the three relationships of NLI to causality, the following patterns are possible.&lt;/p&gt;</description>
    </item>
    <item>
      <title>python janome 0.4系からstreamモードがデフォルト 解決策のメモ</title>
      <link>https://www.subcul-science.com/post/20210217janome/</link>
      <pubDate>Wed, 17 Feb 2021 10:31:12 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210217janome/</guid>
      <description>&lt;p&gt;janomeのバージョンを上げると、分かち書きの出力をgeneratorで返すようになった。&lt;/p&gt;&#xA;&lt;p&gt;generatorはメモリ効率が良いというメリットがある一方でリストでデータを保持したいという気持ちがある。&lt;/p&gt;</description>
    </item>
    <item>
      <title>pythonでpandasを使ってエクセルを読み込み失敗するときの対処</title>
      <link>https://www.subcul-science.com/post/20210217xlrd/</link>
      <pubDate>Wed, 17 Feb 2021 10:29:42 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210217xlrd/</guid>
      <description>&lt;p&gt;xlrdのバージョンによって、.xlsxファイルの読み込みに失敗する。&lt;/p&gt;&#xA;&lt;p&gt;対策としてはバージョンを下げる。&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pip3 install xlrd==1.2.0&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;参考リンク&#34;&gt;参考リンク&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://qiita.com/fujitatsu0520/items/9e37c2bd2ba2adfd18d4&#34;&gt;https://qiita.com/fujitatsu0520/items/9e37c2bd2ba2adfd18d4&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;関連書籍&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.amazon.co.jp/dp/4873117984?tag=subculturesci-22&#34;&gt;Pythonではじめる機械学習&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>On the use of distributed representations bagging for class classification and generalization performance</title>
      <link>https://www.subcul-science.com/post/20210204classifier/</link>
      <pubDate>Thu, 04 Feb 2021 13:24:19 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210204classifier/</guid>
      <description>&lt;p&gt;After the distributed representation has been obtained, the&#xA;After the distributed representation is obtained, machine learning can be used to classify it.&lt;/p&gt;&#xA;&lt;p&gt;Models that can be used include&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Decision Tree&lt;/li&gt;&#xA;&lt;li&gt;SVM Support Vector Machine&lt;/li&gt;&#xA;&lt;li&gt;NN Neural Networks&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;and others.&lt;/p&gt;&#xA;&lt;p&gt;SVM is included in NN in a broad sense.&lt;/p&gt;&#xA;&lt;p&gt;In this section, we will use the decision tree method.&lt;/p&gt;&#xA;&lt;h2 id=&#34;bagging&#34;&gt;Bagging&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Image of majority voting with multiple decision trees&lt;/li&gt;&#xA;&lt;li&gt;Simple theory&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Decision trees are highly explainable and are a classic machine learning model.&lt;/li&gt;&#xA;&lt;li&gt;Computational load is light compared to deep learning&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Depends on the size of the model&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Not much explainability&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do we want to analyze each of the multiple decision trees?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;``py&#xA;from sklearn.ensemble import BaggingClassifier&#xA;from sklearn.tree import DecisionTreeClassifier&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to train a Japanese model with Sentence transformer to get a distributed representation of a sentence</title>
      <link>https://www.subcul-science.com/post/20210203sbert/</link>
      <pubDate>Wed, 03 Feb 2021 15:58:41 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210203sbert/</guid>
      <description>&lt;p&gt;.&#xA;BERT is a model that can be powerfully applied to natural language processing tasks.&lt;/p&gt;&#xA;&lt;p&gt;However, it does not do a good job of capturing sentence-wise features.&lt;/p&gt;&#xA;&lt;p&gt;Some claim that sentence features appear in [ CLS\ ], but&#xA;This paper](&lt;a href=&#34;https://arxiv.org/abs/1908.10084&#34;&gt;https://arxiv.org/abs/1908.10084&lt;/a&gt;) claims that it does not contain that much useful information for the task.&lt;/p&gt;&#xA;&lt;p&gt;Sentence BERT is a model that extends BERT to be able to obtain features per sentence.&lt;/p&gt;&#xA;&lt;p&gt;The following are the steps to create Sentence BERT in Japanese.&lt;/p&gt;</description>
    </item>
    <item>
      <title>tensorflow GPUメモリを一気に確保しない設定の仕方</title>
      <link>https://www.subcul-science.com/post/20210125tensorflow/</link>
      <pubDate>Mon, 25 Jan 2021 08:17:54 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210125tensorflow/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.tensorflow.org/&#34;&gt;TensorFlow&lt;/a&gt; 1系は使える全てのGPUリソースを確保する。&lt;/p&gt;&#xA;&lt;p&gt;メモリオーバーを観測できないので、&#xA;逐次的にGPUメモリを確保するように設定を変更する。&lt;/p&gt;&#xA;&lt;p&gt;これによってGPU使用量の観測ができる。&lt;/p&gt;</description>
    </item>
    <item>
      <title>deeplubcut 動画を対象にした点の位置の予測</title>
      <link>https://www.subcul-science.com/post/20210124deeplubcut/</link>
      <pubDate>Sun, 24 Jan 2021 12:56:01 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210124deeplubcut/</guid>
      <description>&lt;p&gt;点のアノテーションの予測&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;蝿の腹、マウスの脊椎、指の関節など応用範囲が広い。&lt;/li&gt;&#xA;&lt;li&gt;動画でできてる。デモがある。&lt;/li&gt;&#xA;&lt;li&gt;動画の特徴量抽出はResNet, mobileNetなど&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mobile Netでできるならエッジコンピューティングが視野に入る&lt;/li&gt;&#xA;&lt;li&gt;ラズパイ＋GPUみたいな構成&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;参考リンク&#34;&gt;参考リンク&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/DeepLabCut/DeepLabCut&#34;&gt;https://github.com/DeepLabCut/DeepLabCut&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>pycaret メモ</title>
      <link>https://www.subcul-science.com/post/20210124pycaret/</link>
      <pubDate>Sun, 24 Jan 2021 12:52:46 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210124pycaret/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://scikit-learn.org/&#34;&gt;scikit-learn&lt;/a&gt;と似ている？&lt;/li&gt;&#xA;&lt;li&gt;gpu使える&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;参考リンク&#34;&gt;参考リンク&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://pycaret.org&#34;&gt;PyCaret公式サイト&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;関連書籍&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.amazon.co.jp/dp/4873117984?tag=subculturesci-22&#34;&gt;Pythonではじめる機械学習&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>要約文の評価指標についてのメモ</title>
      <link>https://www.subcul-science.com/post/20210120translationscore/</link>
      <pubDate>Wed, 20 Jan 2021 11:00:34 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210120translationscore/</guid>
      <description>&lt;p&gt;生成式要約文のモデルに需要がある。&lt;/p&gt;&#xA;&lt;p&gt;そのモデルの評価指標についてのめも。&lt;/p&gt;&#xA;&lt;p&gt;結論としてはやはり正解になる文の用意は必要だということ。&lt;/p&gt;&#xA;&lt;p&gt;そこを省きたいんだけどなぁ？&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using BART (sentence summary model) with hugging face</title>
      <link>https://www.subcul-science.com/post/20210119huggingface/</link>
      <pubDate>Tue, 19 Jan 2021 03:03:11 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20210119huggingface/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;BART is a model for document summarization&lt;/li&gt;&#xA;&lt;li&gt;Derived from the same transformer as BERT&lt;/li&gt;&#xA;&lt;li&gt;Unlike BERT, it has an encoder-decoder structure&#xA;&lt;ul&gt;&#xA;&lt;li&gt;This is because it is intended for sentence generation&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This page shows the steps to run a tutorial on BART.&lt;/p&gt;&#xA;&lt;h2 id=&#34;procedure&#34;&gt;Procedure&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;install transformers&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Run ``sh&#xA;pip install transformers&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Run summary&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;2. Run the summary&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;from transformers import BartTokenizer, BartForConditionalGeneration, BartConfig&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;model = BartForConditionalGeneration.from_pretrained(&amp;#39;facebook/bart-large&amp;#39;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;tokenizer = BartTokenizer.from_pretrained(&amp;#39;facebook/bart-large&amp;#39;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ARTICLE_TO_SUMMARIZE = &amp;#34;My friends are cool but they eat too many carbs.&amp;#34;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=1024, return_tensors=&amp;#39;pt&amp;#39;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;# Generate Summary&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;summary_ids = model.generate(inputs[&amp;#39;input_ids&amp;#39;], num_beams=4, max_length=5, early_stopping=True)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;print([tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=False) for g in summary_ids])&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;```&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;On 2021/01/18, the output was MyMy friends.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Interesting.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;## Where I got stuck.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Error when the version of pytorch is different from the one specified in transformers.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;pip install -U torch&lt;/p&gt;</description>
    </item>
    <item>
      <title>python でのmlflowの使い方</title>
      <link>https://www.subcul-science.com/post/20200718python-mlflow/</link>
      <pubDate>Sat, 18 Jul 2020 16:24:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20200718python-mlflow/</guid>
      <description>&lt;h2 id=&#34;python-でmlflow使うメモ&#34;&gt;python でmlflow使うメモ&lt;/h2&gt;&#xA;&lt;p&gt;実験結果を比較するために便利っぽいので&lt;a href=&#34;https://mlflow.org/&#34;&gt;MLflow&lt;/a&gt;を使ってみた。&lt;/p&gt;&#xA;&lt;p&gt;パラメータと実験結果の記録をある程度自動化できる。&lt;/p&gt;&#xA;&lt;p&gt;機械学習の実践はある種の黒魔術となることが多いので再現性を担保するための努力は後々に影響する。&lt;/p&gt;</description>
    </item>
    <item>
      <title>AI に夢を見すぎでは？</title>
      <link>https://www.subcul-science.com/post/ai_25/</link>
      <pubDate>Thu, 25 Jun 2020 03:53:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/ai_25/</guid>
      <description>&lt;p&gt;問題解決の思考はまだ人間がしないといけないよ。&lt;/p&gt;&#xA;&lt;h3 id=&#34;aiは魔法の杖じゃないよ&#34;&gt;AIは魔法の杖じゃないよ。&lt;/h3&gt;&#xA;&lt;p&gt;機械学習、AI、深層学習がすごいのは事実としてそうだと思うけど、線形計画や統計みたいな素朴な方法が全て取って代わられるかというと、そうではないよね。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Procedure for obtaining a distributed representation of a Japanese sentence using a trained Universal Sentence Encoder</title>
      <link>https://www.subcul-science.com/post/universal-sentence-encoder/</link>
      <pubDate>Mon, 22 Jun 2020 18:29:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/universal-sentence-encoder/</guid>
      <description>&lt;p&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A vector of documents can be obtained using Universal Sentence Encoder.&lt;/p&gt;&#xA;&lt;h2 id=&#34;features&#34;&gt;Features&lt;/h2&gt;&#xA;&lt;p&gt;Supports multiple languages.&lt;/p&gt;&#xA;&lt;p&gt;Japanese is supported.&lt;/p&gt;&#xA;&lt;p&gt;Can handle Japanese sentences as vectors.&lt;/p&gt;&#xA;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;Clustering, similarity calculation, feature extraction.&lt;/p&gt;&#xA;&lt;h2 id=&#34;usage-1&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;p&gt;Execute the following command as preparation.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install tensorflow tensorflow_hub tensorflow_text numpy   &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Trained models are available.&lt;/p&gt;&#xA;&lt;p&gt;See the python description below for details on how to use it.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-py&#34; data-lang=&#34;py&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;tensorflow_hub&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;as&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;hub&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;tensorflow_text&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;numpy&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;as&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;np&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# for avoiding error  &lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;ssl&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;ssl&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_create_default_https_context&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ssl&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_create_unverified_context&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;cos_sim&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;v1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;v2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;np&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dot&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;v1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;v2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;np&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;linalg&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;norm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;v1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;np&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;linalg&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;norm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;v2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;embed&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;hub&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;load&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;https://tfhub.dev/google/universal-sentence-encoder-multilingual/3&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;texts&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;I saw a comedy show yesterday.&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;There was a comedy show on TV last night.&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;I went to the park yesterday.&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;I saw a comedy show last night.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Yesterday, I went to the park.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;vectors&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;embed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;texts&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;```&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;See&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;the&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;following&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;link&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;more&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;details&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Try&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Universal&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sentence&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Encoder&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Japanese&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;](&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;https&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;//&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;qiita&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;com&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;kenta1984&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;items&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;9613&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;da23766a2578a27a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;### Postscript&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;```&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;py&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;tensorflow_text&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Without this line, you will get an error like ``Sentencepiece not found! error.&#xA;This line is not explicitly used in the sample source, but is required for the actual execution.&#xA;This line is not explicitly used in the sample source, but is required in the actual runtime.&lt;/p&gt;</description>
    </item>
    <item>
      <title>python を用いた自然言語処理の環境を整える</title>
      <link>https://www.subcul-science.com/post/20200618python/</link>
      <pubDate>Thu, 18 Jun 2020 07:34:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20200618python/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://1.bp.blogspot.com/-Hfn3KpibOuY/Xurepq-smKI/AAAAAAAAg70/y4-SSiS1Mc4gMmbTywgn9jCzZboq6XAJACK4BGAsYHg/s1920/74C0A734-70D2-4846-A316-312BA6691D8B.jpeg&#34;&gt;&lt;img src=&#34;https://1.bp.blogspot.com/-Hfn3KpibOuY/Xurepq-smKI/AAAAAAAAg70/y4-SSiS1Mc4gMmbTywgn9jCzZboq6XAJACK4BGAsYHg/s320/74C0A734-70D2-4846-A316-312BA6691D8B.jpeg&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;この記事はコマンドラインをある程度利用できる方に向けて書いています。&lt;/p&gt;&#xA;&lt;p&gt;コマンドラインがなにか分からないけど、pythonを使いたい方はGoogle Colaboratory というサービスの利用を検討してください。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enumerating Applications of Document Classification Problems Only</title>
      <link>https://www.subcul-science.com/post/20200618blog-post_54/</link>
      <pubDate>Thu, 18 Jun 2020 06:42:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20200618blog-post_54/</guid>
      <description>&lt;h2 id=&#34;applying-the-document-classification-problem&#34;&gt;Applying the Document Classification Problem&lt;/h2&gt;&#xA;&lt;p&gt;You&amp;rsquo;ve learned about machine learning, but you don&amp;rsquo;t know how to use it! Isn&amp;rsquo;t it?&lt;/p&gt;&#xA;&lt;p&gt;It is easy to overlook this if you don&amp;rsquo;t pay attention to it when you study it, but if you don&amp;rsquo;t keep your antennas up, you won&amp;rsquo;t know how to use it.&lt;/p&gt;&#xA;&lt;p&gt;If you don&amp;rsquo;t keep your antennae up, you won&amp;rsquo;t know how to use it. Since a tool is only a tool if it is used, you should make a note of how you use your newly acquired tool.&lt;/p&gt;</description>
    </item>
    <item>
      <title>word2vecのアルゴリズムを把握するためにnotebookで動かしながら挙動を理解しよう</title>
      <link>https://www.subcul-science.com/post/20200617word2vec/</link>
      <pubDate>Wed, 17 Jun 2020 07:36:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20200617word2vec/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://1.bp.blogspot.com/-jk493l0cRu0/XurebGYeZHI/AAAAAAAAg7c/a0zNCAp-MP4OSr9a0fFhIiv-y8Cr-NdbQCK4BGAsYHg/s1920/30729925-02B8-4287-82F8-A8C6660E54C8.jpeg&#34;&gt;&lt;img src=&#34;https://1.bp.blogspot.com/-jk493l0cRu0/XurebGYeZHI/AAAAAAAAg7c/a0zNCAp-MP4OSr9a0fFhIiv-y8Cr-NdbQCK4BGAsYHg/s320/30729925-02B8-4287-82F8-A8C6660E54C8.jpeg&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;word2vecを理解しよう&#34;&gt;word2vecを理解しよう！&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;word2vec のアルゴリズムについて、勉強しようとして苦戦していませんか？&#xA;&lt;ul&gt;&#xA;&lt;li&gt;アルゴリズムの基になる発想は意外に直観的なものですが、その直観をアルゴリズムの記述から読み取るのはコツが要るかもしれません。&lt;/li&gt;&#xA;&lt;li&gt;実際に動くモデルで遊んでみて、反応をみながら感覚を掴むといいと思います。&lt;/li&gt;&#xA;&lt;li&gt;一行単位で実行できるプログラムを自分の手で動かしながら、出力を確認できると分かりやすいと思いませんか？&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;環境構築不要&#34;&gt;環境構築不要！&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;そこで&lt;a href=&#34;https://colab.research.google.com/&#34;&gt;Google Colaboratory&lt;/a&gt;というサービスを利用して、手軽にword2vecを動かして、アルゴリズムの仕組みを理解しましょう！&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Google Colaboratory はGoogleが提供しているサービスです。&lt;/li&gt;&#xA;&lt;li&gt;Gmailのアカウントを持っていれば環境構築の手間が省け、Googleの計算資源を利用できるものです。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;そこでword2vecを動かせるプログラムを用意しました。&lt;/li&gt;&#xA;&lt;li&gt;このプログラムは技術書典というイベントで頒布させていただき、50以上の方に利用していただきました。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;購入は以下のリンクから&#34;&gt;購入は以下のリンクから&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;詳細は以下のリンクからどうぞ。&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.subcul-science.com/post/20200615google-colaboratory-word2vec/&#34;&gt;word2vecのアルゴリズムを把握するためにプログラムを動かしながら挙動を理解しよう&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;関連書籍&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>A note on how to use BERT learned from Japanese Wikipedia, now available</title>
      <link>https://www.subcul-science.com/post/wikipediabert/</link>
      <pubDate>Wed, 17 Jun 2020 07:34:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/wikipediabert/</guid>
      <description>&lt;p&gt;huggingface has released a Japanese model for BERT.&lt;/p&gt;&#xA;&lt;p&gt;The Japanese model is included in transformers.&lt;/p&gt;&#xA;&lt;p&gt;However, I stumbled over a few things before I could get it to actually work in a Mac environment, so I&amp;rsquo;ll leave a note.&lt;/p&gt;&#xA;&lt;h2 id=&#34;preliminaries-installing-mecab&#34;&gt;Preliminaries: Installing mecab&lt;/h2&gt;&#xA;&lt;p&gt;The morphological analysis engine, mecab, is required to use BERT&amp;rsquo;s Japanese model.&lt;/p&gt;&#xA;&lt;p&gt;The tokenizer will probably ask for mecab.&lt;/p&gt;&#xA;&lt;p&gt;This time, we will use homebrew to install Mecab and ipadic.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Macでpyenvを利用したpythonの環境構築の方法</title>
      <link>https://www.subcul-science.com/post/20200616mac-python/</link>
      <pubDate>Tue, 16 Jun 2020 04:58:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20200616mac-python/</guid>
      <description>&lt;h2 id=&#34;mac-でpythonの環境構築&#34;&gt;Mac でpythonの環境構築&lt;/h2&gt;&#xA;&lt;p&gt;Mac にpythonをどうやってインストールしたらいいのか悩んでいませんか？&lt;/p&gt;&#xA;&lt;p&gt;単純にhome brewを使ってインストールしてもいいのですが、&#xA;以下のデメリットがあります。&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to use NeuralClassifier, a library that provides a crazy number of models for document classification problems</title>
      <link>https://www.subcul-science.com/post/neuralclassifier/</link>
      <pubDate>Mon, 15 Jun 2020 02:11:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/neuralclassifier/</guid>
      <description>&lt;p&gt;[! [](https://1.bp.blogspot.com/-YlMb8v77MN4/XurdQSzS1yI/AAAAAAAAg6Y/oSZrJ0c9yxYbzQnNNTynRvZnEp-xGE7NwCK4BGAsYHg/s320/AFE90C8A-A49C- 4475-9F05-50E2D56D5B63.jpeg)](&lt;a href=&#34;https://1.bp.blogspot.com/-YlMb8v77MN4/XurdQSzS1yI/AAAAAAAAg6Y/oSZrJ0c9yxYbzQnNNTynRvZnEp-xGE7NwCK4&#34;&gt;https://1.bp.blogspot.com/-YlMb8v77MN4/XurdQSzS1yI/AAAAAAAAg6Y/oSZrJ0c9yxYbzQnNNTynRvZnEp-xGE7NwCK4&lt;/a&gt; BGAsYHg/s1920/AFE90C8A-A49C-4475-9F05-50E2D56D5B63.jpeg)&lt;/p&gt;&#xA;&lt;p&gt;NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit is a python library for multi-label document classification problems published by Tencent.&lt;/p&gt;&#xA;&lt;p&gt;For more information, see&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;[NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit](&lt;a href=&#34;https://github.com/Tencent/NeuralNLP-&#34;&gt;https://github.com/Tencent/NeuralNLP-&lt;/a&gt; NeuralClassifier)&#xA;NeuralClassifier is designed for quick implementation of neural models for hierarchical multi-label classification task, which is more challenging and common in real-world scenarios.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;for more details.&lt;/p&gt;&#xA;&lt;p&gt;NeuralClassifier is designed for quick implementation of neural models for hierarchical multi-label classification task, which is more challenging and common in real-world scenarios.&lt;/p&gt;</description>
    </item>
    <item>
      <title>I even did a document classification problem with Fasttext</title>
      <link>https://www.subcul-science.com/post/20200613fasttext/</link>
      <pubDate>Sat, 13 Jun 2020 07:29:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20200613fasttext/</guid>
      <description>&lt;h2 id=&#34;summary-of-what-ive-done-with-fasttext-to-the-document-classification-problem&#34;&gt;Summary of what I&amp;rsquo;ve done with Fasttext to the document classification problem.&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Facebook research has published a document classification library using Fasttext.&lt;/li&gt;&#xA;&lt;li&gt;Fasttext is easy to install in a python environment.&lt;/li&gt;&#xA;&lt;li&gt;Run time is fast.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;preliminaries&#34;&gt;Preliminaries&lt;/h2&gt;&#xA;&lt;p&gt;I decided to tackle the task of document classification, and initially thought.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;NeuralClassifier: An Open-source Neural Hierarchical Multi-label Text Classification Toolkit. However, it was not very accurate.&lt;/p&gt;</description>
    </item>
    <item>
      <title>I made a summary text generation AI for making short-form news</title>
      <link>https://www.subcul-science.com/post/20200613abstractnews/</link>
      <pubDate>Sat, 13 Jun 2020 00:24:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20200613abstractnews/</guid>
      <description>&lt;p&gt;.&lt;/p&gt;&#xA;&lt;p&gt;We have successfully trained a model to automatically generate titles from news texts using a machine translation model based on deep learning.&lt;/p&gt;&#xA;&lt;h2 id=&#34;preliminaries&#34;&gt;Preliminaries&lt;/h2&gt;&#xA;&lt;p&gt;In the past, I was involved in a project to automatically generate titles from manuscripts for online news. In the past, I was involved in a project to automatically generate titles from manuscripts for online news.&lt;/p&gt;&#xA;&lt;p&gt;In order to tackle this project, I was looking into existing methods.&lt;/p&gt;</description>
    </item>
    <item>
      <title>深層学習でニュースタイトルの自動生成モデルつくったった</title>
      <link>https://www.subcul-science.com/post/20200612dnnabstractnewstitle/</link>
      <pubDate>Fri, 12 Jun 2020 23:52:00 +0900</pubDate>
      <guid>https://www.subcul-science.com/post/20200612dnnabstractnewstitle/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;深層学習モデルを使って、新聞記事から見出しを自動で生成するモデルが提案されている。&lt;/li&gt;&#xA;&lt;li&gt;朝日新聞が自動要約生成APIの提供を始めました。&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://cl.asahi.com/api_data/headlinegeneration.html&#34;&gt;自動要約生成API: TSUNA&#xA;&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;追記&#34;&gt;追記&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;2022時点なら&lt;a href=&#34;https://www.subcul-science.com/post/20210701t5/&#34;&gt;T5を使ってファインチューニングを試す&lt;/a&gt;方が簡単な気がする。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;モデル概要&#34;&gt;モデル概要&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;朝日新聞が研究に協力して取り組んでおり、transformerを基礎にして、文字数制約を組み込んだモデルが論文で提案されています。&lt;/li&gt;&#xA;&lt;li&gt;さすが朝日新聞というべきか、莫大な教師データを使ってモデルの学習を行っています。&lt;/li&gt;&#xA;&lt;li&gt;また文字数制約についても、位置エンコーディングを工夫することによって、指定した文字数を生成するようになったようです。&lt;/li&gt;&#xA;&lt;li&gt;この辺り、フリーの言語リソースが日本語に少ないことには歯がゆさを感じます。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;##　ニュースタイトルの自動生成モデルの作成&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
