<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Abhanda3</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Abhanda3"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Abhanda3"/>
	<updated>2026-06-06T22:42:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_E1527_SWAR&amp;diff=96558</id>
		<title>CSC/ECE 517 Spring 2015 E1527 SWAR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_E1527_SWAR&amp;diff=96558"/>
		<updated>2015-04-08T20:06:05Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Scope */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1527. Refactor Autometareviews gem and migration to Web-Service&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction to Autometareview project &amp;lt;ref&amp;gt;https://github.com/lramach/autometareviews0.1&amp;lt;/ref&amp;gt;=&lt;br /&gt;
This project is developed as part of Expertiza project &amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;. &amp;lt;br /&amp;gt;&lt;br /&gt;
The automated metareview tool identifies the quality of a review using natural language processing and machine learning techniques (completely automated). Feedback is provided to reviewers on the following metrics:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Review relevance: This metric tells the reviewer how relevant the review is to the content of the author's submission. Numeric feedback in the scale of 0--1 is provided to indicate a review's relevance. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Review Content Type: This metric identifies whether the review contains 'summative content' -- positive feedback, problem detection content' -- problems identified by reviewers in the author's work or 'advisory content' -- content indicating suggestions or advice provided by reviewers. A numeric feedback on the scale of 0--1 is provided for each content type to indicate whether the review contains that type of content. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Review Coverage: This metric indicates the extent to which a review covers the main points of a submission. Numeric value in the range of 0--1 indicates the coverage of a review. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Plagiarism&amp;lt;ref&amp;gt;http://www.plagiarism.org/plagiarism-101/what-is-plagiarism/&amp;lt;/ref&amp;gt;: Indicates the presence of plagiarism in the review text.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tone: The metric indicates whether a review has a positive, negative or neutral tone. &amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;Quantity: Indicates the number of unique words used by the reviewer in the review. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
Currently, Autometareviews project is used as a gem&amp;lt;ref&amp;gt;http://guides.rubygems.org/what-is-a-gem/&amp;lt;/ref&amp;gt; in Expertiza project. Purpose of this project is to migrate this gem to a web service&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_service&amp;lt;/ref&amp;gt; and expose its methods on web, which can be consumed by any application as web service. Older gem was dependent old libraries&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Library_%28computing%29&amp;lt;/ref&amp;gt;&lt;br /&gt;
such as Stanford-core-nlp, rwordnet, etc. We will migrate them to new libraries without breaking the existing feature-set. We are also going to refactor the source code of this gem file to promote readability, reduced complexity, and code redundancies. We will fix&lt;br /&gt;
any bug or bottleneck that we can find to improve the performance of this service. We will not add any new feature to the existing feature set provided by the gem. Before making any modification to the existing features, we will present them before Dr.&lt;br /&gt;
Gehringer and his Expertiza team.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
There are three separate scope items in this project -&lt;br /&gt;
:* Migration of existing gem application to a web service&lt;br /&gt;
:* Refactoring the existing ruby classes&lt;br /&gt;
:* Migrating to newer libraries, wherever possible.&lt;br /&gt;
&lt;br /&gt;
The classes that we propose to refactor are&lt;br /&gt;
:* tone.rb &lt;br /&gt;
:* degree_of_relevance.rb &lt;br /&gt;
:* wordnet_based_similarity.rb &lt;br /&gt;
:* sentence_state.rb &lt;br /&gt;
:* cluster_generation.rb &lt;br /&gt;
:* plagiarism_check.rb &lt;br /&gt;
:* graph_generator.rb &lt;br /&gt;
:* predict_class.rb &lt;br /&gt;
:*review_coverage.rb &lt;br /&gt;
&lt;br /&gt;
No new feature will be developed as part of this project. Any major code change due to inclusion of newer libraries will be communicated to Expertiza project team. Existing code will be tested to ensure the functionality does not change.&lt;br /&gt;
&lt;br /&gt;
=Standards =&lt;br /&gt;
All developed code will adhere to the ruby on rails coding guidelines&amp;lt;ref&amp;gt;https://docs.google.com/document/d/1qQD7fcypFk77nq7Jx7ZNyCNpLyt1oXKaq5G-W7zkV3k/edit&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= List of Tasks =&lt;br /&gt;
Metioned below are the tasks we will perform as part of this project.&amp;lt;ref&amp;gt;https://docs.google.com/document/d/10JTdEjCiRTre3nO4j_czBzhcxkqOSzmAT8jyiJHNz4c/edit#&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This system is still in nascent stage and have many performance related issues. It takes a long time (about 2 minutes) to generate single meta-review. This is an unacceptable performance statistics for Expertiza. We propose to re-factor code and identify the areas that affect the overall performance of the system. Few areas we identified in preliminary review are: &amp;lt;br /&amp;gt;&lt;br /&gt;
:* Reading seed data from csv in each pass takes  up a lot of time. We can move this data into Mysql and use ActiveRecords to speed data fetch.&lt;br /&gt;
:* WordNet based semantic matching takes a lot of time. We will review the method used and present our finding about areas of concern.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1. Refactor Code==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Efficient Loop constructs. &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Many loops over models are implemented using generic “for” loops.&lt;br /&gt;
Solution: As specified by Ruby guideline, we plan to use efficient ruby loops, such as “each” and “find_each”.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Very large methods &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Several methods have huge amount of code, which makes them difficult to understand and debug.&lt;br /&gt;
Solution: In most cases, large methods can be shortened through the use of smaller helper methods. Such methods could be reused across different components.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Ambiguous method names &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Many methods have ambiguity between the name used for them and the feature implemented by them.&lt;br /&gt;
Solution: We will rename such methods to clearly state the feature implemented by them.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Legacy Code &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: As the system has been modified for bug fixes and enhancements, unnecessary code has accumulated.&lt;br /&gt;
Solution: Isolate and remove all dead code.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Code beautification &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Coding style used in gem is not based on Ruby on Rails style, which makes it difficult to read for any Ruby programmer.&lt;br /&gt;
Solution: Beautify the code with a consistent standard of documentation, and style.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2. Upgrade system to use latest dependent ruby gems ==&lt;br /&gt;
The libraries used by gem are very old. We plan to migrate the dependent libraries to their latest versions.&amp;lt;br /&amp;gt;&lt;br /&gt;
Libraries, we have identified are: &amp;lt;br /&amp;gt;&lt;br /&gt;
:* stanford-core-nlp &amp;lt;ref&amp;gt;http://nlp.stanford.edu/software/corenlp.shtml&amp;lt;/ref&amp;gt;&lt;br /&gt;
:* rwordnet &amp;lt;ref&amp;gt;https://rubygems.org/gems/rwordnet&amp;lt;/ref&amp;gt; &lt;br /&gt;
:* rjb &amp;lt;ref&amp;gt;https://rubygems.org/gems/rjb&amp;lt;/ref&amp;gt;&lt;br /&gt;
:* bind-it&amp;lt;ref&amp;gt;https://rubygems.org/gems/bind-it&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will also migrate the project to use Java 8&amp;lt;ref&amp;gt;http://java.com/en/download/whatis_java.jsp&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== 3. Migrate gem to Web service ==&lt;br /&gt;
Expertiza system tries to evaluate each review using an automated meta-review system. This system is packaged as a library and used by Expertiza. Automated Metareview system is an independent entity and can be used by other peer review systems as well. This is Natural Language Processing based system that accepts original article, review written for this article, and the rubric used during article review. There are many other peer review systems, which can benefit from this system, if this is available for them to evaluate their rubrics. We are working on migrating this system from a library to a web service. &lt;br /&gt;
&amp;lt;br /&amp;gt;Web service will expose &amp;quot;AutomatedMetareview&amp;quot; method, which will accept three parameters mentioned before as JSON and return the meta-review as a JSON object. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The response JSON object will have parameters mentioned below: &amp;lt;br /&amp;gt;&lt;br /&gt;
:* plagiarism&lt;br /&gt;
:* relevance&lt;br /&gt;
:* content_summative&lt;br /&gt;
:* content_problem&lt;br /&gt;
:* content_advisory&lt;br /&gt;
:* coverage&lt;br /&gt;
:* tone_positive&lt;br /&gt;
:* tone_negative&lt;br /&gt;
:* tone_neutral&lt;br /&gt;
:* quantity&lt;br /&gt;
&lt;br /&gt;
[[File:Workflow.jpg|frame|center|Interaction between Client and Web Service]]&lt;br /&gt;
&lt;br /&gt;
===3.1 Assumptions===&lt;br /&gt;
For the project, the code that is being modified is assumed to be correct and meet all feature requirements of the system. Interactions modified due to refactoring will not change the underline system definitions.&lt;br /&gt;
&lt;br /&gt;
== 4. Testing==&lt;br /&gt;
We will be using the existing test suite used by gem to test any new code modification. We will be writing new test cases for web service implementation and any new public method exposed by existing classes.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_E1527_SWAR&amp;diff=96550</id>
		<title>CSC/ECE 517 Spring 2015 E1527 SWAR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_E1527_SWAR&amp;diff=96550"/>
		<updated>2015-04-08T19:37:37Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: Undo revision 96549 by Abhanda3 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1527. Refactor Autometareviews gem and migration to Web-Service&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction to Autometareview project &amp;lt;ref&amp;gt;https://github.com/lramach/autometareviews0.1&amp;lt;/ref&amp;gt;=&lt;br /&gt;
This project is developed as part of Expertiza project &amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;. &amp;lt;br /&amp;gt;&lt;br /&gt;
The automated metareview tool identifies the quality of a review using natural language processing and machine learning techniques (completely automated). Feedback is provided to reviewers on the following metrics:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Review relevance: This metric tells the reviewer how relevant the review is to the content of the author's submission. Numeric feedback in the scale of 0--1 is provided to indicate a review's relevance. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Review Content Type: This metric identifies whether the review contains 'summative content' -- positive feedback, problem detection content' -- problems identified by reviewers in the author's work or 'advisory content' -- content indicating suggestions or advice provided by reviewers. A numeric feedback on the scale of 0--1 is provided for each content type to indicate whether the review contains that type of content. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Review Coverage: This metric indicates the extent to which a review covers the main points of a submission. Numeric value in the range of 0--1 indicates the coverage of a review. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Plagiarism&amp;lt;ref&amp;gt;http://www.plagiarism.org/plagiarism-101/what-is-plagiarism/&amp;lt;/ref&amp;gt;: Indicates the presence of plagiarism in the review text.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tone: The metric indicates whether a review has a positive, negative or neutral tone. &amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;Quantity: Indicates the number of unique words used by the reviewer in the review. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
Currently, Autometareviews project is used as a gem&amp;lt;ref&amp;gt;http://guides.rubygems.org/what-is-a-gem/&amp;lt;/ref&amp;gt; in Expertiza project. Purpose of this project is to migrate this gem to a web service&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_service&amp;lt;/ref&amp;gt; and expose its methods on web, which can be consumed by any application as web service. Older gem was dependent old libraries&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Library_%28computing%29&amp;lt;/ref&amp;gt;&lt;br /&gt;
such as Stanford-core-nlp, rwordnet, etc. We will migrate them to new libraries without breaking the existing feature-set. We are also going to refactor the source code of this gem file to promote readability, reduced complexity, and code redundancies. We will fix&lt;br /&gt;
any bug or bottleneck that we can find to improve the performance of this service. We will not add any new feature to the existing feature set provided by the gem. Before making any modification to the existing features, we will present them before Dr.&lt;br /&gt;
Gehringer and his Expertiza team.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
The scope of this project includes migration of existing gem application to a web-service, refactoring the existing classes and migrating to newer libraries, wherever possible.&lt;br /&gt;
The classes that we propose to refactor are&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
 tone.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; degree_of_relevance.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; wordnet_based_similarity.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; sentence_state.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; cluster_generation.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; plagiarism_check.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; graph_generator.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; predict_class.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; and review_coverage.rb &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
No new feature will be developed as part of this project. Any major code change due to inclusion of newer libraries will be communicated to Expertiza project team. Existing code will be tested to ensure the functionality does not change.&lt;br /&gt;
&lt;br /&gt;
=Standards =&lt;br /&gt;
All developed code will adhere to the ruby on rails coding guidelines&amp;lt;ref&amp;gt;https://docs.google.com/document/d/1qQD7fcypFk77nq7Jx7ZNyCNpLyt1oXKaq5G-W7zkV3k/edit&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= List of Tasks =&lt;br /&gt;
Metioned below are the tasks we will perform as part of this project.&amp;lt;ref&amp;gt;https://docs.google.com/document/d/10JTdEjCiRTre3nO4j_czBzhcxkqOSzmAT8jyiJHNz4c/edit#&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This system is still in nascent stage and have many performance related issues. It takes a long time (about 2 minutes) to generate single meta-review. This is an unacceptable performance statistics for Expertiza. We propose to re-factor code and identify the areas that affect the overall performance of the system. Few areas we identified in preliminary review are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Reading seed data from csv in each pass takes  up a lot of time. We can move this data into Mysql and use ActiveRecords to speed data fetch.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
WordNet based semantic matching takes a lot of time. We will review the method used and present our finding about areas of concern.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 1. Refactor Code==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Efficient Loop constructs. &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Many loops over models are implemented using generic “for” loops.&lt;br /&gt;
Solution: As specified by Ruby guideline, we plan to use efficient ruby loops, such as “each” and “find_each”.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Very large methods &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Several methods have huge amount of code, which makes them difficult to understand and debug.&lt;br /&gt;
Solution: In most cases, large methods can be shortened through the use of smaller helper methods. Such methods could be reused across different components.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Ambiguous method names &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Many methods have ambiguity between the name used for them and the feature implemented by them.&lt;br /&gt;
Solution: We will rename such methods to clearly state the feature implemented by them.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Legacy Code &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: As the system has been modified for bug fixes and enhancements, unnecessary code has accumulated.&lt;br /&gt;
Solution: Isolate and remove all dead code.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Code beautification &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Coding style used in gem is not based on Ruby on Rails style, which makes it difficult to read for any Ruby programmer.&lt;br /&gt;
Solution: Beautify the code with a consistent standard of documentation, and style.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2. Upgrade system to use latest dependent ruby gems ==&lt;br /&gt;
The libraries used by gem are very old. We plan to migrate the dependent libraries to their latest versions.&amp;lt;br /&amp;gt;&lt;br /&gt;
Libraries, we have identified are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;stanford-core-nlp &amp;lt;ref&amp;gt;http://nlp.stanford.edu/software/corenlp.shtml&amp;lt;/ref&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;rwordnet &amp;lt;ref&amp;gt;https://rubygems.org/gems/rwordnet&amp;lt;/ref&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;rjb &amp;lt;ref&amp;gt;https://rubygems.org/gems/rjb&amp;lt;/ref&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;bind-it&amp;lt;ref&amp;gt;https://rubygems.org/gems/bind-it&amp;lt;/ref&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
We will also migrate the project to use Java 8&amp;lt;ref&amp;gt;http://java.com/en/download/whatis_java.jsp&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== 3. Migrate gem to Web service ==&lt;br /&gt;
Expertiza system tries to evaluate each review using an automated meta-review system. This system is packaged as a library and used by Expertiza. Automated Metareview system is an independent entity and can be used by other peer review systems as well. This is Natural Language Processing based system that accepts original article, review written for this article, and the rubric used during article review. There are many other peer review systems, which can benefit from this system, if this is available for them to evaluate their rubrics. We are working on migrating this system from a library to a web service. &lt;br /&gt;
&amp;lt;br /&amp;gt;Web service will expose &amp;quot;AutomatedMetareview&amp;quot; method, which will accept three parameters mentioned before as JSON and return the meta-review as a JSON object. &amp;lt;br /&amp;gt;&lt;br /&gt;
The response JSON object will have parameters mentioned below: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;plagiarism&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;relevance&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;content_summative&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;content_problem&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;content_advisory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;coverage&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;tone_positive&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;tone_negative&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;tone_neutral&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;quantity&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
[[File:Workflow.jpg|frame|center|Interaction between Client and Web Service]]&lt;br /&gt;
&lt;br /&gt;
===3.1 Assumptions===&lt;br /&gt;
For the project, the code that is being modified is assumed to be correct and meet all feature requirements of the system. Interactions modified due to refactoring will not change the underline system definitions.&lt;br /&gt;
&lt;br /&gt;
== 4. Testing==&lt;br /&gt;
We will be using the existing test suite used by gem to test any new code modification. We will be writing new test cases for web service implementation and any new public method exposed by existing classes.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_E1527_SWAR&amp;diff=96549</id>
		<title>CSC/ECE 517 Spring 2015 E1527 SWAR</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015_E1527_SWAR&amp;diff=96549"/>
		<updated>2015-04-08T19:36:28Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Introduction to Autometareview project https://github.com/lramach/autometareviews0.1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;E1527. Refactor Autometareviews gem and migration to Web-Service&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
= Introduction to Autometareview project &amp;lt;ref&amp;gt;https://github.com/lramach/autometareviews0.1&amp;lt;/ref&amp;gt;=&lt;br /&gt;
This project is developed as part of Expertiza project &amp;lt;ref&amp;gt;http://wikis.lib.ncsu.edu/index.php/Expertiza&amp;lt;/ref&amp;gt;. &amp;lt;br /&amp;gt;&lt;br /&gt;
The automated metareview tool identifies the quality of a review using natural language processing and machine learning techniques (completely automated). Feedback is provided to reviewers on the following metrics:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
*'''Review relevance:''' This metric tells the reviewer how relevant the review is to the content of the author's submission. Numeric feedback in the scale of 0--1 is provided to indicate a review's relevance. &amp;lt;/li&amp;gt;&lt;br /&gt;
*'''Review Content Type:''' This metric identifies whether the review contains 'summative content' -- positive feedback, problem detection content' -- problems identified by reviewers in the author's work or 'advisory content' -- content indicating suggestions or advice provided by reviewers. A numeric feedback on the scale of 0--1 is provided for each content type to indicate whether the review contains that type of content. &amp;lt;/li&amp;gt;&lt;br /&gt;
*'''Review Coverage:''' This metric indicates the extent to which a review covers the main points of a submission. Numeric value in the range of 0--1 indicates the coverage of a review. &amp;lt;/li&amp;gt;&lt;br /&gt;
*'''Plagiarism&amp;lt;ref&amp;gt;http://www.plagiarism.org/plagiarism-101/what-is-plagiarism/&amp;lt;/ref&amp;gt;:''' Indicates the presence of plagiarism in the review text.&amp;lt;/li&amp;gt;&lt;br /&gt;
*'''Tone:''' The metric indicates whether a review has a positive, negative or neutral tone. &amp;lt;/li&amp;gt; &lt;br /&gt;
*'''Quantity:''' Indicates the number of unique words used by the reviewer in the review. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Problem Statement =&lt;br /&gt;
&lt;br /&gt;
Currently, Autometareviews project is used as a gem&amp;lt;ref&amp;gt;http://guides.rubygems.org/what-is-a-gem/&amp;lt;/ref&amp;gt; in Expertiza project. Purpose of this project is to migrate this gem to a web service&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Web_service&amp;lt;/ref&amp;gt; and expose its methods on web, which can be consumed by any application as web service. Older gem was dependent old libraries&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Library_%28computing%29&amp;lt;/ref&amp;gt;&lt;br /&gt;
such as Stanford-core-nlp, rwordnet, etc. We will migrate them to new libraries without breaking the existing feature-set. We are also going to refactor the source code of this gem file to promote readability, reduced complexity, and code redundancies. We will fix&lt;br /&gt;
any bug or bottleneck that we can find to improve the performance of this service. We will not add any new feature to the existing feature set provided by the gem. Before making any modification to the existing features, we will present them before Dr.&lt;br /&gt;
Gehringer and his Expertiza team.&lt;br /&gt;
&lt;br /&gt;
= Scope =&lt;br /&gt;
The scope of this project includes migration of existing gem application to a web-service, refactoring the existing classes and migrating to newer libraries, wherever possible.&lt;br /&gt;
The classes that we propose to refactor are&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
 tone.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; degree_of_relevance.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; wordnet_based_similarity.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; sentence_state.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; cluster_generation.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; plagiarism_check.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; graph_generator.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; predict_class.rb &amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; and review_coverage.rb &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
No new feature will be developed as part of this project. Any major code change due to inclusion of newer libraries will be communicated to Expertiza project team. Existing code will be tested to ensure the functionality does not change.&lt;br /&gt;
&lt;br /&gt;
=Standards =&lt;br /&gt;
All developed code will adhere to the ruby on rails coding guidelines&amp;lt;ref&amp;gt;https://docs.google.com/document/d/1qQD7fcypFk77nq7Jx7ZNyCNpLyt1oXKaq5G-W7zkV3k/edit&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= List of Tasks =&lt;br /&gt;
Metioned below are the tasks we will perform as part of this project.&amp;lt;ref&amp;gt;https://docs.google.com/document/d/10JTdEjCiRTre3nO4j_czBzhcxkqOSzmAT8jyiJHNz4c/edit#&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This system is still in nascent stage and have many performance related issues. It takes a long time (about 2 minutes) to generate single meta-review. This is an unacceptable performance statistics for Expertiza. We propose to re-factor code and identify the areas that affect the overall performance of the system. Few areas we identified in preliminary review are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Reading seed data from csv in each pass takes  up a lot of time. We can move this data into Mysql and use ActiveRecords to speed data fetch.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
WordNet based semantic matching takes a lot of time. We will review the method used and present our finding about areas of concern.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 1. Refactor Code==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Efficient Loop constructs. &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Many loops over models are implemented using generic “for” loops.&lt;br /&gt;
Solution: As specified by Ruby guideline, we plan to use efficient ruby loops, such as “each” and “find_each”.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Very large methods &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Several methods have huge amount of code, which makes them difficult to understand and debug.&lt;br /&gt;
Solution: In most cases, large methods can be shortened through the use of smaller helper methods. Such methods could be reused across different components.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Ambiguous method names &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Many methods have ambiguity between the name used for them and the feature implemented by them.&lt;br /&gt;
Solution: We will rename such methods to clearly state the feature implemented by them.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Legacy Code &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: As the system has been modified for bug fixes and enhancements, unnecessary code has accumulated.&lt;br /&gt;
Solution: Isolate and remove all dead code.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Code beautification &amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Description: Coding style used in gem is not based on Ruby on Rails style, which makes it difficult to read for any Ruby programmer.&lt;br /&gt;
Solution: Beautify the code with a consistent standard of documentation, and style.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 2. Upgrade system to use latest dependent ruby gems ==&lt;br /&gt;
The libraries used by gem are very old. We plan to migrate the dependent libraries to their latest versions.&amp;lt;br /&amp;gt;&lt;br /&gt;
Libraries, we have identified are: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;stanford-core-nlp &amp;lt;ref&amp;gt;http://nlp.stanford.edu/software/corenlp.shtml&amp;lt;/ref&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;rwordnet &amp;lt;ref&amp;gt;https://rubygems.org/gems/rwordnet&amp;lt;/ref&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;rjb &amp;lt;ref&amp;gt;https://rubygems.org/gems/rjb&amp;lt;/ref&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;bind-it&amp;lt;ref&amp;gt;https://rubygems.org/gems/bind-it&amp;lt;/ref&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
We will also migrate the project to use Java 8&amp;lt;ref&amp;gt;http://java.com/en/download/whatis_java.jsp&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== 3. Migrate gem to Web service ==&lt;br /&gt;
Expertiza system tries to evaluate each review using an automated meta-review system. This system is packaged as a library and used by Expertiza. Automated Metareview system is an independent entity and can be used by other peer review systems as well. This is Natural Language Processing based system that accepts original article, review written for this article, and the rubric used during article review. There are many other peer review systems, which can benefit from this system, if this is available for them to evaluate their rubrics. We are working on migrating this system from a library to a web service. &lt;br /&gt;
&amp;lt;br /&amp;gt;Web service will expose &amp;quot;AutomatedMetareview&amp;quot; method, which will accept three parameters mentioned before as JSON and return the meta-review as a JSON object. &amp;lt;br /&amp;gt;&lt;br /&gt;
The response JSON object will have parameters mentioned below: &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;plagiarism&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;relevance&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;content_summative&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;content_problem&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;content_advisory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;coverage&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;tone_positive&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;tone_negative&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;tone_neutral&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;quantity&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
[[File:Workflow.jpg|frame|center|Interaction between Client and Web Service]]&lt;br /&gt;
&lt;br /&gt;
===3.1 Assumptions===&lt;br /&gt;
For the project, the code that is being modified is assumed to be correct and meet all feature requirements of the system. Interactions modified due to refactoring will not change the underline system definitions.&lt;br /&gt;
&lt;br /&gt;
== 4. Testing==&lt;br /&gt;
We will be using the existing test suite used by gem to test any new code modification. We will be writing new test cases for web service implementation and any new public method exposed by existing classes.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95924</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95924"/>
		<updated>2015-03-24T01:13:03Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR in Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN)&amp;lt;ref&amp;gt;[http://eden.sahanafoundation.org/ Sahana Eden]&amp;lt;/ref&amp;gt; is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&amp;lt;ref&amp;gt;[http://lxml.de/ python-lxml]&amp;lt;/ref&amp;gt;&lt;br /&gt;
* python-imaging (PIL)&amp;lt;ref&amp;gt;[http://www.pythonware.com/products/pil/ python-imaging (PIL)]&amp;lt;/ref&amp;gt;&lt;br /&gt;
* python-reportlab&amp;lt;ref&amp;gt;[https://pypi.python.org/pypi/reportlab python-reportlab]&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Imagemagick 'convert'&amp;lt;ref&amp;gt;[http://www.imagemagick.org/script/convert.php Imagemagick]&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Tesseract 3.00-1&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Tesseract_%28software%29 Tesseract]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
= OCR module Integrated =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95923</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95923"/>
		<updated>2015-03-24T01:09:12Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR in Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN)&amp;lt;ref&amp;gt;[http://eden.sahanafoundation.org/ Sahana Eden]&amp;lt;/ref&amp;gt; is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&amp;lt;ref&amp;gt;http://lxml.de/&amp;lt;/ref&amp;gt;&lt;br /&gt;
* python-imaging (PIL)&amp;lt;ref&amp;gt;http://www.pythonware.com/products/pil/&amp;lt;/ref&amp;gt;&lt;br /&gt;
* python-reportlab&amp;lt;ref&amp;gt;https://pypi.python.org/pypi/reportlab&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Imagemagick 'convert'&amp;lt;ref&amp;gt;http://www.imagemagick.org/script/convert.php&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Tesseract 3.00-1&amp;lt;ref&amp;gt;https://code.google.com/p/tesseract-ocr/downloads/detail?name=tesseract-3.00.1.exe.zip&amp;amp;can=2&amp;amp;q&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
= OCR module Integrated =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95921</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95921"/>
		<updated>2015-03-24T01:06:13Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN)&amp;lt;ref&amp;gt;[http://eden.sahanafoundation.org/ Sahana Eden]&amp;lt;/ref&amp;gt; is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
= OCR module Integrated =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95920</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95920"/>
		<updated>2015-03-24T01:05:53Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR module Integrated */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN)&amp;lt;ref&amp;gt;[http://eden.sahanafoundation.org/ Sahana Eden]&amp;lt;/ref&amp;gt; is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
= OCR module Integrated =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95919</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95919"/>
		<updated>2015-03-24T01:05:34Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR in Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN)&amp;lt;ref&amp;gt;[http://eden.sahanafoundation.org/ Sahana Eden]&amp;lt;/ref&amp;gt; is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95917</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95917"/>
		<updated>2015-03-24T01:05:08Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR in Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN)&amp;lt;ref&amp;gt;[http://eden.sahanafoundation.org/ Sahana Eden]&amp;lt;/ref&amp;gt; is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
== OCR in Sahana ==&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95915</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95915"/>
		<updated>2015-03-24T01:04:30Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN)&amp;lt;ref&amp;gt;[http://eden.sahanafoundation.org/ Sahana Eden]&amp;lt;/ref&amp;gt; is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95912</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95912"/>
		<updated>2015-03-24T01:01:03Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR module Integrated */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95911</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95911"/>
		<updated>2015-03-24T01:00:32Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Implementation Training Module and OCR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95910</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95910"/>
		<updated>2015-03-24T00:59:56Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Form Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File: Generated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95909</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95909"/>
		<updated>2015-03-24T00:58:29Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Form Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:chef_knife server.pngGenerated.png|frame|Source: http://eden.sahanafoundation.org/wiki/BluePrint/OCRIntegration#no1|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95908</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95908"/>
		<updated>2015-03-24T00:56:37Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Form Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example, a form pertaining to North Carolina can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville” or &amp;quot;Others&amp;quot;. This will help in easy understanding of the data for the OCR.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95906</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95906"/>
		<updated>2015-03-24T00:54:28Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Introduction to Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. Sahana Eden is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95905</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95905"/>
		<updated>2015-03-24T00:54:00Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the [http://en.wikipedia.org/wiki/Optical_character_recognition/ Optical Character Recognition(OCR)]in [http://eden.sahanafoundation.org/ Sahana Eden], which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. [http://eden.sahanafoundation.org/ Sahana Eden] is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95904</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95904"/>
		<updated>2015-03-24T00:51:36Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Introduction to Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. [http://eden.sahanafoundation.org/ Sahana Eden] is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
The code for the Sahana Eden project is present at [https://github.com/flavour/eden Github].&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95903</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95903"/>
		<updated>2015-03-24T00:49:38Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Introduction to Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The [http://sahanafoundation.org/ Sahana Software Foundation] was established as a non-profit organization in 2009. [http://eden.sahanafoundation.org/ Sahana Eden] is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95902</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95902"/>
		<updated>2015-03-24T00:47:35Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR module Integrated */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation was included in the project by making changes to models/000_config.py &amp;amp; modules/templates/&amp;lt;template&amp;gt;/config.py.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95900</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95900"/>
		<updated>2015-03-24T00:45:50Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;br /&gt;
&lt;br /&gt;
== OCR module Integrated ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:OCRModuleInclusion.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:OCRModuleInclusion.png&amp;diff=95899</id>
		<title>File:OCRModuleInclusion.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:OCRModuleInclusion.png&amp;diff=95899"/>
		<updated>2015-03-24T00:44:24Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95896</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95896"/>
		<updated>2015-03-24T00:41:22Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Implementation Training Module and OCR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above image shows the flow control when the image data is converted text data and then is populated in the database&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class S3OCRImageParser(object):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        Image Parsing and OCR Utility&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, s3method, r):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
            Intialise class instance with environment variables and functions&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        self.r = r&lt;br /&gt;
        self.request = current.request&lt;br /&gt;
        checkDependencies(r)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the class in which the Parsing and OCR utility is implemented. This again uses Adapter pattern for its design as data from different type of from field of the image data have to converted to text data.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95882</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95882"/>
		<updated>2015-03-24T00:35:27Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR in Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Importflow.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Importflow.png&amp;diff=95881</id>
		<title>File:Importflow.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Importflow.png&amp;diff=95881"/>
		<updated>2015-03-24T00:34:45Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: This image shows the flow control when the image data is stored as text data.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This image shows the flow control when the image data is stored as text data.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95879</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95879"/>
		<updated>2015-03-24T00:33:30Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR in Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in two important parts&lt;br /&gt;
==Form Generation== &lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95878</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95878"/>
		<updated>2015-03-24T00:32:54Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Implementation Training Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in three important parts&lt;br /&gt;
==Form Generation==&lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module and OCR==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
Post this OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence Tesseract was chosen for this purpose.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95875</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95875"/>
		<updated>2015-03-24T00:31:15Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in three important parts&lt;br /&gt;
==Form Generation==&lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95872</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95872"/>
		<updated>2015-03-24T00:26:53Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Form Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in three important parts&lt;br /&gt;
==Form Generation==&lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This above code is for form generation. It uses Adapter pattern in its implementation as there are many different types of forms present. So whenever a form has to be generated, it is accordingly tweaked and adapted to generate those.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
==OCR==&lt;br /&gt;
This is the final stage of the project during which OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence we chose Tesseract for this purpose.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95868</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95868"/>
		<updated>2015-03-24T00:21:52Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* What is OCR? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== Goals of Project ==&lt;br /&gt;
&lt;br /&gt;
* The Goal of project is to integrate OCR implementation present in the project.&lt;br /&gt;
* Moving the implementation from modules/s3/s3pdf.py, to s3codecs/pdf.py , as the decode() part of the codec.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in three important parts&lt;br /&gt;
==Form Generation==&lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
==OCR==&lt;br /&gt;
This is the final stage of the project during which OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence we chose Tesseract for this purpose.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95867</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95867"/>
		<updated>2015-03-24T00:16:45Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Form Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in three important parts&lt;br /&gt;
==Form Generation==&lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def newOCRForm(self,&lt;br /&gt;
                   formUUID,&lt;br /&gt;
                   pdfname=&amp;quot;ocrform.pdf&amp;quot;,&lt;br /&gt;
                   top=65,&lt;br /&gt;
                   left=50,&lt;br /&gt;
                   bottom=None,&lt;br /&gt;
                   right=None,&lt;br /&gt;
                   **args):&lt;br /&gt;
&lt;br /&gt;
        self.content = []&lt;br /&gt;
        self.output = StringIO()&lt;br /&gt;
        self.layoutEtree = etree.Element(&amp;quot;s3ocrlayout&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
==OCR==&lt;br /&gt;
This is the final stage of the project during which OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence we chose Tesseract for this purpose.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95865</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95865"/>
		<updated>2015-03-24T00:14:19Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Form Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in three important parts&lt;br /&gt;
==Form Generation==&lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above image shows the flow control that takes place to generate a pdf from forms.&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
==OCR==&lt;br /&gt;
This is the final stage of the project during which OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence we chose Tesseract for this purpose.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95864</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95864"/>
		<updated>2015-03-24T00:12:21Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Form Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in three important parts&lt;br /&gt;
==Form Generation==&lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File:Generated.png|center]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Implementation Training Module==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
==OCR==&lt;br /&gt;
This is the final stage of the project during which OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence we chose Tesseract for this purpose.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Generated.png&amp;diff=95863</id>
		<title>File:Generated.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Generated.png&amp;diff=95863"/>
		<updated>2015-03-24T00:10:42Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: This picture shows the flow control for creating the pdf from forms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This picture shows the flow control for creating the pdf from forms&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95852</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95852"/>
		<updated>2015-03-24T00:01:14Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* OCR in Sahana */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
= OCR in Sahana =&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;br /&gt;
&lt;br /&gt;
The functionality of OCR in Sahana can be divided broadly in three important parts&lt;br /&gt;
==Form Generation==&lt;br /&gt;
In this step we generate a pdf document that contains most of the general data with corresponding checkboxes. For example a form can contain the field “Lives at” with check boxes for “Raleigh” , “Charlotte”, “Cary”, “Morrisville”. &lt;br /&gt;
==Implementation Training Module==&lt;br /&gt;
The generated form is then filled by the user. The automated matching is done with the box generated file rather than the image from human involvement.&lt;br /&gt;
==OCR==&lt;br /&gt;
This is the final stage of the project during which OCR is deployed using the Tesseract software. The choice of software is mainly dependent on the success rate of the software and hence we chose Tesseract for this purpose.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95694</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95694"/>
		<updated>2015-03-23T17:53:28Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;br /&gt;
&lt;br /&gt;
== OCR in Sahana ==&lt;br /&gt;
&lt;br /&gt;
OCR is implemented in Sahana using tesseract which is a cross platform compatible software and the implementation is present in modules/s3/s3pdf.py .&lt;br /&gt;
OCR has few dependencies that have to be installed. The various dependencies and command line tools that have to be installed are &lt;br /&gt;
* python-lxml&lt;br /&gt;
* python-imaging (PIL)&lt;br /&gt;
* python-reportlab&lt;br /&gt;
* Imagemagick 'convert'&lt;br /&gt;
* Tesseract 3.00-1&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95675</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95675"/>
		<updated>2015-03-23T17:27:30Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* What is OCR? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
  Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
    1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95657</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95657"/>
		<updated>2015-03-23T16:35:02Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95656</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95656"/>
		<updated>2015-03-23T16:29:30Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;br /&gt;
&lt;br /&gt;
== What is OCR? ==&lt;br /&gt;
The wiki definition of the optical character recognition is “Optical character recognition (OCR) is the mechanical or electronic conversion of images of typewritten or printed text into machine-encoded text.” The main idea is to provide the computer the capability of identifying and storing the data which was hand-written/type-written on a paper. It found wide applications in data entry from printed paper data records such as invoices, computer receipts, passports, bank statements or from any other document. OCR is a field of research in pattern recognition, artificial intelligence and computer vision.  As mentioned earlier the main purpose of Sahana Eden is to provide technical support in disaster management. During disasters it may not be always be possible for the authorities to carry computer to the affected areas to manually enter the data and also the area may not have the internet facility. Instead the forms can be printed and can be made to be filled in the area and then scan the images to store in the database. It may not be possible to identify the handwritten images because different people have different fonts. This problem can be overcome in two ways. One way is to use the type-written images and the second one is trying to represent the data that has to be filled in the form of check boxes. For example instead of putting a field “Severity of damage”, we can get the required answer by representing the data as follows.&lt;br /&gt;
&lt;br /&gt;
Severity of Damage (1-lowest 5-highest):&lt;br /&gt;
1: □   2: □   3: □   4: □   5: □&lt;br /&gt;
 &lt;br /&gt;
If one of them is ticked, the computer can identify the tick and can store the data referring to database schema. It may not always be possible to carry a computer/laptop to the affected areas. Hence designing forms which highly rely on check boxes can be a better solution.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95641</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95641"/>
		<updated>2015-03-23T16:22:54Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;S1501: Integrating OCR&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction to Sahana ==&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
== Eden ==&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
&lt;br /&gt;
* Organization Registry&lt;br /&gt;
* Shelter&lt;br /&gt;
* Project Tracking.&lt;br /&gt;
* Inventory&lt;br /&gt;
* Assets&lt;br /&gt;
* Assessments&lt;br /&gt;
* Scenarios &amp;amp; Events&lt;br /&gt;
* Mapping&lt;br /&gt;
* Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95639</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95639"/>
		<updated>2015-03-23T16:20:13Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''S1501: Integrating OCR'''&lt;br /&gt;
&lt;br /&gt;
This page explains about the project to integrate the optical character recognition (OCR) in Sahana Eden, which enables the Eden to detect and identify the type-written data on the forms and store it in the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Introduction to Sahana'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Sahana Software Foundation was established as a non-profit organization in 2009. Sahana is dedicated to saving lives by providing information management solutions which can enable organizations to prepare and respond better to disasters. It was originally developed by Sri Lankan based IT Community who wanted to apply their talent towards helping their country recover from the 2004 Indian Ocean earthquake and Tsunami. It grew into a global open source project which is now supported by hundreds of volunteer contributions from different parts of the world. The community evolved and emerged to become the present Sahana Software Foundation.&lt;br /&gt;
&lt;br /&gt;
''' Eden ''' &amp;lt;br&amp;gt;&lt;br /&gt;
Sahana Emergency Development Environment (EDEN) is a flexible humanitarian platform which can be deployed for critical humanitarian needs management either prior to or during a crisis. This is specifically built for the disaster management. The mission of Sahana Eden is “ To help alleviate human suffering by giving emergency managers, disaster response professionals and communities access to the information that they need to better prepare for and respond to disasters through the development and promotion of free and open source software and open standards. ” Eden has a rich feature set and be rapidly customized to adapt to existing processes and can also be integrated with existing systems. It can be accessed from the web or locally from a flash drive which allows it to be used even in areas with poor internet connectivity. Sahana Eden contains a number of modules which can be configured to provide a wide range of functionality. Some of its main capabilities are :&lt;br /&gt;
1.      Organization Registry&lt;br /&gt;
2.      Shelter&lt;br /&gt;
3.      Project Tracking.&lt;br /&gt;
4.      Inventory&lt;br /&gt;
5.      Assets&lt;br /&gt;
6.     Assessments&lt;br /&gt;
7.     Scenarios &amp;amp; Events&lt;br /&gt;
8.     Mapping&lt;br /&gt;
9.      Messaging&lt;br /&gt;
 &lt;br /&gt;
Eden is easy to install and maintain. Probably this is the main reason it has been successfully deployed during many disasters and have been of great help to the disaster management authorities.&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95630</id>
		<title>CSC/ECE 517 Spring 2015/oss S1501 OA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/oss_S1501_OA&amp;diff=95630"/>
		<updated>2015-03-23T16:10:38Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: Created page with &amp;quot;Integrating OCR&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Integrating OCR&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015&amp;diff=95629</id>
		<title>CSC/ECE 517 Spring 2015</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015&amp;diff=95629"/>
		<updated>2015-03-23T16:10:08Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Writing Assignment 1==&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 17 WL]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 5 ZX]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 6 TZ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 4 RW]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 7 SA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 9 RA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 14 RI]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 1 DZ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 20 HA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 3 RF]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 12 LS]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 13 MA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1a 2 WA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1b 21 QW]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1b 23 MS]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1b 10 GL]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1b 27 VC]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1b 22 SF]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1b 15 SH]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/ch1b 18 AS]]&lt;br /&gt;
&lt;br /&gt;
==Writing Assignment 2==&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1502 wwj]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2014/oss E1508 MRS]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1504 IMV]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1505 xzl]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1509 lds]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1510 FLP]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1506 SYZ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss S1504 AAC]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1507 DGO]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss M1502 GVJ]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss M1503 EDT]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1503 RSA]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss E1501 YWS]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2015/oss S1501 OA]]&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=94027</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=94027"/>
		<updated>2015-02-17T03:55:26Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[File:workstation.png|frame|Source: https://docs.chef.io/chef_quick_overview.html|right]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
The topic writeup for this page can be found [https://docs.google.com/document/d/1TgBtp7flIPKJwkkShgtcIkt--mtHuwVHsQX6Tpzj1rc/edit here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms. Chef is an IT and environment distribution system, built to be robust and scalable. Imagine a large scale internet based company. Depending on the demands of the company, they may have a need for development workstations, servers for purchasing products, servers for hosting games, even clients for games or accessing databases. All of these different environments are called ''chef client nodes'', with each different setup as different ''environments''. For example, you might have ten chef client nodes set up with the development environment, and one hundred chef client nodes set up with the server environment. The chef server contains all of the ''recipes'', reusable code that may be needed both for use and setup of different chef client nodes, to set up all of the different environments that have been defined. In addition, the chef server works like other versioning software. This means you can roll out updates conveniently to all of the different chef client nodes with ease. This allows the entire collection of chef, the recipes, environments, and nodes, called the ''infrastructure'', to be managed simply and in defined, scalable versions. &lt;br /&gt;
Chef is more complex and allows other little tricks and nuances. If you want to learn more about Chef itself, beyond the description found here, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;, which are the sources for the information in this background. This description just serves to introduce the concept of chef, so that knife's purpose can be understood. These other pages cover the ideas of Chef and how to use it effectively in more detail. In fact, the main site for Chef has an interactive tutorial in setting up a Chef server, without even having to use a personal server or computer. However, the rest of this article will be describing and covering knife. &lt;br /&gt;
&lt;br /&gt;
== What is Knife? ==&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef client node and the Chef server. Where the Chef command-line tool is used while working with the chef server and repo, Knife helps us to manage the following:&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
Basically, the chef command tool deals with the actual chef installation wherever it is, either a local installation and on the server. It deals only with itself. Knife, however, deals with the setup of all the communication and objects between the chef server and a chef client node. In the figure, we can see that how knife provides an interface between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
[[File:chef_knife server.png|frame|Source: http://dev.classmethod.jp/server-side/chef-server-install|center]]&lt;br /&gt;
&lt;br /&gt;
== Using Knife ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page here: ([http://curl.haxx.se/ cURL Home Page]). The second, bootstrap-install-command, allows the execution of another install command on the target node alongside the bootstrap function. The final one, bootstrap-install-sh, allows a custom install script located at the designated URL to be run, following the bootstrap command. &lt;br /&gt;
&lt;br /&gt;
'''--environment ENVIRONMENT, --boostrap-template TEMPLATE'''&lt;br /&gt;
&lt;br /&gt;
The --environment and --bootstrap-template commands are similar, in that they allow customization of the target node. One allows the node to be set up against a target environment, which is useful if your chef server has multiple environments available. The next allows different node setups to be saved as templates. These can be used to quickly and efficiently set up additional similar nodes, especially if the additional installation options in bootstrap are long. &lt;br /&gt;
&lt;br /&gt;
'''-V'''&lt;br /&gt;
&lt;br /&gt;
A small option for bootstrap, the -V option forces the initial chief-client setup to be run on the target node at the debug log level, following the bootstrap installation. This allows almost complete remote setup of new nodes, assuring that the node is ready to be used and the chef-client is fully operational and doesn't need further setup. In addition, the debug log will allow any errors in the chef client to be saved, in the case of something wrong occurring with the node.  The exact command run is shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;chef-client -l debug&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Custom settings and adding them to the knife.rb file'''&lt;br /&gt;
&lt;br /&gt;
For some settings, including settings related to bootstrap, the options will need to be added to the knife.rb file. This file contains all of the commands for knife, and all of the different options available to these commands. For example, to use the --bootstrap-template and the --sudo options, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;knife[:template_file]&lt;br /&gt;
knife[:use_sudo]&amp;lt;/pre&amp;gt;&lt;br /&gt;
These commands add the template_file and use_sudo options to the knife.rb file, which will enable those options to be used in the bootstrap command. There are more options that can be added using the knife.rb file, the full knife documentation for commands are here: ([https://docs.chef.io/chef/knife.html# Knife Reference]).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=94024</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=94024"/>
		<updated>2015-02-17T03:49:48Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* What is Knife? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[File:workstation.png|frame|Source: https://docs.chef.io/chef_quick_overview.html|right]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
The topic writeup for this page can be found [https://docs.google.com/document/d/1TgBtp7flIPKJwkkShgtcIkt--mtHuwVHsQX6Tpzj1rc/edit here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms. Chef is an IT and environment distribution system, built to be robust and scalable. Imagine a large scale internet based company. Depending on the demands of the company, they may have a need for development workstations, servers for purchasing products, servers for hosting games, even clients for games or accessing databases. All of these different environments are called ''chef client nodes'', with each different setup as different ''environments''. For example, you might have ten chef client nodes set up with the development environment, and one hundred chef client nodes set up with the server environment. The chef server contains all of the ''recipes'', reusable code that may be needed both for use and setup of different chef client nodes, to set up all of the different environments that have been defined. In addition, the chef server works like other versioning software. This means you can roll out updates conveniently to all of the different chef client nodes with ease. This allows the entire collection of chef, the recipes, environments, and nodes, called the ''infrastructure'', to be managed simply and in defined, scalable versions. &lt;br /&gt;
Chef is more complex and allows other little tricks and nuances. If you want to learn more about Chef itself, beyond the description found here, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;, which are the sources for the information in this background. This description just serves to introduce the concept of chef, so that knife's purpose can be understood. These other pages cover the ideas of Chef and how to use it effectively in more detail. In fact, the main site for Chef has an interactive tutorial in setting up a Chef server, without even having to use a personal server or computer. However, the rest of this article will be describing and covering knife. &lt;br /&gt;
&lt;br /&gt;
== What is Knife? ==&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef client node and the Chef server. Where the Chef command-line tool is used while working with the chef server and repo, Knife helps us to manage the following:&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
Basically, the chef command tool deals with the actual chef installation wherever it is, either a local installation and on the server. It deals only with itself. Knife, however, deals with the setup of all the communication and objects between the chef server and a chef client node. In the figure, we can see that how knife provides an interface between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Knife ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page here: ([http://curl.haxx.se/ cURL Home Page]). The second, bootstrap-install-command, allows the execution of another install command on the target node alongside the bootstrap function. The final one, bootstrap-install-sh, allows a custom install script located at the designated URL to be run, following the bootstrap command. &lt;br /&gt;
&lt;br /&gt;
'''--environment ENVIRONMENT, --boostrap-template TEMPLATE'''&lt;br /&gt;
&lt;br /&gt;
The --environment and --bootstrap-template commands are similar, in that they allow customization of the target node. One allows the node to be set up against a target environment, which is useful if your chef server has multiple environments available. The next allows different node setups to be saved as templates. These can be used to quickly and efficiently set up additional similar nodes, especially if the additional installation options in bootstrap are long. &lt;br /&gt;
&lt;br /&gt;
'''-V'''&lt;br /&gt;
&lt;br /&gt;
A small option for bootstrap, the -V option forces the initial chief-client setup to be run on the target node at the debug log level, following the bootstrap installation. This allows almost complete remote setup of new nodes, assuring that the node is ready to be used and the chef-client is fully operational and doesn't need further setup. In addition, the debug log will allow any errors in the chef client to be saved, in the case of something wrong occurring with the node.  The exact command run is shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;chef-client -l debug&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Custom settings and adding them to the knife.rb file'''&lt;br /&gt;
&lt;br /&gt;
For some settings, including settings related to bootstrap, the options will need to be added to the knife.rb file. This file contains all of the commands for knife, and all of the different options available to these commands. For example, to use the --bootstrap-template and the --sudo options, the following commands need to be executed:&lt;br /&gt;
&amp;lt;pre&amp;gt;knife[:template_file]&lt;br /&gt;
knife[:use_sudo]&amp;lt;/pre&amp;gt;&lt;br /&gt;
These commands add the template_file and use_sudo options to the knife.rb file, which will enable those options to be used in the bootstrap command. There are more options that can be added using the knife.rb file, the full knife documentation for commands are here: ([https://docs.chef.io/chef/knife.html# Knife Reference]).&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93569</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93569"/>
		<updated>2015-02-09T20:59:19Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[File:workstation.png|frame|Source: https://docs.chef.io/chef_quick_overview.html|right]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo. Knife helps us to manage the following.&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the figure, we can see that how knife provides an interface  between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
== Using Knife ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page [http://curl.haxx.se/ here (cURL Home Page)].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93568</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93568"/>
		<updated>2015-02-09T20:57:52Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[File:workstation.png|frame|Source: https://docs.chef.io/chef_quick_overview.html|right]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo. Knife helps us to manage the following.&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the figure, we can see that how knife provides an interface  between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page [http://curl.haxx.se/ here (cURL Home Page)].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Workstation.png&amp;diff=93567</id>
		<title>File:Workstation.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Workstation.png&amp;diff=93567"/>
		<updated>2015-02-09T20:57:20Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93566</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93566"/>
		<updated>2015-02-09T20:56:59Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
[[File:workstation.png|frame|Source: https://docs.chef.io/chef_quick_overview.html/|right]]&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo. Knife helps us to manage the following.&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the figure, we can see that how knife provides an interface  between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''--bootstrap-curl-options OPTIONS, --bootstrap-install-command COMMAND, --bootstrap-install-sh URL'''&lt;br /&gt;
&lt;br /&gt;
These commands allow customization of the installation bootstrap performs. They are all mutually exclusive, but allow different ways to perform this customization. The first, bootstap-curl-options, which allows additional cURL options to be performed alongside the bootstrap installation. To learn more about cURL, check out their main web page [http://curl.haxx.se/ here (cURL Home Page)].&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93564</id>
		<title>CSC/ECE 517 Spring 2015/ch1a 2 WA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2015/ch1a_2_WA&amp;diff=93564"/>
		<updated>2015-02-09T20:44:52Z</updated>

		<summary type="html">&lt;p&gt;Abhanda3: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Knife&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Knife is the command line tool for managing Chef nodes. Simply, Chef allows the distribution of server environments between many different servers (called '''nodes'''). Any changes to the primary chef server (called the '''chef repo''' are distributed throughout all the other nodes, while different nodes can have other recipes and send them back to the chef repo. Knife, then, handles the communication between nodes and the chef repo. For example, let's say that there is an object on the chef repo that a node desires. Knife provides the tools to download that object to the node. Knife also allows setting up a node, installing necessary packages, management of users, and much more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
&lt;br /&gt;
Chef streamlines the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms.&lt;br /&gt;
If you are unfamiliar with Chef and how it works, check out the comparison between Chef and Puppet here: [http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w10_ga] or take a look at the official Chef website here: &amp;lt;ref&amp;gt;[https://www.chef.io/ Chef]&amp;lt;/ref&amp;gt;. There, a deeper understanding of Chef can be attained.&lt;br /&gt;
&lt;br /&gt;
Chef includes two important command-line tools.&lt;br /&gt;
*Knife command-line tool&lt;br /&gt;
*Chef command-line tool&lt;br /&gt;
&lt;br /&gt;
knife is the command-line tool that provides an interface between a local chef-repo and the Chef server. Whereas, Chef command-line tool is used while working with the chef repo. Knife helps us to manage the following.&lt;br /&gt;
&lt;br /&gt;
* Nodes&lt;br /&gt;
* JSON data Stores &lt;br /&gt;
* Environments&lt;br /&gt;
* chef-clients installations on management workstations&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt; [[File:chef_knife server.png]] &amp;lt;ref&amp;gt;[http://dev.classmethod.jp/server-side/chef-server-install/ Chef Server]&amp;lt;/ref&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the figure, we can see that how knife provides an interface  between local repository's and Chef server at the workstation.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Using Knife is fairly straightforward, with usage following this syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; knife [verb] [object] [options] &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The different verbs, or subcommands, for Knife are as follows, from the Using Knife page&amp;lt;ref&amp;gt; [https://docs.chef.io/knife_using.html Knife Documents]&amp;lt;/ref&amp;gt;: bootstrap, client, configure, cookbook, cookbook site, data bag, delete, deps, diff, download, edit, environment, exec, index rebuild, list, node, recipe list, role, search, show, ssh, status, tag, upload, user, and xargs.&lt;br /&gt;
&lt;br /&gt;
'''Warning:''' Before you run many of these commands, you should have the knife editor set correctly. In the chef-repo, there are multiple ruby files that set the configuration of the environment. Inside of knife.rb, you need to add or set the following line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
knife[:editor] = &amp;quot;/usr/bin/vim&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The path can be set to the text editor of choice, the above command sets the editor to vim. &lt;br /&gt;
&lt;br /&gt;
The example we will use is also one that is useful for setting up nodes, and that is the usage of the bootstrap command. To set up a node, go to the command line on the chef repo and execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, the verb used is '''bootstrap'''. Bootstrap is the subcommand that allows the installation of a chef client on to a targeted node. &lt;br /&gt;
Second, the object is the ip_address_of_node. Every subcommand takes an object, and since chef operates on many ruby principles and scripts, the object can be most anything. For boostrap, this object is the ip of the server address. For other commands, this might be something different. &lt;br /&gt;
Third, we have the options for the bootstrap command and the object. For bootstrap, this includes the username and password for the node, and the option --sudo, to make sure all commands are executed correctly. &lt;br /&gt;
&lt;br /&gt;
Before we do the next example, let's cover an important part of object strings and how they are treated by knife and the chef repo. &lt;br /&gt;
&lt;br /&gt;
'''Wildcards'''&lt;br /&gt;
A wildcard search can be used similar to standard regex commands, with one notable difference. The wildcard character itself '''must be escaped using the \ character.''' Here is an example from the &amp;quot;Using Knife&amp;quot; page on the chef website. Let's say the following was used to search for an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will return all of the objects that start with data_bags\a on the chef-node. However, if we were to run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data_bags/a*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will only search for objects on the chef repo corresponding to objects starting with data_bags/a on the node. Therefore, the * was applied '''before''' being sent to the chef repo, instead of after. So, as an example, let us list all of the data bags that are on the server that start with 'a'. Our object, then, is the string above, &amp;lt;code&amp;gt;data_bags/a\*&amp;lt;/code&amp;gt;. The verb that lists different objects on the chef repo is called &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;. Our command we would run would be this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife list data_bags/a\*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which would print to the console all of the objects in the data_bags directory that started with a.&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping A Node ==&lt;br /&gt;
&lt;br /&gt;
One of the key uses of knife is doing something called &amp;quot;bootstrapping&amp;quot; a node &amp;lt;ref&amp;gt;[http://docs.chef.io/open_source/install_bootstrap.html Install Bootstrap]&amp;lt;/ref&amp;gt;. This key tool allows someone using the Chef server to set up a remote node, or client. Not only does knife set up all of the relevant recipes, environments, and other such things related with the chef repo itself, it also installs all of the tools necessary for interacting with the chef server and configuring the chef client. Because of this, a basic understanding in how to bootstrap a node, and some knowledge on the available options for bootstrapping a node, is important. &lt;br /&gt;
&lt;br /&gt;
Luckily, bootstrapping a node is very simple. To bootstrap a node, the general command would look like this. Be aware, this is being run from the chef server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife bootstrap ip_address_of_node -x username -P password --sudo --node-name name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This process will create a chef client at the designated IP adress. The username and the password is the username and password of a root access user on the remote node.  The name of the node can be set here as well,  instead of automatically using other settings. The option is shown here, to make the rest of the example easier to understand. Luckily, the knife bootstrap command uses an omnibus installer that automatically detects the OS of the target machine and will install all of the necessary command line tools and internal installations, like ruby, for the chef client to function. Once the bootstrap command is complete, the following message will be displayed.&lt;br /&gt;
&amp;lt;pre&amp;gt;INFO: Report handlers complete&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, before continuing, confirmation of the remote node is necessary. To confirm that the remote node was installed correctly and is running, run the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;knife client show name_of_node&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the name_of_node is the name of the node either set in other options and commands, such as the --node-name used above. When this is run, the node's information should be displayed, such as if the node is an admin, the name of the node, and the JSON type it was created from. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;admin:       false&lt;br /&gt;
chef_type:   client&lt;br /&gt;
json_class:  Chef::ApiClient&lt;br /&gt;
name:        name_of_node&lt;br /&gt;
public_key:&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bootstrap Options and Knife Settings ==&lt;br /&gt;
As one of the most powerful tools knife has to offer, the bootstrap function has many different options available to it. The &amp;quot;Installing Bootstrap&amp;quot; section covered three such options (-x, -P, and --node-name), but there are many more available that are useful. Here are a few that stand out as being useful to someone using knife bootstrap for the first time, or for people who are dealing with something outside of the normal conditions for installing and using knife bootstrap. In addition, adding different settings to the knife.rb file will be covered, for people looking to expand the usage of knife and knife bootstrap. Most of this information is covered in higher detail in the main knife bootstrap page, as well as all the other options. You can check that page out using the reference here.&amp;lt;ref&amp;gt;[http://docs.chef.io/knife_bootstrap.html Knife Boostrap]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Abhanda3</name></author>
	</entry>
</feed>