Remove the words with seven or greater characters from a bag-of-words model.
documents = tokenizedDocument([ ..."an example of a short sentence""a second short sentence"]);
bag = bagOfWords(documents);
newBag = removeLongWords(bag,7)
newBag =
bagOfWords with properties:
NumWords: 5
Counts: [2×5 double]
Vocabulary: ["an" "of" "a" "short" "second"]
NumDocuments: 2
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.