<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: PHP Lorem Ipsum</title> <atom:link href="http://tinsology.net/scripts/php-lorem-ipsum-generator/feed/" rel="self" type="application/rss+xml" /><link>http://tinsology.net</link> <description>Searching for the Right Questions</description> <lastBuildDate>Sat, 18 Feb 2012 21:34:20 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Ruben de Vries</title><link>http://tinsology.net/scripts/php-lorem-ipsum-generator/comment-page-1/#comment-7800</link> <dc:creator>Ruben de Vries</dc:creator> <pubDate>Mon, 16 May 2011 08:32:49 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?page_id=903#comment-7800</guid> <description>Very nice class saving me a few hours of writing my own!</description> <content:encoded><![CDATA[<p>Very nice class saving me a few hours of writing my own!</p> ]]></content:encoded> </item> <item><title>By: syntax</title><link>http://tinsology.net/scripts/php-lorem-ipsum-generator/comment-page-1/#comment-7141</link> <dc:creator>syntax</dc:creator> <pubDate>Fri, 29 Apr 2011 17:40:43 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?page_id=903#comment-7141</guid> <description>Tinley,
Very nice work.  Thanks for putting in the time on this, the generator works perfectly.  I am working to add support for multiple languages/dictionaries to use with this.
Thanks!</description> <content:encoded><![CDATA[<p>Tinley,</p><p>Very nice work.  Thanks for putting in the time on this, the generator works perfectly.  I am working to add support for multiple languages/dictionaries to use with this.</p><p>Thanks!</p> ]]></content:encoded> </item> <item><title>By: Tinsley</title><link>http://tinsology.net/scripts/php-lorem-ipsum-generator/comment-page-1/#comment-4834</link> <dc:creator>Tinsley</dc:creator> <pubDate>Sun, 19 Dec 2010 23:47:04 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?page_id=903#comment-4834</guid> <description>I actually decided to implement it in the punctuate function.
[sourcecode language=&quot;php&quot;]
private function punctuate(&amp; $sentence)
{
$count = count($sentence);
$sentence[$count - 1] = $sentence[$count - 1] . &#039;.&#039;;
if($count &lt; 4)
return $sentence;
$commas = $this-&gt;numberOfCommas($count);
for($i = 1; $i &lt;= $commas; $i++)
{
$index = (int) round($i * $count / ($commas + 1));
if($index &lt; ($count - 1) &amp;&amp; $index &gt; 0)
{
$sentence[$index] = $sentence[$index] . &#039;,&#039;;
}
}
$sentence[0] = ucfirst($sentence[0]); //capitalize the first word
}
[/sourcecode]</description> <content:encoded><![CDATA[<p>I actually decided to implement it in the punctuate function.</p><pre class="brush: php; title: ; notranslate">
private function punctuate(&amp; $sentence)
{
	$count = count($sentence);
	$sentence[$count - 1] = $sentence[$count - 1] . '.';
	if($count &lt; 4)
		return $sentence;
	$commas = $this-&gt;numberOfCommas($count);
	for($i = 1; $i &lt;= $commas; $i++)
	{
		$index = (int) round($i * $count / ($commas + 1));
		if($index &lt; ($count - 1) &amp;&amp; $index &gt; 0)
		{
			$sentence[$index] = $sentence[$index] . ',';
		}
	}
	$sentence[0] = ucfirst($sentence[0]); //capitalize the first word
}
</pre>]]></content:encoded> </item> <item><title>By: Tinsley</title><link>http://tinsology.net/scripts/php-lorem-ipsum-generator/comment-page-1/#comment-4833</link> <dc:creator>Tinsley</dc:creator> <pubDate>Sun, 19 Dec 2010 23:45:05 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?page_id=903#comment-4833</guid> <description>A couple people have suggested upper casing the first letter in the past but I never actually got around to implementing it. I have a bit of free time now so I think I&#039;m going to go ahead and implement that as well as add a few things. Thanks for reminding me.
I would be interested in seeing the code you were using before. I never really intended to generate very realistic results. Just a close enough approximation to use for dummy text.
Thanks,
-Matt</description> <content:encoded><![CDATA[<p>A couple people have suggested upper casing the first letter in the past but I never actually got around to implementing it. I have a bit of free time now so I think I&#8217;m going to go ahead and implement that as well as add a few things. Thanks for reminding me.</p><p>I would be interested in seeing the code you were using before. I never really intended to generate very realistic results. Just a close enough approximation to use for dummy text.</p><p>Thanks,<br
/> -Matt</p> ]]></content:encoded> </item> <item><title>By: Mvaldez</title><link>http://tinsology.net/scripts/php-lorem-ipsum-generator/comment-page-1/#comment-4827</link> <dc:creator>Mvaldez</dc:creator> <pubDate>Sun, 19 Dec 2010 12:03:27 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?page_id=903#comment-4827</guid> <description>Sorry, in my previous post I suggested the punctuate function can do the uppercasing. Stupid me, it could be in getPlain: just using ucfirst on the 0 element from the &quot;s&quot; array inside the foreach loop for the sentences array, does the trick.
Very nice.
Regards, MV</description> <content:encoded><![CDATA[<p>Sorry, in my previous post I suggested the punctuate function can do the uppercasing. Stupid me, it could be in getPlain: just using ucfirst on the 0 element from the &#8220;s&#8221; array inside the foreach loop for the sentences array, does the trick.</p><p>Very nice.</p><p>Regards, MV</p> ]]></content:encoded> </item> <item><title>By: Mvaldez</title><link>http://tinsology.net/scripts/php-lorem-ipsum-generator/comment-page-1/#comment-4826</link> <dc:creator>Mvaldez</dc:creator> <pubDate>Sun, 19 Dec 2010 11:50:53 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?page_id=903#comment-4826</guid> <description>Hi. Thanks for sharing this. This is very useful, specially to generate dummy content for a database programmatically, or to &quot;loremize&quot; a client&#039;s database (for example, I need the relationships in the data, but not the data itself, so I replace the actual data with lorem text, preserving the relationship of the records from different tables).
I&#039;ve been using Markov chains with text extracted from Latin books from the Gutenberg Project, which creates some (very realistic) Latin dummy text, but the script is painfully slow and memory hungry. (FTR, I used Erasmus Letters and Cicero Orations as source Latin text).
Your script is lost faster. Even if I replace the words array with a list of three thousand Latin words, it is still faster. (FTR, the Latin list I used was from http://www.math.ubc.ca/~cass/frivs/latin/latin-dict-full.html).
For your next version, may I suggest uppercase the first letter after a period? I can do it be searching/replacing the returned string, but I think the punctuate function in you class can take care of that too.
Again, thanks for sharing.
Regards, MV</description> <content:encoded><![CDATA[<p>Hi. Thanks for sharing this. This is very useful, specially to generate dummy content for a database programmatically, or to &#8220;loremize&#8221; a client&#8217;s database (for example, I need the relationships in the data, but not the data itself, so I replace the actual data with lorem text, preserving the relationship of the records from different tables).</p><p>I&#8217;ve been using Markov chains with text extracted from Latin books from the Gutenberg Project, which creates some (very realistic) Latin dummy text, but the script is painfully slow and memory hungry. (FTR, I used Erasmus Letters and Cicero Orations as source Latin text).</p><p>Your script is lost faster. Even if I replace the words array with a list of three thousand Latin words, it is still faster. (FTR, the Latin list I used was from <a
href="http://www.math.ubc.ca/~cass/frivs/latin/latin-dict-full.html" rel="nofollow">http://www.math.ubc.ca/~cass/frivs/latin/latin-dict-full.html</a>).</p><p>For your next version, may I suggest uppercase the first letter after a period? I can do it be searching/replacing the returned string, but I think the punctuate function in you class can take care of that too.</p><p>Again, thanks for sharing.</p><p>Regards, MV</p> ]]></content:encoded> </item> <item><title>By: Vijay</title><link>http://tinsology.net/scripts/php-lorem-ipsum-generator/comment-page-1/#comment-3539</link> <dc:creator>Vijay</dc:creator> <pubDate>Sun, 22 Aug 2010 02:38:04 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?page_id=903#comment-3539</guid> <description>hey thanks a lot for this it&#039;s really helpful! very easy to use and gonna save me lots of time</description> <content:encoded><![CDATA[<p>hey thanks a lot for this it&#8217;s really helpful! very easy to use and gonna save me lots of time</p> ]]></content:encoded> </item> <item><title>By: Rufas</title><link>http://tinsology.net/scripts/php-lorem-ipsum-generator/comment-page-1/#comment-2818</link> <dc:creator>Rufas</dc:creator> <pubDate>Wed, 31 Mar 2010 16:09:23 +0000</pubDate> <guid
isPermaLink="false">http://tinsology.net/?page_id=903#comment-2818</guid> <description>Thanks to you, I now have a working Lorem Ipsum Generator on my computer to work offline.
Although it is not much, here is the &#039;GUI&#039; to use with your script.
http://sites.google.com/site/rufaswan/LoremIpsumGenerator.php
Thanks
- Rufas</description> <content:encoded><![CDATA[<p>Thanks to you, I now have a working Lorem Ipsum Generator on my computer to work offline.</p><p>Although it is not much, here is the &#8216;GUI&#8217; to use with your script.</p><p><a
href="http://sites.google.com/site/rufaswan/LoremIpsumGenerator.php" rel="nofollow">http://sites.google.com/site/rufaswan/LoremIpsumGenerator.php</a></p><p>Thanks</p><p>- Rufas</p> ]]></content:encoded> </item> </channel> </rss>
