Main Content

doc2cell

문서를 string형 벡터로 구성된 셀형 배열로 변환

설명

예제

C = doc2cell(documents)tokenizedDocument 배열을 셀형 배열로 변환합니다. C의 항목은 각 문서의 대응되는 단어를 포함하는 string형 배열입니다.

예제

모두 축소

tokenizedDocument 배열을 string형 벡터로 구성된 셀형 배열로 변환합니다.

documents = tokenizedDocument([ ...
    "an example of a short sentence" ...
    "a second short sentence"])
documents = 
  1x2 tokenizedDocument:

    6 tokens: an example of a short sentence
    4 tokens: a second short sentence

C = doc2cell(documents)
C=1×2 cell array
    {["an"    "example"    "of"    "a"    "short"    "sentence"]}    {["a"    "second"    "short"    "sentence"]}

셀형 배열의 첫 번째 요소를 표시합니다.

C{1}
ans = 1x6 string
    "an"    "example"    "of"    "a"    "short"    "sentence"

입력 인수

모두 축소

입력 문서로, tokenizedDocument 배열로 지정됩니다.

출력 인수

모두 축소

string형 벡터로 구성된 출력 셀형 배열. C의 각 요소는 대응되는 문서의 단어를 포함하는 string형 벡터입니다.

버전 내역

R2017b에 개발됨