高度なテキスト分割ツール

区切り文字オプション

テキストを部分に分けるために使用される文字。(デフォルトはスペース)

テキストを分割する正規表現。(デフォルトでは複数のスペース)

各出力チャンクの記号の数。

出力における同じ長さのチャンクの数。

出力セパレーターオプション

分割されたチャンクの間の文字。(デフォルトでは改行)

追加オプション:

高度なテキスト分割ツールの使い方

  1. テキストを貼り付けてください
    • ツールの上部にある大きなテキストフィールドに、分割したいテキストを貼り付けるか、入力してください。長いテキストの場合は、ツールバーの「ファイルを選択」オプションから .txt ファイルをインポートすることもできます。
    • テストするには、「例」ボタンを使ってサンプルテキストを読み込んでください。これは、自分のデータを使う前に、さまざまな分割方法がどのように機能するかを学ぶのに役立ちます。
  2. 分割方法の設定
    • 記号で分割: 特定の文字(カンマ、スペース、セミコロンなど)が出現するたびにテキストを区切るには、これを選択します。デフォルトはスペースで、テキストを単語に分けます。
    • 正規表現で分割: 精密な分割ルールには正規表現を使用します。デフォルト [^\a-zA-Z]+ 文字でない任意の文字の並びに対して分割します。それは、混在した句読点があっても単語を分割します。
    • 長さの分割: この方法は、テキストを固定文字数の塊に分割します。等しい部分を作成するために生成したい文字数(例:100)を入力してください。ソーシャルメディアの投稿や文字数制限のあるSMSメッセージに最適です。
    • チャンク数で分割: テキストを分割する同じ長さのセグメントの数を選択してください。その後、このツールは各チャンクの長さを自動的に計算します。
  3. 出力と追加オプションのカスタマイズ
    • 設定する 出力セパレーター 分割された部分が結果ボックスでどのように結合されるかを制御するため。改行(\n) は各セクションをそれぞれの行に配置します。パイプ(|) またはコンマは、区切り文字を使った一行リストを作ります。
    • 使用する チャンク前の文字 そして チャンク後の文字 引用符や括弧のように、分割された各部分に接頭辞や接尾辞を追加するフィールド。
    • 探検する 追加オプション「区切り文字を保持」は結果にセパレーター文字を残し、「各部分に番号を付ける」は分割された各セグメントに連番を追加し、「空の部分を無視」は空の項目を削除し、「各行のスペースをトリム」は先頭と末尾のスペースを削除します。
  4. 実行してエクスポート
    • クリックする テキストを分割 入力を分割してください。結果は下のテキストセクションにすぐ表示されます。
    • クリック 結果をコピー 出力をクリップボードにコピーするか ダウンロード それをtxtファイルとしてダウンロードするために。 「すべてクリア」 ボタンはツール全体をリセットし、新しい課題に備えます。

実用的な例と使用事例

例 1: コンマ区切りリスト (CSV データ) の処理

Let’s say you have some survey data or a basic CSV file that is not properly formatted. You want to put the individual things into a nice vertical list for study, or to import into another application.

apple, banana, cherry, date, elderberry, fig

設定: Choose 記号で分割 and type a comma (,) into the symbol box. Set the 出力セパレーター to newline (\n). Get clean results by selecting スペースをトリム and 空の部分をスキップ.

This method is great for data cleansing, building lists for databases or preparing tags for a website CMS from one string of text.

出力: All stray spaces removed, and every fruit is on its own line. The output is an organized list, ready to be used further.

apple
banana
cherry
date
elderberry
fig

例 2: SMSやソーシャルメディア投稿のためのテキストのフォーマット

If you’re using a platform like Twitter (X) or SMS, there are quite severe character constraints. If you have a long message, you need to break it up into compliant portions and keep it readable.

Thank you for being part of the yearly tech conference. The talk on AI ethics was especially informative, stressing the importance of transparent algorithms. We are looking forward to seeing you at the workshop tomorrow.

設定: Select 長さで分割 and set 160 (a common SMS limit). The program will break the text into parts of exactly 160 characters. You may also add things like "(1/3)" to each bit with the "Char Before/After Chunk".

出力: The text is now split into chunks within the character limit. This ensures that your complete message is sent and not cut off by the platform.

Thank you for being part of the yearly tech conference. The talk on AI ethics was especially informative, stressing the importance of transparent algorithms. We are looking forward to seeing you at the workshop tomorrow.