Main Content

upper

Convert documents to uppercase

Description

newDocuments = upper(documents) converts each lowercase character in the input documents to the corresponding uppercase character, and leaves all other characters unchanged.

example

Examples

collapse all

Convert all lowercase characters in an array of documents to uppercase.

documents = tokenizedDocument([
    "An Example of a Short Sentence" 
    "A Second Short Sentence"])
documents = 
  2x1 tokenizedDocument:

    6 tokens: An Example of a Short Sentence
    4 tokens: A Second Short Sentence

newDocuments = upper(documents)
newDocuments = 
  2x1 tokenizedDocument:

    6 tokens: AN EXAMPLE OF A SHORT SENTENCE
    4 tokens: A SECOND SHORT SENTENCE

Input Arguments

collapse all

Input documents, specified as a tokenizedDocument array.

Output Arguments

collapse all

Output documents, returned as a tokenizedDocument array.

Version History

Introduced in R2017b