文档帮助中心文档
从文档或词袋模型中删除短词
newDocuments = removeShortWords(文档、兰)
newBag = removeShortWords(袋、兰)
例子
newDocuments= removeShortWords (文档,len)删除长度的单词len或更少文档.
newDocuments= removeShortWords (文档,len)
newDocuments
文档
len
newBag= removeShortWords (袋,len)删除长度的单词len或者更少bagOfWords对象袋.
newBag= removeShortWords (袋,len)
newBag
袋
bagOfWords
全部折叠
从文档中删除两个或更少字符的单词。
文档= tokenizedDocument ("一个短句的例子");newDocument = removeShortWords(文档(2)
newDocument = tokenizedDocument: 3 token:示例短句子
从单词袋模型中去掉两个或更少字符的单词。
文件= tokenizedDocument ([...一个短句的例子第二个短句]);袋= bagOfWords(文件);newBag = removeShortWords(袋、2)
newBag = bagOfWords with properties: Counts: [2x4 double] Vocabulary: ["example" "short" "sentence" "second"] NumWords: 4 NumDocuments: 2
tokenizedDocument
输入文档,指定为tokenizedDocument数组中。
输入词袋模型,指定为bagOfWords对象。
要删除的字的最大长度,指定为正整数。函数删除带有的单词len或更少的字符。
输出文档,作为tokenizedDocument数组中。
输出词袋模型,返回为bagOfWords对象。
removeWords|stopWords|removeLongWords|normalizeWords|tokenizedDocument|bagOfWords|bagOfNgrams
removeWords
stopWords
removeLongWords
normalizeWords
bagOfNgrams
您有这个示例的修改版本。您想打开这个示例与您的编辑吗?
你点击一个链接对应于这个MATLAB命令:
通过在MATLAB命令窗口中输入命令来运行命令。Web浏览器不支持MATLAB命令。金宝app
选择一个网站,在那里获得翻译的内容,并看到当地的活动和优惠。根据您的位置,我们建议您选择:.
你也可以从以下列表中选择一个网站:
选择中国网站(中文或英文)以获得最佳网站性能。其他MathWorks国家站点没有针对您所在位置的访问进行优化。
与当地办事处联系