From 5913d7344f9a319054f305ee881fe325d3f9b886 Mon Sep 17 00:00:00 2001 From: Ray Smith Date: Fri, 18 Nov 2016 15:53:11 -0800 Subject: [PATCH] Added missing license headers --- LICENSE | 202 ++++++++++++++++++ api/pdfrenderer.cpp | 2 +- autogen.sh | 9 + ccmain/cube_control.cpp | 10 + ccstruct/hpdsizes.h | 9 + ccstruct/imagedata.cpp | 5 +- ccutil/ccutil.cpp | 9 + lstm/lstmtrainer.cpp | 2 +- neural_networks/runtime/input_file_buffer.cpp | 9 + neural_networks/runtime/input_file_buffer.h | 9 + neural_networks/runtime/neural_net.cpp | 9 + neural_networks/runtime/neural_net.h | 9 + neural_networks/runtime/neuron.cpp | 9 + neural_networks/runtime/neuron.h | 9 + neural_networks/runtime/sigmoid_table.cpp | 9 + opencl/oclkernels.h | 10 +- opencl/opencl_device_selection.h | 9 + opencl/openclwrapper.cpp | 9 + opencl/openclwrapper.h | 9 + testing/reorgdata.sh | 9 + textord/colpartitiongrid.cpp | 2 +- textord/devanagari_processing.h | 9 + textord/gap_map.cpp | 9 + textord/gap_map.h | 9 + textord/tospace.cpp | 9 + training/commandlineflags.cpp | 9 + training/language-specific.sh | 10 + training/set_unicharset_properties.cpp | 10 + viewer/scrollview.cpp | 2 +- viewer/svpaint.cpp | 9 + vs2010/libtesseract/resource.h | 9 + vs2010/port/vcsversion.h | 9 + vs2010/tesseract/resource.h | 9 + 33 files changed, 453 insertions(+), 9 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/api/pdfrenderer.cpp b/api/pdfrenderer.cpp index ac651195b4..80f211bb17 100644 --- a/api/pdfrenderer.cpp +++ b/api/pdfrenderer.cpp @@ -282,7 +282,7 @@ void AffineMatrix(int writing_direction, } } -// There are some really stupid PDF viewers in the wild, such as +// There are some really awkward PDF viewers in the wild, such as // 'Preview' which ships with the Mac. They do a better job with text // selection and highlighting when given perfectly flat baseline // instead of very slightly tilted. We clip small tilts to appease diff --git a/autogen.sh b/autogen.sh index ac44d35770..a551bb4b4d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,13 @@ #!/bin/sh +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This is a simple script which is meant to help developers # better deal with the GNU autotools, specifically: diff --git a/ccmain/cube_control.cpp b/ccmain/cube_control.cpp index 1430debc5b..b982289db9 100644 --- a/ccmain/cube_control.cpp +++ b/ccmain/cube_control.cpp @@ -5,6 +5,16 @@ * Author: Raquel Romano * Created: September 2009 * + * (C) Copyright 2009, Google Inc. + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** http://www.apache.org/licenses/LICENSE-2.0 + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. **********************************************************************/ // Include automatically generated configuration file if running autoconf. diff --git a/ccstruct/hpdsizes.h b/ccstruct/hpdsizes.h index 2670e21b07..f4d886a0b4 100644 --- a/ccstruct/hpdsizes.h +++ b/ccstruct/hpdsizes.h @@ -1,3 +1,12 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef HPDSIZES_H #define HPDSIZES_H diff --git a/ccstruct/imagedata.cpp b/ccstruct/imagedata.cpp index 2100aaf15d..7536258cfa 100644 --- a/ccstruct/imagedata.cpp +++ b/ccstruct/imagedata.cpp @@ -227,10 +227,7 @@ Pix* ImageData::PreScale(int target_height, int max_height, float* scale_factor, input_width = pixGetWidth(src_pix); input_height = pixGetHeight(src_pix); if (target_height == 0) { - if (input_height > max_height) - target_height = max_height; - else - target_height = input_height; + target_height = MIN(input_height, max_height); } float im_factor = static_cast(target_height) / input_height; if (scaled_width != NULL) diff --git a/ccutil/ccutil.cpp b/ccutil/ccutil.cpp index ecf2cb5e36..8f965bb8c1 100644 --- a/ccutil/ccutil.cpp +++ b/ccutil/ccutil.cpp @@ -1,5 +1,14 @@ // Copyright 2008 Google Inc. All Rights Reserved. // Author: scharron@google.com (Samuel Charron) +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include "ccutil.h" diff --git a/lstm/lstmtrainer.cpp b/lstm/lstmtrainer.cpp index 9e91dde4a1..c7defd0932 100644 --- a/lstm/lstmtrainer.cpp +++ b/lstm/lstmtrainer.cpp @@ -1194,7 +1194,7 @@ double LSTMTrainer::ComputeCharError(const GenericVector& truth_str, return static_cast(char_errors) / truth_size; } -// Computes a very simple bag of words word recall error rate. +// Computes word recall error rate using a very simple bag of words algorithm. // NOTE that this is destructive on both input strings. double LSTMTrainer::ComputeWordError(STRING* truth_str, STRING* ocr_str) { typedef TessHashMap > StrMap; diff --git a/neural_networks/runtime/input_file_buffer.cpp b/neural_networks/runtime/input_file_buffer.cpp index c3ca67b604..0d88bec3a7 100644 --- a/neural_networks/runtime/input_file_buffer.cpp +++ b/neural_networks/runtime/input_file_buffer.cpp @@ -4,6 +4,15 @@ // // input_file_buffer.h: Declarations of a class for an object that // represents an input file buffer. +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include #include "input_file_buffer.h" diff --git a/neural_networks/runtime/input_file_buffer.h b/neural_networks/runtime/input_file_buffer.h index 5aa7465c41..51110c4753 100644 --- a/neural_networks/runtime/input_file_buffer.h +++ b/neural_networks/runtime/input_file_buffer.h @@ -5,6 +5,15 @@ // input_file_buffer.h: Declarations of a class for an object that // represents an input file buffer. // +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef INPUT_FILE_BUFFER_H #define INPUT_FILE_BUFFER_H diff --git a/neural_networks/runtime/neural_net.cpp b/neural_networks/runtime/neural_net.cpp index fd2c65af45..d0d359bd53 100644 --- a/neural_networks/runtime/neural_net.cpp +++ b/neural_networks/runtime/neural_net.cpp @@ -4,6 +4,15 @@ // // neural_net.cpp: Declarations of a class for an object that // represents an arbitrary network of neurons +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // #include #include diff --git a/neural_networks/runtime/neural_net.h b/neural_networks/runtime/neural_net.h index 91d0d68a24..081a042804 100644 --- a/neural_networks/runtime/neural_net.h +++ b/neural_networks/runtime/neural_net.h @@ -5,6 +5,15 @@ // neural_net.h: Declarations of a class for an object that // represents an arbitrary network of neurons // +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef NEURAL_NET_H #define NEURAL_NET_H diff --git a/neural_networks/runtime/neuron.cpp b/neural_networks/runtime/neuron.cpp index 36309082d9..f1ff7b2316 100644 --- a/neural_networks/runtime/neuron.cpp +++ b/neural_networks/runtime/neuron.cpp @@ -4,6 +4,15 @@ // // neuron.cpp: The implementation of a class for an object // that represents a single neuron in a neural network +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include "neuron.h" #include "input_file_buffer.h" diff --git a/neural_networks/runtime/neuron.h b/neural_networks/runtime/neuron.h index a13d4a2eb7..8021902f3f 100644 --- a/neural_networks/runtime/neuron.h +++ b/neural_networks/runtime/neuron.h @@ -5,6 +5,15 @@ // neuron.h: Declarations of a class for an object that // represents a single neuron in a neural network // +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef NEURON_H #define NEURON_H diff --git a/neural_networks/runtime/sigmoid_table.cpp b/neural_networks/runtime/sigmoid_table.cpp index f170a10844..0be73b6f8f 100644 --- a/neural_networks/runtime/sigmoid_table.cpp +++ b/neural_networks/runtime/sigmoid_table.cpp @@ -3,6 +3,15 @@ // Author: ahmadab@google.com (Ahmad Abdulkader) // // sigmoid_table.cpp: Sigmoid function lookup table +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include "neuron.h" diff --git a/opencl/oclkernels.h b/opencl/oclkernels.h index 66fb0527d4..f3912e1978 100644 --- a/opencl/oclkernels.h +++ b/opencl/oclkernels.h @@ -1,4 +1,12 @@ - +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef _OCL_KERNEL_H_ #define _OCL_KERNEL_H_ #ifndef USE_EXTERNAL_KERNEL diff --git a/opencl/opencl_device_selection.h b/opencl/opencl_device_selection.h index 305151ee58..d938bea635 100644 --- a/opencl/opencl_device_selection.h +++ b/opencl/opencl_device_selection.h @@ -1,3 +1,12 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifdef USE_OPENCL #ifndef DEVICE_SELECTION_H #define DEVICE_SELECTION_H diff --git a/opencl/openclwrapper.cpp b/opencl/openclwrapper.cpp index 20070fa05d..0c64ad3314 100644 --- a/opencl/openclwrapper.cpp +++ b/opencl/openclwrapper.cpp @@ -1,3 +1,12 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifdef _WIN32 #include #include diff --git a/opencl/openclwrapper.h b/opencl/openclwrapper.h index 5aa625bc4c..cfd612aa98 100644 --- a/opencl/openclwrapper.h +++ b/opencl/openclwrapper.h @@ -1,3 +1,12 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include #include "allheaders.h" #include "pix.h" diff --git a/testing/reorgdata.sh b/testing/reorgdata.sh index 141de4a6f4..8cee64ff80 100755 --- a/testing/reorgdata.sh +++ b/testing/reorgdata.sh @@ -1,4 +1,13 @@ #!/bin/bash +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. if [ $# -ne 1 ] then diff --git a/textord/colpartitiongrid.cpp b/textord/colpartitiongrid.cpp index c87340862a..86c883280e 100644 --- a/textord/colpartitiongrid.cpp +++ b/textord/colpartitiongrid.cpp @@ -1376,7 +1376,7 @@ void ColPartitionGrid::FindMergeCandidates(const ColPartition* part, // combined box to see if anything else is inappropriately overlapped. if (!part_box.contains(c_box) && !c_box.contains(part_box)) { // Search the combined rectangle to see if anything new is overlapped. - // This is a preliminary test designed to quickly weed-out stupid + // This is a preliminary test designed to quickly weed-out poor // merge candidates that would create a big list of overlapped objects // for the squared-order overlap analysis. Eg. vertical and horizontal // line-like objects that overlap real text when merged: diff --git a/textord/devanagari_processing.h b/textord/devanagari_processing.h index ef3acf745b..0d070decd0 100644 --- a/textord/devanagari_processing.h +++ b/textord/devanagari_processing.h @@ -1,5 +1,14 @@ // Copyright 2008 Google Inc. All Rights Reserved. // Author: shobhitsaxena@google.com (Shobhit Saxena) +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef TESSERACT_TEXTORD_DEVNAGARI_PROCESSING_H_ #define TESSERACT_TEXTORD_DEVNAGARI_PROCESSING_H_ diff --git a/textord/gap_map.cpp b/textord/gap_map.cpp index 2f8440e601..421208784d 100644 --- a/textord/gap_map.cpp +++ b/textord/gap_map.cpp @@ -1,3 +1,12 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include "statistc.h" #include "gap_map.h" diff --git a/textord/gap_map.h b/textord/gap_map.h index 914e8dbdea..227db3646b 100644 --- a/textord/gap_map.h +++ b/textord/gap_map.h @@ -1,3 +1,12 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #ifndef GAP_MAP_H #define GAP_MAP_H diff --git a/textord/tospace.cpp b/textord/tospace.cpp index ef1f037b23..4358436917 100644 --- a/textord/tospace.cpp +++ b/textord/tospace.cpp @@ -1,3 +1,12 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. /********************************************************************** * tospace.cpp * diff --git a/training/commandlineflags.cpp b/training/commandlineflags.cpp index 7131cba459..56dcb84221 100644 --- a/training/commandlineflags.cpp +++ b/training/commandlineflags.cpp @@ -1,3 +1,12 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include "commandlineflags.h" #ifdef USE_STD_NAMESPACE diff --git a/training/language-specific.sh b/training/language-specific.sh index 15ccad47cb..b3c38cf876 100755 --- a/training/language-specific.sh +++ b/training/language-specific.sh @@ -1,4 +1,14 @@ # +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Set some language specific variables. Works in conjunction with # tesstrain.sh # diff --git a/training/set_unicharset_properties.cpp b/training/set_unicharset_properties.cpp index 00844ecb56..691c6dcfa6 100644 --- a/training/set_unicharset_properties.cpp +++ b/training/set_unicharset_properties.cpp @@ -1,3 +1,13 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // This program reads a unicharset file, puts the result in a UNICHARSET // object, fills it with properties about the unichars it contains and writes // the result back to a file. diff --git a/viewer/scrollview.cpp b/viewer/scrollview.cpp index ac059d5469..f10b789ea8 100644 --- a/viewer/scrollview.cpp +++ b/viewer/scrollview.cpp @@ -37,7 +37,7 @@ #include "scrollview.h" #ifdef _MSC_VER -#pragma warning(disable:4786) // Don't give stupid warnings for stl +#pragma warning(disable:4786) // Don't give irrelevant warnings for stl #pragma warning(disable:4018) // signed/unsigned warnings #pragma warning(disable:4530) // exception warnings #endif diff --git a/viewer/svpaint.cpp b/viewer/svpaint.cpp index 4d2f49d951..c267257bac 100644 --- a/viewer/svpaint.cpp +++ b/viewer/svpaint.cpp @@ -1,6 +1,15 @@ // Copyright 2007 Google Inc. All Rights Reserved. // // Author: Joern Wanke +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // // Simple drawing program to illustrate ScrollView capabilities. // diff --git a/vs2010/libtesseract/resource.h b/vs2010/libtesseract/resource.h index 6824c386c7..bd49088efb 100644 --- a/vs2010/libtesseract/resource.h +++ b/vs2010/libtesseract/resource.h @@ -1,6 +1,15 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by libtesseract.rc +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // Next default values for new objects // diff --git a/vs2010/port/vcsversion.h b/vs2010/port/vcsversion.h index 6d5bed8074..90b99ad367 100644 --- a/vs2010/port/vcsversion.h +++ b/vs2010/port/vcsversion.h @@ -1,2 +1,11 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #define GIT_REV "3.04.00" diff --git a/vs2010/tesseract/resource.h b/vs2010/tesseract/resource.h index 25e0730f1b..ea8408a975 100644 --- a/vs2010/tesseract/resource.h +++ b/vs2010/tesseract/resource.h @@ -1,6 +1,15 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by tesseract.rc +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // Next default values for new objects //