<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sato_susumu</author_name>
  <author_url>https://blog.hatena.ne.jp/sato_susumu/</author_url>
  <blog_title>佐藤百貨店</blog_title>
  <blog_url>https://www.sato-susumu.com/</blog_url>
  <categories>
  </categories>
  <description>LangChainでテキストを分割するとき、ライブラリに含まれるRecursiveCharacterTextSplitterをそのまま使っても問題ないんだけど、なんとなく素人考えで、分割したテキストも読みやすい方がいいかなーと思って、句読点で分割してくれるTextSplitterを作ってみました。 ソースコード &quot;\n\n&quot;で分割して、長過ぎたら&quot;\n&quot;で分割して、それでも長過ぎたら句読点で分割してと繰り返して適切な長さになるまで分割します。 from typing import Any from langchain.text_splitter import RecursiveCharacte…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.sato-susumu.com%2Fentry%2F2023%2F04%2F30%2F131338&quot; title=&quot;LangChain用に句読点で分割してくれるTextSplitterを作ってみた - 佐藤百貨店&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-04-30 13:13:38</published>
  <title>LangChain用に句読点で分割してくれるTextSplitterを作ってみた</title>
  <type>rich</type>
  <url>https://www.sato-susumu.com/entry/2023/04/30/131338</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
