matlab生成文本乱码_如何生成完全随机/乱码文本的段落

本文介绍了当Lorem Ipsum不足以模拟文本时,如何使用随机文本生成器工具,特别是生成无法阅读的乱码文本。这个工具允许用户自定义段落、句子和单词的长度,提供了一个方便的占位符替代方案。文章还提供了下载链接。
摘要由CSDN通过智能技术生成
matlab生成文本乱码

matlab生成文本乱码

image

You probably already know about Lorem Ipsum or perhaps tools such as Random Text Generator, however what can end up happening is – despite the nature of the text – people still focus on the text and attempt to read it. When situations such as this happen, using completely random or gibberish text can come in handy.

您可能已经知道Lorem Ipsum或诸如Random Text Generator之类的工具,但是尽管文本具有本质,但最终可能会发生的事情是人们仍然专注于文本并尝试阅读它。 当发生这种情况时,使用完全随机或乱码的文本可能会派上用场。

当Lorem Ipsum不够用时 (When Lorem Ipsum Isn’t Enough)

Wikipedia defines Lorum Ipsum’s common use as:

维基百科将Lorum Ipsum的常用用法定义为:

In publishing and graphic design, lorem ipsum is placeholder text (filler text) commonly used to demonstrate the graphics elements of a document or visual presentation, such as font, typography, and layout, by removing the distraction of meaningful content.

在发布和图形设计中,lorem ipsum是占位符文本(填充文本),通常用于通过消除有意义的内容的分散性来演示文档或视觉表示的图形元素,例如字体,字体和布局。

This works in a lot of cases, but sometimes you will have those who focus on the text (“hey, the text is in Latin”) and attempt to read it because, after all, the text is pronounceable. Using random word generators can yield the same results (“hey, that text doesn’t make any sense”). Obviously, this defeats the whole point of filler text.

这在很多情况下都有效,但是有时您会得到那些专注于文本的人(“嘿,文本是拉丁语”)并尝试阅读它,因为毕竟文本是可发音的。 使用随机单词生成器可以产生相同的结果(“嘿,该文本没有任何意义”)。 显然,这破坏了填充文本的重点。

So for cases like this, using completely random text to the point where it is just characters in paragraph form can be handy. One glance at the text and it is immediately obvious that the content is merely a placeholder.

因此,对于这种情况,使用完全随机的文本到段落形式的字符就很方便了。 乍一看文本,很明显内容只是一个占位符。

随机文本生成器工具 (Random Text Generator Tool)

The Random Text Generator tool is a slightly modified version of a batch script with the same name (both are available for download using the links at the bottom of the article) which has been converted to an EXE file for ease of anticipated/typical use.

随机文本生成器工具是具有相同名称的批处理脚本的稍作修改的版本(都可以使用文章底部的链接下载),该脚本已转换为EXE文件 ,以便于预期/典型使用。

Default options are:

默认选项是:

  • Text which is 3 paragraphs

    3段文字
  • paragraphs between 5 and 8 sentences long

    5至8个句子之间的段落
  • sentences between 6 and 10 words long

    长度在6到10个单词之间的句子
  • words between 3 and 10 characters long

    长度在3到10个字符之间的单词

So by simply running the RandomText.exe file the output will open in Notepad and resemble something like the following:

因此,只需运行RandomText.exe文件,输出将在记事本中打开,类似于以下内容:

image

If you would like to override these settings, you would need to run the tool from the command line and specify the appropriate switches. The help information (available by running “RandomText /?” from the command line) displays the following information:

如果要覆盖这些设置,则需要从命令行运行该工具并指定适当的开关。 帮助信息(可通过从命令行运行“ RandomText /?”获得)显示以下信息:

image

For example, the following produces 10 random sentences using the default sentence and word length:

例如,以下使用默认句子和单词长度生成10个随机句子:

RandomText /T 10 /P 1 1

随机文本/ T 10 / P 1 1

image

This command produces a single paragraph with 20 sentences between 15 and 20 words long where a word is between 3 and 5 characters:

此命令生成一个单段,其中包含20个句子,长度在15到20个单词之间,其中一个单词在3到5个字符之间:

RandomText /T 1 /P 20 20 /S 15 20 /W 3 5

随机文本/ T 1 / P 20 20 / S 15 20 / W 3 5

image

结论 (Conclusion)

While a tool like this can seem a bit absurd, it definitely can have its place. Of course, the uses are not limited to mere placeholder text generation as pretty much anywhere you need to use garbage text, this tool can be of value.

尽管这样的工具看起来有些荒谬,但它绝对可以占有一席之地。 当然,用途不仅仅限于占位符文本生成,因为几乎在您需要使用垃圾文本的任何地方,此工具都很有价值。

下载链接 (Download Links)

Random Text Generator – modified executable format

随机文本生成器–修改后的可执行格式

Random Text Generator – source batch files (more command line oriented)

随机文本生成器–源批处理文件 (更多面向命令行)

翻译自: https://www.howtogeek.com/137039/how-to-generate-paragraphs-of-completely-randomgibberish-text/

matlab生成文本乱码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值