<?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: Markov Chains in Ruby</title>
	<atom:link href="http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/</link>
	<description>Technology and Psychology -- two facets of life</description>
	<lastBuildDate>Sun, 20 Nov 2011 12:56:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: crunchytoast.com &#187; Blog Archive &#187; &#8220;HMM, I&#8217;m a math nerd&#8221; or machine learning in Ruby!</title>
		<link>http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/comment-page-1/#comment-315022</link>
		<dc:creator>crunchytoast.com &#187; Blog Archive &#187; &#8220;HMM, I&#8217;m a math nerd&#8221; or machine learning in Ruby!</dc:creator>
		<pubDate>Fri, 01 May 2009 16:49:37 +0000</pubDate>
		<guid isPermaLink="false">http://bla.invisible.ch/?p=361#comment-315022</guid>
		<description>&lt;p&gt;[...] So! Check out the HMM Ruby Quiz and also Markov Chains in Ruby. These are examples of working code in under 50 or so lines. Also, for a clear if somewhat &#8220;mathy&#8221; explanation of Hidden Markov Processes and Markov Chains, check out Wikipedia&#8217;s HMM article. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] So! Check out the HMM Ruby Quiz and also Markov Chains in Ruby. These are examples of working code in under 50 or so lines. Also, for a clear if somewhat &#8220;mathy&#8221; explanation of Hidden Markov Processes and Markov Chains, check out Wikipedia&#8217;s HMM article. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ramakrishna</title>
		<link>http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/comment-page-1/#comment-209379</link>
		<dc:creator>ramakrishna</dc:creator>
		<pubDate>Sat, 21 Jun 2008 07:55:13 +0000</pubDate>
		<guid isPermaLink="false">http://bla.invisible.ch/?p=361#comment-209379</guid>
		<description>&lt;p&gt;s=raw&lt;em&gt;input(&quot;enter the string:&quot;)
l=len(s)
b=&quot;&quot;
w=&quot; &quot;
x=&quot;~!@#$%^&amp;*()&lt;/em&gt;+&#124;}{][&#039;&lt;&gt;?,./&quot;
m=len(x)
for i in range(l):
    c=0
    for j in range(m):
        if s[i]==x[j]:
            c=c+1
        elif s[i]==&quot;-&quot; or s[i]==&quot;/&quot;:
            w=w+b
    if c==0:
        w=w+s[i]
w=w.lower()
print &quot;w&quot;,w
x=w.split(&quot; &quot;)
y=float(len(x))
d={}
y=[]
max=0
for i in x:
    d[i]=d.get(i,0)+1
rev&lt;em&gt;items = [(v,k) for k,v in d.items()]
rev&lt;/em&gt;items.sort()
rev&lt;em&gt;items.reverse()
x=len(rev&lt;/em&gt;items)
index=1
rank=1
print &quot;keys&quot; &quot;\t\t\t\t&quot; &quot;values&quot; &quot;\t\t&quot;&quot;rank&quot;
for v, k in rev&lt;em&gt;items:
    temp=rev&lt;/em&gt;items[index][0]
    print &quot;%-20s%15d%15d&quot;%(k,v,rank)
    index+=1
    if temp
m=len(d)
print &quot;total word count:&quot;,m-1&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>s=raw<em>input(&#8220;enter the string:&#8221;)<br />
l=len(s)<br />
b=&#8221;"<br />
w=&#8221; &#8221;<br />
x=&#8221;~!@#$%^&amp;*()</em>+|}{]['&lt;&gt;?,./"<br />
m=len(x)<br />
for i in range(l):<br />
    c=0<br />
    for j in range(m):<br />
        if s[i]==x[j]:<br />
            c=c+1<br />
        elif s[i]==&#8221;-&#8221; or s[i]==&#8221;/&#8221;:<br />
            w=w+b<br />
    if c==0:<br />
        w=w+s[i]<br />
w=w.lower()<br />
print &#8220;w&#8221;,w<br />
x=w.split(&#8221; &#8220;)<br />
y=float(len(x))<br />
d={}<br />
y=[]<br />
max=0<br />
for i in x:<br />
    d[i]=d.get(i,0)+1<br />
rev<em>items = [(v,k) for k,v in d.items()]<br />
rev</em>items.sort()<br />
rev<em>items.reverse()<br />
x=len(rev</em>items)<br />
index=1<br />
rank=1<br />
print &#8220;keys&#8221; &#8220;\t\t\t\t&#8221; &#8220;values&#8221; &#8220;\t\t&#8221;"rank&#8221;<br />
for v, k in rev<em>items:<br />
    temp=rev</em>items[index][0]<br />
    print &#8220;%-20s%15d%15d&#8221;%(k,v,rank)<br />
    index+=1<br />
    if temp<br />
m=len(d)<br />
print &#8220;total word count:&#8221;,m-1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matheedubbas</title>
		<link>http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/comment-page-1/#comment-103572</link>
		<dc:creator>Matheedubbas</dc:creator>
		<pubDate>Sat, 08 Dec 2007 23:03:33 +0000</pubDate>
		<guid isPermaLink="false">http://bla.invisible.ch/?p=361#comment-103572</guid>
		<description>&lt;p&gt;Check my site: http://s3.dk &lt;/p&gt;

&lt;p&gt;I have made an implementation on SQL Server and C# that will render 
webpages with markov-linked content. I would like to do the same with 
MIDI. Anyone go any Ideas for an application ? &lt;/p&gt;

&lt;p&gt;regs, &lt;/p&gt;

&lt;p&gt;Matheedubbas &lt;/p&gt;

&lt;p&gt;http://s3.dk&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Check my site: <a href="http://s3.dk" rel="nofollow">http://s3.dk</a> </p>
<p>I have made an implementation on SQL Server and C# that will render<br />
webpages with markov-linked content. I would like to do the same with<br />
MIDI. Anyone go any Ideas for an application ? </p>
<p>regs, </p>
<p>Matheedubbas </p>
<p><a href="http://s3.dk" rel="nofollow">http://s3.dk</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: codex</title>
		<link>http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/comment-page-1/#comment-29665</link>
		<dc:creator>codex</dc:creator>
		<pubDate>Fri, 26 Jan 2007 10:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://bla.invisible.ch/?p=361#comment-29665</guid>
		<description>&lt;p&gt;This site is related:
&lt;a href=&quot;http://rubyquiz.com/quiz74.html&quot; title=&quot;ruby markov&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This site is related:<br />
<a href="http://rubyquiz.com/quiz74.html" title="ruby markov" rel="nofollow"></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ð’ÐµÐ± Ð¼Ð¾Ð·Ð³Ð¸ &#187; Blog Archive &#187; Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñ‚ÐµÐºÑÑ‚Ð° ÐœÐ°Ñ€ÐºÐ¾Ð²ÑÐºÐ¸Ð¼Ð¸ Ñ†ÐµÐ¿Ð¾Ñ‡ÐºÐ°Ð¼Ð¸</title>
		<link>http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/comment-page-1/#comment-26861</link>
		<dc:creator>Ð’ÐµÐ± Ð¼Ð¾Ð·Ð³Ð¸ &#187; Blog Archive &#187; Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñ‚ÐµÐºÑÑ‚Ð° ÐœÐ°Ñ€ÐºÐ¾Ð²ÑÐºÐ¸Ð¼Ð¸ Ñ†ÐµÐ¿Ð¾Ñ‡ÐºÐ°Ð¼Ð¸</dc:creator>
		<pubDate>Tue, 09 Jan 2007 09:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://bla.invisible.ch/?p=361#comment-26861</guid>
		<description>&lt;p&gt;[...] Ð’Ð¾Ñ‚ Ð·Ð´ÐµÑÑŒ Ð¼Ð¾Ð¶ÐµÑ‚Ðµ Ð¿Ð¾ÑÐ¼Ð¾Ñ‚Ñ€ÐµÑ‚ÑŒ ÐµÑ‰Ñ‘ Ð¾Ð´Ð½Ñƒ Ñ€ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸ÑŽ Ð½Ð° Python: http://burd.info/gary/2003/11/markov-chain-generator.htmlÐ Ð·Ð´ÐµÑÑŒ Ñ€ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸ÑŽ Ð½Ð° Ruby: http://blog.invisible.ch/index.php?p=000361 [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Ð’Ð¾Ñ‚ Ð·Ð´ÐµÑÑŒ Ð¼Ð¾Ð¶ÐµÑ‚Ðµ Ð¿Ð¾ÑÐ¼Ð¾Ñ‚Ñ€ÐµÑ‚ÑŒ ÐµÑ‰Ñ‘ Ð¾Ð´Ð½Ñƒ Ñ€ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸ÑŽ Ð½Ð° Python: <a href="http://burd.info/gary/2003/11/markov-chain-generator.htmlÐ" rel="nofollow">http://burd.info/gary/2003/11/markov-chain-generator.htmlÐ</a> Ð·Ð´ÐµÑÑŒ Ñ€ÐµÐ°Ð»Ð¸Ð·Ð°Ñ†Ð¸ÑŽ Ð½Ð° Ruby: <a href="http://blog.invisible.ch/index.php?p=000361" rel="nofollow">http://blog.invisible.ch/index.php?p=000361</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: IT ÐÐ¾Ð²Ð¾ÑÑ‚Ð¸ ÐžÐ¼ÑÐºÐ° &#187; Archives &#187; Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñ‚ÐµÐºÑÑ‚Ð° ÐœÐ°Ñ€ÐºÐ¾Ð²ÑÐºÐ¸Ð¼Ð¸ Ñ†ÐµÐ¿Ð¾Ñ‡ÐºÐ°Ð¼Ð¸</title>
		<link>http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/comment-page-1/#comment-26860</link>
		<dc:creator>IT ÐÐ¾Ð²Ð¾ÑÑ‚Ð¸ ÐžÐ¼ÑÐºÐ° &#187; Archives &#187; Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñ‚ÐµÐºÑÑ‚Ð° ÐœÐ°Ñ€ÐºÐ¾Ð²ÑÐºÐ¸Ð¼Ð¸ Ñ†ÐµÐ¿Ð¾Ñ‡ÐºÐ°Ð¼Ð¸</dc:creator>
		<pubDate>Tue, 09 Jan 2007 09:01:57 +0000</pubDate>
		<guid isPermaLink="false">http://bla.invisible.ch/?p=361#comment-26860</guid>
		<description>&lt;p&gt;[...] Ð½Ð° Ruby: http://blog.invisible.ch/index.php?p=000361    Posted in Ð”Ñ€ÑƒÐ³Ð¾Ðµ &#124; Trackback &#124; del.icio.us &#124; Top OfPage [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Ð½Ð° Ruby: <a href="http://blog.invisible.ch/index.php?p=000361" rel="nofollow">http://blog.invisible.ch/index.php?p=000361</a>    Posted in Ð”Ñ€ÑƒÐ³Ð¾Ðµ | Trackback | del.icio.us | Top OfPage [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markov Chains</title>
		<link>http://blog.invisible.ch/2005/01/15/markov-chains-in-ruby/comment-page-1/#comment-2571</link>
		<dc:creator>Markov Chains</dc:creator>
		<pubDate>Thu, 08 Jun 2006 11:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://bla.invisible.ch/?p=361#comment-2571</guid>
		<description>&lt;p&gt;[...] I&#8217;m having fun with Markov chains and some texts. Here&#8217;s Wittgenstein, mixed in with Kant and McCartney markovized: [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] I&#8217;m having fun with Markov chains and some texts. Here&#8217;s Wittgenstein, mixed in with Kant and McCartney markovized: [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

