string - Convert scalar document to string vector - MATLAB (original) (raw)
Main Content
Convert scalar document to string vector
Syntax
Description
[words](#d126e47503) = string([document](#mw%5F7de2611e-00c2-4de2-9e52-d634c949db2d%5Fsep%5Fmw%5F84efa72d-f7f9-4ebe-aea4-db7024508e60))
converts a scalar tokenizedDocument
to a string array of words.
Examples
Convert Document to String
Convert a scalar tokenized document to a string array of words.
document = tokenizedDocument("an example of a short sentence")
document = tokenizedDocument:
6 tokens: an example of a short sentence
words = 1x6 string "an" "example" "of" "a" "short" "sentence"
Input Arguments
document
— Input document
scalar tokenizedDocument
object
Input document, specified as a scalar tokenizedDocument
object.
Output Arguments
words
— Output words
string vector
Output words, returned as a string vector.
Version History
Introduced in R2017b