WordCount

WordCount["string"]

给出 string 中单词的总数.

更多信息

  • WordCount 不计入 "string" 中没有被识别为某个单词的一部分的字符序列.

范例

打开所有单元关闭所有单元

基本范例  (1)

计算字符串所含单词的数目:

属性和关系  (2)

空字符串有0个单词:

由连字符连在一起的单词算作一个单词:

巧妙范例  (1)

找出一本书中有最多单词的句子:

与字符串长度最长的句子相比:

Wolfram Research (2015),WordCount,Wolfram 语言函数,https://reference.wolfram.com/language/ref/WordCount.html.

文本

Wolfram Research (2015),WordCount,Wolfram 语言函数,https://reference.wolfram.com/language/ref/WordCount.html.

CMS

Wolfram 语言. 2015. "WordCount." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/WordCount.html.

APA

Wolfram 语言. (2015). WordCount. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/WordCount.html 年

BibTeX

@misc{reference.wolfram_2024_wordcount, author="Wolfram Research", title="{WordCount}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/WordCount.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_wordcount, organization={Wolfram Research}, title={WordCount}, year={2015}, url={https://reference.wolfram.com/language/ref/WordCount.html}, note=[Accessed: 22-November-2024 ]}