Lorem Ipsum generator for Chinese It can generate words randomly including punctuation marks in Chinese
中文随机文本生成器
- sources for testing your word process libs or apps
- sources for testing your visualized pages or apps
可以用来测试你的中文文字处理库或者程序,也可以用来测试你的可视化页面。
npm install chinesegen
- require Chinese generator
var chinesegen = require('chinesegen');
- get the output object by calling the generator
var generated = chinesegen({count: 50});
- access generated text and infos
console.log(generated.text);
console.log(generated.sentenceCount);
- count: { Number }
the total word count of the generated paragraph 篇幅字数总长
- freq: { Boolean }
apply frequently used words 允许常用字
- toleratedPeriods: { String }
given characters(each represents one period) will be treated as unique periods appended to Chinese periods list
// treat both Chinese formal periods and '?.!' as full stops of the Chinese sentences
generate({count: 50, toleratedPeriods:'?.!'});
允许其他字符作句号
- text: { String }
random text 生成的随机文本
- total: { Number }
text total length 生成的文字总长度
- sentenceCount: { Number }
sentence count 句子数
MIT License