NAME
Acme::Lingua::ZH::Remix - The Chinese sentence generator.
SYNOPSIS
use Acme::Lingua::ZH::Remix;
rand_sentence;
DESCRIPTION
The exported function rand_sentence
returns a string of one sentence of Chinese like:
真是完全失敗,孩子!怎麼不動了呢?
It uses the corpus data from Project Gutenberg by default. All generate sentences are remixes of the corpus.
You can feed you own corpus data with `init_phrase` function:
Acme::Lingua::ZH::Remix::init_phrase($my_corpus);
say rand_santence; # based on $my_corpus
This will effectively clear the default corpus, and any other corpus fed into it before. The corpus should use full-width punction characters.
Warning: The rand_sentence
function has non-zero chance entering an infinte loop.
COPYRIGHT
Copyright 2010 by Kang-min Liu, <gugod@gugod.org>
This program is free software; you can redistribute it a nd/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 128:
Non-ASCII character seen before =encoding in '真是完全失敗,孩子!怎麼不動了呢?'. Assuming UTF-8