<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7205456793539552308</id><updated>2011-11-27T16:31:55.630-08:00</updated><category term='Web Mining using Neural Networks'/><category term='Urdu OCR'/><category term='Cursors'/><category term='Sql Server'/><title type='text'>Abdul Wahab</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://abdulwahabyounus.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205456793539552308/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://abdulwahabyounus.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Abdul Wahab Younus</name><uri>http://www.blogger.com/profile/02149505600334523027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7205456793539552308.post-6189719825771767150</id><published>2010-07-08T01:22:00.000-07:00</published><updated>2010-07-08T04:23:47.395-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Cursors'/><title type='text'>Cursors in Sql Server</title><content type='html'>Sometimes there is a much need that you want to read records rows by rows, either in any scenario. Let's take a scenario in which you want to migrate the data from one table to another table.&lt;br /&gt;&lt;br /&gt;Let suppose there are two tables one with name Employee and other with name Employee_Details, during the stimulus of the project apparently&amp;nbsp; you have created only one table and i.e. Employee and you have store all the information of Employee accordingly. After some time you have got a requirement that we need to separate the details of Employees into a different table. So definitely there is always a question intended that how we will be taking care of our old data and we will be migrating the data in to a new table. So a simple answer to this question is Sql Server Cursors.&lt;br /&gt;&lt;br /&gt;Yes, by using cursors we can migrate the data from one table to another by reading records rows by rows. How we can use cursors ??&lt;br /&gt;&lt;br /&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5CABDULW%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5CABDULW%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;/link&gt;&lt;link href="file:///C:%5CDOCUME%7E1%5CABDULW%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;/link&gt;&lt;style&gt;&lt;!-- /* Font Definitions */ @font-face	{font-family:"Cambria Math";	panose-1:2 4 5 3 5 4 6 3 2 4;	mso-font-charset:1;	mso-generic-font-family:roman;	mso-font-format:other;	mso-font-pitch:variable;	mso-font-signature:0 0 0 0 0 0;}@font-face	{font-family:Calibri;	panose-1:2 15 5 2 2 2 4 3 2 4;	mso-font-charset:0;	mso-generic-font-family:swiss;	mso-font-pitch:variable;	mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal	{mso-style-unhide:no;	mso-style-qformat:yes;	mso-style-parent:"";	margin-top:0in;	margin-right:0in;	margin-bottom:10.0pt;	margin-left:0in;	line-height:115%;	mso-pagination:widow-orphan;	font-size:11.0pt;	font-family:"Calibri","sans-serif";	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoChpDefault	{mso-style-type:export-only;	mso-default-props:yes;	mso-ascii-font-family:Calibri;	mso-ascii-theme-font:minor-latin;	mso-fareast-font-family:Calibri;	mso-fareast-theme-font:minor-latin;	mso-hansi-font-family:Calibri;	mso-hansi-theme-font:minor-latin;	mso-bidi-font-family:"Times New Roman";	mso-bidi-theme-font:minor-bidi;}.MsoPapDefault	{mso-style-type:export-only;	margin-bottom:10.0pt;	line-height:115%;}@page WordSection1	{size:8.5in 11.0in;	margin:1.0in 1.0in 1.0in 1.0in;	mso-header-margin:.5in;	mso-footer-margin:.5in;	mso-paper-source:0;}div.WordSection1	{page:WordSection1;}--&gt;&lt;/style&gt;  &lt;br /&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @CrsrVar &lt;span style="color: blue;"&gt;Cursor&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @FirstName &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;128&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @LastName &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;128&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @DOB &lt;span style="color: blue;"&gt;datetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @Gender &lt;span style="color: blue;"&gt;varchar&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;6&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @EmployeeID &lt;span style="color: blue;"&gt;bigint&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;--Foriegn key&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;declare&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @Index &lt;span style="color: blue;"&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-- First of all you need to define the cursor and there will be a query defined in it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Set&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @CrsrVar &lt;span style="color: grey;"&gt;=&lt;/span&gt; &lt;span style="color: blue;"&gt;Cursor&lt;/span&gt; &lt;span style="color: blue;"&gt;For&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Select&lt;/span&gt; EmployeeID&lt;span style="color: grey;"&gt;,&lt;/span&gt;FirstName&lt;span style="color: grey;"&gt;,&lt;/span&gt;LastName&lt;span style="color: grey;"&gt;,&lt;/span&gt;DOB&lt;span style="color: grey;"&gt;,&lt;/span&gt;Gender &lt;span style="color: blue;"&gt;from&lt;/span&gt; Employee&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Open&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @CrsrVar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-- It will now fetch the record from cursor and store in to variables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Fetch&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;Next&lt;/span&gt; &lt;span style="color: blue;"&gt;From&lt;/span&gt; @CrsrVar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Into&lt;/span&gt; @EmployeeID&lt;span style="color: grey;"&gt;,&lt;/span&gt;@FirstName&lt;span style="color: grey;"&gt;,&lt;/span&gt;@LastName&lt;span style="color: grey;"&gt;,&lt;/span&gt;@DOB&lt;span style="color: grey;"&gt;,&lt;/span&gt;@Gender&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-- Fetch until the records get finished&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;While&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;span style="color: grey;"&gt;(&lt;/span&gt;&lt;span style="color: magenta;"&gt;@@FETCH_STATUS&lt;/span&gt; &lt;span style="color: grey;"&gt;=&lt;/span&gt; 0&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;insert&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;into&lt;/span&gt; Employee_Details &lt;span style="color: grey;"&gt;(&lt;/span&gt;EmployeeID&lt;span style="color: grey;"&gt;,&lt;/span&gt;FirstName&lt;span style="color: grey;"&gt;,&lt;/span&gt;LastName&lt;span style="color: grey;"&gt;,&lt;/span&gt;DOB&lt;span style="color: grey;"&gt;,&lt;/span&gt;Gender&lt;span style="color: grey;"&gt;)&lt;/span&gt; &lt;span style="color: blue;"&gt;values&lt;/span&gt;&lt;span style="color: grey;"&gt;(&lt;/span&gt;@EmployeeID&lt;span style="color: grey;"&gt;,&lt;/span&gt;@FirstName&lt;span style="color: grey;"&gt;,&lt;/span&gt;@LastName&lt;span style="color: grey;"&gt;,&lt;/span&gt;@DOB&lt;span style="color: grey;"&gt;,&lt;/span&gt;@Gender&lt;span style="color: grey;"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-- if you need the primary key of the above inserted data then you can use it&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;--set @PatientId = @@IDENTITY&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Fetch&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; &lt;span style="color: blue;"&gt;Next&lt;/span&gt; &lt;span style="color: blue;"&gt;From&lt;/span&gt; @CrsrVar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Into&lt;/span&gt; @EmployeeID&lt;span style="color: grey;"&gt;,&lt;/span&gt;@FirstName&lt;span style="color: grey;"&gt;,&lt;/span&gt;@LastName&lt;span style="color: grey;"&gt;,&lt;/span&gt;@DOB&lt;span style="color: grey;"&gt;,&lt;/span&gt;@Gender&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: green; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;-- Simply close the cursor and deallocate it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Close&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @CrsrVar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;"&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;Deallocate&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; @CrsrVar&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Conclusion:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, It's a good to use cursors when dealing with a row by row data, but definitely there is a disadvantage of using cursors, of course when you are retrieving numbers of rows so for every single row it will hit the server as a single select query so there might be a chance of low performance.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205456793539552308-6189719825771767150?l=abdulwahabyounus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://abdulwahabyounus.blogspot.com/feeds/6189719825771767150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://abdulwahabyounus.blogspot.com/2010/07/cursors-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205456793539552308/posts/default/6189719825771767150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205456793539552308/posts/default/6189719825771767150'/><link rel='alternate' type='text/html' href='http://abdulwahabyounus.blogspot.com/2010/07/cursors-in-sql-server.html' title='Cursors in Sql Server'/><author><name>Abdul Wahab Younus</name><uri>http://www.blogger.com/profile/02149505600334523027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205456793539552308.post-5917444456520010330</id><published>2009-12-09T22:36:00.001-08:00</published><updated>2009-12-09T22:44:11.550-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Urdu OCR'/><title type='text'>Urdu OCR - A Digital Dream</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Kz3Pmrxo7_4/SyCXH3Jo2GI/AAAAAAAAAAc/-fENxwDbVIc/s1600-h/UrduOCR.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 229px; height: 72px;" src="http://2.bp.blogspot.com/_Kz3Pmrxo7_4/SyCXH3Jo2GI/AAAAAAAAAAc/-fENxwDbVIc/s400/UrduOCR.JPG" alt="" id="BLOGGER_PHOTO_ID_5413492913418590306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Optical Character Recognition is a unique approach developed for recognizing isolated character that requires less complex calculations but still giving adequate results. In case of document image recognition, an additional step of detecting lines of text and possible set of character among those lines is a requisite. There are numerous methods available for character recognition. From numerical and statistical approach to AI based approach in an increasing order of their recognition accuracy, respectively. None of the approaches stated has recognition accuracy of 100%.Even the humans are not credited with absolute recognition accuracy. The main objective of the recognition software is to help its user in more physically tiring and cumbersome work of actually typing the whole document especially for a user. The error correction still resides with its user only. Hence, a recognition accuracy of even about 90% gives very satisfactory results. Apart from all this, the image quality also plays a very important role in the recognition accuracy.&lt;br /&gt;&lt;br /&gt;So, a research project named Urdu OCR – A Digital Dream from &lt;strong&gt;Usman Institute of Technology&lt;/strong&gt; fulfilling the needs. The team members of this project are &lt;strong&gt;Abdul Wahab&lt;/strong&gt;(ME), &lt;strong&gt;Shuwair Sardar&lt;/strong&gt;, and &lt;strong&gt;Muhammad Abdul Sammad Khan&lt;/strong&gt;. First prize winner of &lt;strong&gt;Combat 2008&lt;/strong&gt; (Software Competition – PAF Kiet) and &lt;strong&gt;Software Exhibition&lt;/strong&gt; (Software Competition – SZABIST) and Second prize winner in NED&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Urdu OCR is developed for first time. It has not been developed yet. The need of this product is in the printing media like Urdu news paper and magazines. It is useful in converting the books of Urdu in digital format, the large amount of useful and heritage data in Urdu language which are in vanishing form can be saved in digital format. It can produce electronic books and digital Urdu library online.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Kz3Pmrxo7_4/SyCX7JxlQAI/AAAAAAAAAAk/fkqsG6k10Z4/s1600-h/UrduOCR01.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 230px;" src="http://4.bp.blogspot.com/_Kz3Pmrxo7_4/SyCX7JxlQAI/AAAAAAAAAAk/fkqsG6k10Z4/s400/UrduOCR01.JPG" alt="" id="BLOGGER_PHOTO_ID_5413493794591293442" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYKG-hDNI/AAAAAAAAAAs/11XD1HsGX70/s1600-h/UrduOCR02.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 230px;" src="http://4.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYKG-hDNI/AAAAAAAAAAs/11XD1HsGX70/s400/UrduOCR02.JPG" alt="" id="BLOGGER_PHOTO_ID_5413494051538275538" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYKSkb8rI/AAAAAAAAAA0/q07CdRT3VM4/s1600-h/UrduOCR03.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 230px;" src="http://3.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYKSkb8rI/AAAAAAAAAA0/q07CdRT3VM4/s400/UrduOCR03.JPG" alt="" id="BLOGGER_PHOTO_ID_5413494054650114738" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYKoY2jEI/AAAAAAAAAA8/yElJns89sms/s1600-h/UrduOCR04.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 230px;" src="http://3.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYKoY2jEI/AAAAAAAAAA8/yElJns89sms/s400/UrduOCR04.JPG" alt="" id="BLOGGER_PHOTO_ID_5413494060507106370" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYK3CZkhI/AAAAAAAAABE/BX2Jfpgyg04/s1600-h/UrduOCR05.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 230px;" src="http://3.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYK3CZkhI/AAAAAAAAABE/BX2Jfpgyg04/s400/UrduOCR05.JPG" alt="" id="BLOGGER_PHOTO_ID_5413494064439464466" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYLMLl5BI/AAAAAAAAABM/vDbnCBz5TbM/s1600-h/UrduOCR06.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 239px;" src="http://4.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYLMLl5BI/AAAAAAAAABM/vDbnCBz5TbM/s400/UrduOCR06.JPG" alt="" id="BLOGGER_PHOTO_ID_5413494070115165202" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYSYQrrZI/AAAAAAAAABU/YdZHkFA9F40/s1600-h/UrduOCR07.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 230px;" src="http://3.bp.blogspot.com/_Kz3Pmrxo7_4/SyCYSYQrrZI/AAAAAAAAABU/YdZHkFA9F40/s400/UrduOCR07.JPG" alt="" id="BLOGGER_PHOTO_ID_5413494193616825746" border="0" /&gt;&lt;/a&gt;&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205456793539552308-5917444456520010330?l=abdulwahabyounus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://abdulwahabyounus.blogspot.com/feeds/5917444456520010330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://abdulwahabyounus.blogspot.com/2009/12/urdu-ocr-digital-dream.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205456793539552308/posts/default/5917444456520010330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205456793539552308/posts/default/5917444456520010330'/><link rel='alternate' type='text/html' href='http://abdulwahabyounus.blogspot.com/2009/12/urdu-ocr-digital-dream.html' title='Urdu OCR - A Digital Dream'/><author><name>Abdul Wahab Younus</name><uri>http://www.blogger.com/profile/02149505600334523027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Kz3Pmrxo7_4/SyCXH3Jo2GI/AAAAAAAAAAc/-fENxwDbVIc/s72-c/UrduOCR.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205456793539552308.post-7655220976356149631</id><published>2009-11-13T23:18:00.000-08:00</published><updated>2009-12-09T22:49:09.819-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Mining using Neural Networks'/><title type='text'>How to conquer the problem of fragmented information and help visitors to find the appropriate information?</title><content type='html'>&lt;u&gt;&lt;strong&gt;Introduction :&lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Web sites enclose a constantly growing quantity of information within their pages. As the quantity of information increases so does the convolution of the structure of the web site. Accordingly it has become difficult for visitors to find the information relevant to their needs. There have been numerous clustering methods being proposed to cluster data in an effort to help visitors find the relevant information. Mainly these clustering methods typically focused either on the content or the context of the web pages.&lt;br /&gt;&lt;br /&gt;In adjunct, the web pages which are generated by traditional search engines do not contain synonymous terms in place of the terms used in the search query. For example, finding a word ‘car’ in web pages by using a traditional search engine will not find those web pages that always use the word ‘automobile’ instead. Also, web pages that represent the concept being hunted may not include the search terms. Another example may come if we use the search term ‘astronomy’ and the search engine does not display those web pages about the solar system because they don’t contain the word ‘astronomy’.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Solution :&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I believe that to overcome with that we need to automate the information found on internet through the use of machine learning techniques I believe that combining self organizing maps (SOM) and WordNet will be very useful in order to overcome with that problem.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;What is WordNet ?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;We can say that WordNet separate words into the class of nouns, verbs, adjectives, and adverbs. WordNet tries to categorize the information according to their meanings of words rather than categorizing in the forms of the words. WordNet always encloses the standard information found in dictionaries and thesauri. One of the best features of WordNet is its information regarding the associations among words; the most vital among these is hypernym.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;What is SOM ?&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;Samuel Kaski says in his paper "Creating an order in digital libraries with Self Organizing &lt;/em&gt;&lt;br /&gt;&lt;em&gt;Map"&lt;/em&gt;&lt;br /&gt;"The SOM is a general supervised tool for ordering high-dimensional statistical data so that alike inputs are in general mapped close to each other. To utilize the SOM on texts, a document might, for example, be represented as the histogram of its words. A more practical method is to first use the so called semantic SOM for word categorization. The semantic SOM organized the words into grammatical and semantic categories represented on a two-dimensional array. The relative similarity of the categories reflected in their distance relationships on the array. An extra benefit from the use of category histograms instead of simple word histograms is that the dimensionality of the input to the document map is reduced by an order of magnitude."&lt;br /&gt;&lt;br /&gt;The input for SOM will be generated by WordNet and it will be in the form vector based on zeros and ones and it is said earlier that the size of vectors which comes as an input should be equal to the number of unique replacement terms. The output is usually a two dimensional grid of nodes.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Algorithm :&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.bucho.org/%7Edpape/pubs/som-summary.html"&gt;Daniel X.Pape&lt;/a&gt; says :&lt;br /&gt;&lt;p&gt;The simplest description of the SOM algorithm is this:&lt;br /&gt;The reference vectors contained in all the nodes are randomly initialized.&lt;br /&gt;Step 1: An input vector is randomly selected from the input set.&lt;br /&gt;Step 2: Using some metric (Euclidean, Cosine, etc) the input vector is compared to _every_ node's reference vector.&lt;br /&gt;Step 3: The node whose reference vector is the best match (in that metric) is chosen as the winning node for that particular input vector.&lt;br /&gt;Step 4: The neighbouring nodes (nodes which are topographically close in the array) to the winning node are then updated by a certain amount. This update simply changes the properties of the reference vectors by a small amount so that they are more similar to the input vector.&lt;br /&gt;Step 5: Go to step 1.&lt;/p&gt;&lt;u&gt;&lt;strong&gt;Overall Process : &lt;/strong&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_Kz3Pmrxo7_4/Sv5eBC8pPNI/AAAAAAAAAAU/e_I58ybt11k/s1600-h/Untitled.jpg"&gt;&lt;img style="margin: 0px auto 10px; text-align: center; width: 400px; display: block; height: 207px;" id="BLOGGER_PHOTO_ID_5403859974955285714" alt="" src="http://2.bp.blogspot.com/_Kz3Pmrxo7_4/Sv5eBC8pPNI/AAAAAAAAAAU/e_I58ybt11k/s400/Untitled.jpg" border="0" /&gt;&lt;/a&gt; By getting the result from &lt;strong&gt;&lt;em&gt;step 3 &lt;/em&gt;&lt;/strong&gt;we can get the websites according to the search query.&lt;input id="gwProxy" type="hidden"&gt;&lt;!--Session data--&gt;&lt;input onclick="jsCall();" id="jsProxy" type="hidden"&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205456793539552308-7655220976356149631?l=abdulwahabyounus.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://abdulwahabyounus.blogspot.com/feeds/7655220976356149631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://abdulwahabyounus.blogspot.com/2009/11/how-we-can-conquer-with-problem-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205456793539552308/posts/default/7655220976356149631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205456793539552308/posts/default/7655220976356149631'/><link rel='alternate' type='text/html' href='http://abdulwahabyounus.blogspot.com/2009/11/how-we-can-conquer-with-problem-in.html' title='How to conquer the problem of fragmented information and help visitors to find the appropriate information?'/><author><name>Abdul Wahab Younus</name><uri>http://www.blogger.com/profile/02149505600334523027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Kz3Pmrxo7_4/Sv5eBC8pPNI/AAAAAAAAAAU/e_I58ybt11k/s72-c/Untitled.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
