<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Development in a Blink &#187; trigrams</title>
	<atom:link href="http://www.dougfinke.com/blog/index.php/category/trigrams/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dougfinke.com/blog</link>
	<description>Researching the optimal; implementing the practical</description>
	<lastBuildDate>Tue, 07 Sep 2010 00:22:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>10 PowerShell Posts I Did in 2009</title>
		<link>http://www.dougfinke.com/blog/index.php/2010/01/01/10-powershell-posts-i-did-in-2009/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=10-powershell-posts-i-did-in-2009</link>
		<comments>http://www.dougfinke.com/blog/index.php/2010/01/01/10-powershell-posts-i-did-in-2009/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 20:05:15 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[Excel]]></category>
		<category><![CDATA[ISE]]></category>
		<category><![CDATA[Integrated Scripting Environment]]></category>
		<category><![CDATA[Intellipad]]></category>
		<category><![CDATA[MGrammar]]></category>
		<category><![CDATA[Oslo]]></category>
		<category><![CDATA[Pivot Tables]]></category>
		<category><![CDATA[PowerBoots]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SQL Server Modeling]]></category>
		<category><![CDATA[Try Python]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[trigrams]]></category>
		<category><![CDATA[yUML]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2010/01/01/10-powershell-posts-i-did-in-2009/</guid>
		<description><![CDATA[I had fun doing these PowerShell posts. &#160; Try PowerShell &#8211; An Interactive Tutorial Michael Foord inspired this with his Try Python Silverlight application How to Host PowerShell in a WPF Application A How To video PowerShell Out-ExcelPivotTable &#8211; Quickly Create Pivot Tables in Microsoft Excel Automating Excel Pivot tables with PowerShell PowerShell, An Exercise [...]]]></description>
			<content:encoded><![CDATA[<p>I had fun doing these PowerShell posts.</p>
<p><a href="http://dougfinke.com/blog/index.php/2009/01/10/11th-grade-activities-for-career-success-powershell/"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="image" alt="image" src="http://dougfinke.com/uploadPictures/MyTop5PowerShellPosts_85B8/image.png" width="454" height="284" /></a>&#160;</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/09/28/try-powershell-an-interactive-tutorial/">Try PowerShell &ndash; An Interactive Tutorial</a></p>
</td>
<td valign="top" width="278">
<p><a href="http://www.voidspace.org.uk/python/weblog/index.shtml">Michael Foord</a> inspired this with his <a href="http://www.trypython.org/">Try Python</a> Silverlight application</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/09/02/how-to-host-powershell-in-a-wpf-application/">How to Host PowerShell in a WPF Application</a></p>
</td>
<td valign="top" width="278">
<p>A How To video</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/06/24/powershell-out-excelpivottable-quickly-create-pivot-tables-in-microsoft-excel/">PowerShell Out-ExcelPivotTable &ndash; Quickly Create Pivot Tables in Microsoft Excel</a></p>
</td>
<td valign="top" width="278">
<p>Automating Excel Pivot tables with PowerShell</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/02/17/powershell-an-exercise-in-species-barcoding/">PowerShell, An Exercise in Species Barcoding</a></p>
</td>
<td valign="top" width="278">
<p>Inspired by Peter Norvig&rsquo;s (Director of research at Google) python version</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/02/07/powershell-find-the-k-most-common-words-in-a-file/">PowerShell &ndash; Find the K most common words in a file</a></p>
</td>
<td valign="top" width="278">
<p>Based on Jon Bentley&rsquo;s approach in &ldquo;Little Languages&rdquo;</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/02/06/powershell-ise-cream-alias-expansion/">PowerShell ISE-Cream &ndash; Alias Expansion</a></p>
</td>
<td valign="top" width="278">
<p>Uses PowerShell&rsquo;s tokenizer to expand aliases like %, ? etc. into ForEach and Where</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/08/29/update-dynamic-guis-and-the-powershell-pipeline/">Update: Dynamic GUIs and the PowerShell Pipeline</a></p>
</td>
<td valign="top" width="278">
<p>How to inject GUIs into a PowerShell Pipeline</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/08/20/powershell-yuml-workbench/">PowerShell yUML Workbench</a></p>
</td>
<td valign="top" width="278">
<p>yUML is a web service.&#160; A How To using PowerShell to generate UML diagrams</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/07/01/powershell-powerboots-and-an-oslo-dsl-grammar/">PowerShell, PowerBoots and an Oslo DSL Grammar</a></p>
</td>
<td valign="top" width="278">
<p>Blending MGrammar and PowerShell</p>
</td>
</tr>
<tr>
<td valign="top" width="276">
<p><a href="http://dougfinke.com/blog/index.php/2009/05/20/creating-and-displaying-trigrams-with-powershell/">Creating and Displaying Trigrams with PowerShell</a></p>
</td>
<td valign="top" width="278">
<p>Based on Wolfram|Alphas Trigram visuals. Combines PowerShell and yUML</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2010/01/01/10-powershell-posts-i-did-in-2009/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PowerShell Gotcha- almost</title>
		<link>http://www.dougfinke.com/blog/index.php/2009/05/21/powershell-gotcha-almost/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=powershell-gotcha-almost</link>
		<comments>http://www.dougfinke.com/blog/index.php/2009/05/21/powershell-gotcha-almost/#comments</comments>
		<pubDate>Thu, 21 May 2009 23:41:59 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[Gotcha]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[trigrams]]></category>
		<category><![CDATA[yUML]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2009/05/21/powershell-gotcha-almost/</guid>
		<description><![CDATA[I posted Creating and Displaying Trigrams with PowerShell. I tried the code on a machine with an older version and it failed on the ForeEach. $result = ForEach($i in (1..5)) { $i * 2 } PowerShell in Win 7 RC allows statements on the right hand side of an assignment. $result contains the array 2,4,6,8. [...]]]></description>
			<content:encoded><![CDATA[<p>I posted <a href="http://dougfinke.com/blog/index.php/2009/05/20/creating-and-displaying-trigrams-with-powershell/">Creating and Displaying Trigrams with PowerShell</a>. I tried the code on a machine with an older version and it failed on the <strong><em>ForeEach</em></strong>.</p>
<p>$result = ForEach($i in (1..5)) { $i * 2 }</p>
<p>PowerShell in Win 7 RC allows statements on the right hand side of an assignment. <em>$result</em> contains the array 2,4,6,8. </p>
<p>Run on an older version and PowerShell complains.</p>
<h3>Solutions</h3>
<p>PowerShell sub expressions or create a function around the ForEach. I prefer adding 3 extra characters <strong>$()</strong>.</p>
<p>$result =<font color="#008000"> </font><strong><font color="#ff0000">$(</font></strong>ForEach($i in (1..5)) { $i * 2 }<strong><font color="#ff0000">)</font></strong></p>
<p>The trigram code is updated.</p>
<h3>Download Here</h3>
<p> <iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-5dec3b62d9308943.skydrive.live.com/embedrow.aspx/Trigram/PowerShellTrigram.zip" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2009/05/21/powershell-gotcha-almost/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating and Displaying Trigrams with PowerShell</title>
		<link>http://www.dougfinke.com/blog/index.php/2009/05/20/creating-and-displaying-trigrams-with-powershell/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=creating-and-displaying-trigrams-with-powershell</link>
		<comments>http://www.dougfinke.com/blog/index.php/2009/05/20/creating-and-displaying-trigrams-with-powershell/#comments</comments>
		<pubDate>Thu, 21 May 2009 00:46:11 +0000</pubDate>
		<dc:creator>Doug Finke</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[WolframAlpha]]></category>
		<category><![CDATA[trigrams]]></category>
		<category><![CDATA[yUML]]></category>

		<guid isPermaLink="false">http://dougfinke.com/blog/index.php/2009/05/20/creating-and-displaying-trigrams-with-powershell/</guid>
		<description><![CDATA[Trigrams are a special case of the N-gram, where N is 3. They are often used in natural language processing for doing statistical analysis of texts. WolframAlpha supports them and has a DNA example. It looked liked&#160; something fun to implement in PowerShell and diagram with the yUML script I put together. All you need [...]]]></description>
			<content:encoded><![CDATA[<p><b><a href="http://en.wikipedia.org/wiki/Trigram">Trigrams</a></b> are a special case of the <a href="http://en.wikipedia.org/wiki/N-gram">N-gram</a>, where N is 3. They are often used in <a href="http://en.wikipedia.org/wiki/Natural_language_processing">natural language processing</a> for doing statistical analysis of texts. WolframAlpha supports them and has a DNA example.</p>
<p>It looked liked&#160; something fun to implement in PowerShell and diagram with the <a href="http://dougfinke.com/blog/index.php/2009/05/06/use-powershell-and-yuml-to-create-diagrams/">yUML</a> script I put together.</p>
<p>All you need is PowerShell, an Internet connection and the script below to try it out.</p>
<p>If you&rsquo;re running Windows 7, you&rsquo;re good to go. PowerShell is installed out of the box.</p>
<h3>WolframAlpha Triads</h3>
<p>trigrams &quot;AGCAGCTGACTGATCGTAGCTGACT&quot;</p>
<p><a href="http://www58.wolframalpha.com/input/?i=trigrams+AGCAGCTGACTGATCGTAGCTGACT"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://dougfinke.com/uploadPictures/ec90d04ff7f2_11F32/image_3.png" width="407" height="392" /></a> </p>
<h3>PowerShell + yUML</h3>
<p>trigrams &#8216;AGCAGCTGACTGATCGTAGCTGACT&#8217;</p>
<p>Function trigrams ($target) {    <br />&#160;&#160;&#160; Get-yUMLDiagram (Convert-ToyUml ( Create-Tree ( Get-Triads $target ) )) -show     <br />} </p>
<p><a href="http://dougfinke.com/uploadPictures/ec90d04ff7f2_11F32/image.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://dougfinke.com/uploadPictures/ec90d04ff7f2_11F32/image_thumb.png" width="572" height="187" /></a></p>
<h3>Download the Script</h3>
<p>I am not satisfied with Create-Tree function. It works but is not flexible.</p>
<p><iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-5dec3b62d9308943.skydrive.live.com/embedrow.aspx/Trigram/PowerShellTrigram.zip" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
<h3>Or, click here to view the file content</h3>
<p> <iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:26px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-5dec3b62d9308943.skydrive.live.com/embedrow.aspx/Trigram/PowerShellTrigram.ps1.txt"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dougfinke.com/blog/index.php/2009/05/20/creating-and-displaying-trigrams-with-powershell/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
