MATLAB ヘルプ センター
単語連結による文書から string への変換
newStr = joinWords(documents)
newStr = joinWords(documents,delim)
newStr = joinWords(documents) は、各文書内の単語をスペースで連結することにより、tokenizedDocument 配列を string 配列に変換します。
newStr
documents
tokenizedDocument
例
newStr = joinWords(documents,delim) は、スペースの代わりに区切り文字 delim を使用して単語を連結します。
delim
すべて折りたたむ
単語をスペースで連結して、tokenizedDocument 配列を string 配列に変換します。
documents = tokenizedDocument([ "an example of a short sentence" "a second short sentence"])
documents = 2×1 tokenizedDocument: 6 tokens: an example of a short sentence 4 tokens: a second short sentence
str = joinWords(documents)
str = 2×1 string "an example of a short sentence" "a second short sentence"
単語をアンダースコアで連結して、tokenizedDocument 配列を string 配列に変換します。
str = joinWords(documents,"_")
str = 2×1 string "an_example_of_a_short_sentence" "a_second_short_sentence"
入力文書。tokenizedDocument 配列として指定します。
単語を連結する区切り記号。string スカラー、文字ベクトル、または文字ベクトルを含むスカラー cell 配列として指定します。
例: "_"
"_"
例: '_'
'_'
例: {'_'}
{'_'}
データ型: char | string | cell
char
string
cell
出力テキスト。string 配列として返されます。
データ型: string
R2017b で導入
context | doclength | doc2cell | string | tokenizedDocument
context
doclength
doc2cell
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ