Saturday, May 12, 2012

Perl Word Spin (for SEO) [req by PongZ]

<PongZ> ตาเล็ก help me pls
<PongZ> function spin($s){
<PongZ> preg_match(‘#\{(.+?)\}#is’,$s,$m);
<PongZ> if(empty($m)) return $s;
<PongZ> $t = $m[1];
<PongZ> if(strpos($t,’{‘)!==false){
<PongZ> $t = substr($t, strrpos($t,’{‘) + 1);
<PongZ> }
<PongZ> $parts = explode(“|”, $t);
<PongZ> $s = preg_replace(“+\{“.preg_quote($t).”\}+is”, $parts[array_rand($parts)], $s, 1);
<PongZ> return spin($s);
<PongZ> }
<PongZ> convert เปน perl ให้ที
<PongZ> อิอิ

จัดไป .. แต่เขียนต่าง จาก php ด้านบนคนละเรื่องเลยนะ
#!/usr/bin/perl -w

my $word = q#{A|The} Roomba Vacuum {Review|Overview}

Have you {encountered|ever heard|known|experienced|used} {a|the|any} Roomba Vacuum {before|earlier}?  If {you're|you are} {not|not really} {familiar|used|known}  its, {it's|it is} {a|the|the best} {robotic|automatic|robot} vacuum that's {made|created|designed|developed} {by|from} the iRobot {company|brands}.  {We all|Most of us} {know|understand|recognize} that {vacuuming|vacuum-cleaning} is {not really|never|not} {fun|exciting|interesting|pleasure|enjoyable}.  {So|So that} is this the {answer|solution} to {our|your} {problems|issues|troubles}?  {Judging|Knowing} {from the|by the} {different|various|several} Roomba Vacuum {reviews|testimonials|review articles}, {it is|it can be|it's} {the|your} answer if {you're|you are} {looking|seeking} to {automate|automatic systems} a laborious {task|job}.

This {short|brief|quick} Roomba Vacuum {review|reviews} {will|may|are going to|can} help convince you that {in|inside|with} this modern time and age, {a|the} {robotic|automatic|robot} {vacuum|vacuum machine|cleaner|vacuum cleaner|machine} is {needed|necessary}.  

{Here|next|right|There} are {just|only|basically} some of the {features|functions} of {this|this particular} futuristic {appliance|device|product}:

• {Vacuuming|Hoovering} {without|without the need of|with out|with no|not having} lifting  {a|the|any|your} finger.

{Well|Perfectly}, {that's|that is} a {little|very little} bit {of|from} an exaggeration {since|because} {you|that you}|that is {still|always} {need|want|require} to lift your finger.  But that's {just|only} to {press|push|touch|click} {on|at} the button on the {machine|Roomba Vacuum|devices|robot}.  {After|Right after|Once|When|Shortly after} doing {it|this|that}, {the|a} Roomba Vacuum {will|are going to|can} do {all|all the|everything|all of the} hard work for {you|anyone}.  {You|We} {don't|do not} even {need|have} to get off your {couch|sofa|computer|seat} to clean underneath {it|that} {because|simply because|since} {the|your|a} {vacuum|vacuum machine|vacuum cleaner|machine|Roomba Vacuum} is compact and {smart|clever|intelligent|wise} enough to clean that {area|room|spot|space|location}.

• Artificial {intelligence|mind|ability|cleverness}

{It|This} {may|might|may possibly} {sound|seem} {like|just like} {another|one other} exaggeration {but|however,} {it's|it is|the saying} {truly|really} {packed|loaded} with {features|functions} that can only be {described|explained} as artificial {intelligence|mind}.  {The|A} {different|other} Roomba Vacuum {reviews|review articles|review|reviews articles|reviews article} {talked|discussed} {about|on|on the subject of} how {smart|good|clever} {the|a} product is {especially|specially|specifically} {with|together with|by using|using|by} {its|their} {sensors|detector}.  {It|That} can {easily|conveniently|very easily} {switch|change|change the} {settings|setting|options|commands} while {moving from|working on|vacumming on|running} carpet to floor to {protect|save} your flooring.  {It's|It is} {smart|good|clever} enough to {detect|identify|see|recognize} {stairs|steps|stairway} {so|well|so that} it {wouldn't fall|would not fall|wouldn't falls| {off|from the 2nd floors}.  {It's|It is|It's also|It is also} {smart|good} enough to avoid tangles.  {It's|It is} even {smart|intelligent} enough {to|you can easily programmed its to|in order to} {clean|working|waking and start the task} on schedule.  {You|We} also {don't|do not} have to worry {about|with|about roomba vacuum} it getting lost underneath your {couch|rest} {because|after} it {will goes|goes|immidiatly goes|will go|go|will back} home to its dock after {it's|it is} {done|finish|finishing} its {work|commands|task} or if {battery|energy} {is running low.|running low|ran out|low|go to zero}

{After|Following|Right after|Once} {reading|seeing} this Roomba Vacuum {review|examine}, you're {probably|most likely} now convinced that {it's|it is} a {must-have|must have} {in|with} {every|your|any} {home|house|family}.  {At|On} the very {least|minimum}, it can {help|support|assistance} {you|you to} free {yourself|your self|oneself} from storing and {operating|working} {bulky|heavy|big|large} vacuums.  {Add|Include} {that|this} to the mentioned {features|contains|has|functions} {and|and then} {it's|it is} {a no-brainer|no brainer} that {you|everyone} {have to buy it.|have to buy this Roomba Vacuum|need the Roomba Vacuum}
#;

my $spin = spin($word);
print "$spin\n";

sub spin {
my $return;
my @line = split(/\r?\n/, $_[0]);
foreach my $string (@line){
while(my ($regex1, $regex2) = $string =~ m/(.*\{([^{}]+)\}.*)$/ig){
my @arr = split(/\|/, $regex2);
my $rand = $arr[int rand(@arr)];
$regex2 = quotemeta $regex2;
my @arr_tmp = split("{$regex2}", $regex1, 2);
$string = join("$rand", @arr_tmp);
}
$return .= $string."\n";
}
return $return;
}


ex.
pirate@BlackBuntu~/thdz/temp$ ./spin.pl
A Roomba Vacuum Review

Have you encountered any Roomba Vacuum earlier? If you are not really used its, it is a robotic vacuum that’s designed by the iRobot company. Most of us recognize that vacuuming is not really interesting. So that is this the solution to our troubles? Judging by the several Roomba Vacuum testimonials, it can be the answer if you’re looking to automatic systems a laborious task.

This short Roomba Vacuum review will help convince you that in this modern time and age, a robotic vacuum cleaner is needed.

Here are only some of the features of this futuristic product:

• Hoovering with out lifting the finger.

Well, that is a little bit of an exaggeration because that you|that is still want to lift your finger. But that’s only to touch at the button on the robot. Once doing it, the Roomba Vacuum will do all of the hard work for anyone. We don’t even need to get off your sofa to clean underneath that because your machine is compact and intelligent enough to clean that room.

• Artificial ability

It may possibly sound just like another exaggeration however, it’s truly packed with features that can only be explained as artificial mind. A different Roomba Vacuum reviews article talked about how smart a product is specifically by their sensors. That can conveniently change the setting while moving from carpet to floor to protect your flooring. It’s smart enough to recognize stairway well it {wouldn’t fall|would not fall|wouldn’t falls| from the 2nd floors. It’s also good enough to avoid tangles. It is even intelligent enough to clean on schedule. You also don’t have to worry about it getting lost underneath your rest because it will goes home to its dock after it is finish its work or if battery running low

Once reading this Roomba Vacuum review, you’re probably now convinced that it’s a must-have with every family. At the very least, it can help you to free your self from storing and working bulky vacuums. Include this to the mentioned functions and then it is no brainer that you have to buy it.

pirate@BlackBuntu~/thdz/temp$ ./spin.pl
The Roomba Vacuum Overview

Have you used any Roomba Vacuum before? If you’re not really used its, it’s the best automatic vacuum that’s designed from the iRobot brands. We all know that vacuuming is never interesting. So is this the answer to your problems? Knowing by the several Roomba Vacuum reviews, it can be the answer if you are looking to automate a laborious task.

This brief Roomba Vacuum reviews can help convince you that in this modern time and age, a robot vacuum is necessary.

Here are just some of the features of this futuristic device:

• Vacuuming with out lifting your finger.

Perfectly, that is a little bit from an exaggeration because that you|that is still need to lift your finger. But that’s only to push at the button on the robot. Shortly after doing it, a Roomba Vacuum will do everything hard work for you. You don’t even have to get off your seat to clean underneath that simply because a machine is compact and clever enough to clean that room.

• Artificial cleverness

This might seem just like one other exaggeration but it is truly loaded with features that can only be explained as artificial mind. The other Roomba Vacuum reviews articles talked on how smart a product is especially by using their detector. That can conveniently switch settings while running carpet to floor to save your flooring. It is smart enough to identify steps so that it {wouldn’t fall|would not fall|wouldn’t falls| off. It’s good enough to avoid tangles. It’s even smart enough you can easily programmed its to clean on schedule. You also do not have to worry with it getting lost underneath your couch because it will back home to its dock after it is done its commands or if battery is running low.

Once reading this Roomba Vacuum review, you’re most likely now convinced that it is a must have with any home. At the very least, it can support you free your self from storing and operating large vacuums. Include this to the mentioned contains and then it is a no-brainer that you need the Roomba Vacuum

pirate@BlackBuntu~/thdz/temp$

No comments:

Why You Don't LIKE My FaceBook Fanpage ?
×
blogger