MATLAB 도움말 센터
문서 또는 bag-of-words 모델에서 짧은 단어 제거
newDocuments = removeShortWords(documents,len)
newBag = removeShortWords(bag,len)
newDocuments = removeShortWords(documents,len)은 documents에서 길이가 len 이하인 단어를 제거합니다.
newDocuments
documents
len
예제
newBag = removeShortWords(bag,len)은 bagOfWords 객체 bag에서 길이가 len 이하인 단어를 제거합니다.
newBag
bag
bagOfWords
모두 축소
문서에서 2자 이하로 이루어진 단어를 제거합니다.
document = tokenizedDocument("An example of a short sentence"); newDocument = removeShortWords(document,2)
newDocument = tokenizedDocument: 3 tokens: example short sentence
bag-of-words 모델에서 2자 이하로 이루어진 단어를 제거합니다.
documents = tokenizedDocument([ ... "an example of a short sentence" "a second short sentence"]); bag = bagOfWords(documents); newBag = removeShortWords(bag,2)
newBag = bagOfWords with properties: NumWords: 4 Counts: [2×4 double] Vocabulary: ["example" "short" "sentence" "second"] NumDocuments: 2
tokenizedDocument
입력 문서로, tokenizedDocument 배열로 지정됩니다.
입력 bag-of-words 모델로, bagOfWords 객체로 지정됩니다.
제거할 단어의 최대 길이로, 양의 정수로 지정됩니다. 이 함수는 문자 개수가 len 이하인 단어를 제거합니다.
출력 문서로, tokenizedDocument 배열로 반환됩니다.
출력 bag-of-words 모델로, bagOfWords 객체로 반환됩니다.
R2017b에 개발됨
removeWords | stopWords | removeLongWords | normalizeWords | tokenizedDocument | bagOfWords | bagOfNgrams
removeWords
stopWords
removeLongWords
normalizeWords
bagOfNgrams
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의