diff --git a/doc/Doxyfile b/doc/Doxyfile index ef945802b..c8830ba85 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -1656,7 +1656,7 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty string, # for the replacement values of the other commands the user is referred to # HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. diff --git a/java/com/google/scrollview/events/SVEventType.java b/java/com/google/scrollview/events/SVEventType.java index bda66a6e4..6b16f7f31 100644 --- a/java/com/google/scrollview/events/SVEventType.java +++ b/java/com/google/scrollview/events/SVEventType.java @@ -20,7 +20,7 @@ package com.google.scrollview.events; public enum SVEventType { SVET_DESTROY, // Window has been destroyed by user. SVET_EXIT, // User has destroyed the last window by clicking on the 'X' - SVET_CLICK, // Any button pressed thats not a popup trigger. + SVET_CLICK, // Any button pressed that is not a popup trigger. SVET_SELECTION, // Left button selection. SVET_INPUT, // Any kind of input SVET_MOUSE, // The mouse has moved with a button pressed. diff --git a/java/com/google/scrollview/ui/SVWindow.java b/java/com/google/scrollview/ui/SVWindow.java index ec16bd8a6..4ea40e8fd 100644 --- a/java/com/google/scrollview/ui/SVWindow.java +++ b/java/com/google/scrollview/ui/SVWindow.java @@ -254,7 +254,7 @@ public class SVWindow extends JFrame { layer = canvas.getLayer(); canvas.setBackground(Color.BLACK); - // Disable anitaliasing to make the lines more visible. + // Disable antialiasing to make the lines more visible. canvas.setDefaultRenderQuality(PPaintContext.LOW_QUALITY_RENDERING); setLayout(new BorderLayout()); diff --git a/src/ccmain/equationdetect.cpp b/src/ccmain/equationdetect.cpp index 3873858b5..a8966a597 100644 --- a/src/ccmain/equationdetect.cpp +++ b/src/ccmain/equationdetect.cpp @@ -1029,7 +1029,7 @@ EquationDetect::IndentType EquationDetect::IsIndented(ColPartition* part) { const int kYGapTh = static_cast(roundf(0.5 * resolution_)); // Here we use a simple approximation algorithm: from the center of part, We - // perform the radius search, and check if we can find a neighboring parition + // perform the radius search, and check if we can find a neighboring partition // that locates on the top/bottom left of part. search.StartRadSearch((part_box.left() + part_box.right()) / 2, (part_box.top() + part_box.bottom()) / 2, kRadiusTh); diff --git a/src/ccmain/equationdetect.h b/src/ccmain/equationdetect.h index a0c29b9eb..fedb70b02 100644 --- a/src/ccmain/equationdetect.h +++ b/src/ccmain/equationdetect.h @@ -136,10 +136,10 @@ class EquationDetect : public EquationDetectBase { bool CheckSeedFgDensity(const float density_th, ColPartition* part); // A light version of SplitCPHor: instead of really doing the part split, we - // simply compute the union bounding box of each splitted part. + // simply compute the union bounding box of each split part. void SplitCPHorLite(ColPartition* part, GenericVector* splitted_boxes); - // Split the part (horizontally), and save the splitted result into + // Split the part (horizontally), and save the split result into // parts_splitted. Note that it is caller's responsibility to release the // memory owns by parts_splitted. On the other hand, the part is unchanged // during this process and still owns the blobs, so do NOT call DeleteBoxes @@ -159,7 +159,7 @@ class EquationDetect : public EquationDetectBase { // Identify inline partitions from cp_seeds_, and re-label them. void IdentifyInlineParts(); - // Comute the super bounding box for all colpartitions inside part_grid_. + // Compute the super bounding box for all colpartitions inside part_grid_. void ComputeCPsSuperBBox(); // Identify inline partitions from cp_seeds_ using the horizontal search. @@ -244,7 +244,7 @@ class EquationDetect : public EquationDetectBase { // ColPartition object. void PrintSpecialBlobsDensity(const ColPartition* part) const; - // The tesseract engine intialized from equation training data. + // The tesseract engine initialized from equation training data. Tesseract equ_tesseract_; // The tesseract engine used for OCR. This pointer is passed in by the caller, diff --git a/src/ccmain/fixspace.cpp b/src/ccmain/fixspace.cpp index e07378920..8a60e393e 100644 --- a/src/ccmain/fixspace.cpp +++ b/src/ccmain/fixspace.cpp @@ -226,7 +226,7 @@ void Tesseract::match_current_words(WERD_RES_LIST &words, ROW *row, * The solution is to NOT COUNT the score of any word which has a digit at one * end and a "1Il" as the character the other side of the space. * - * Conversly, any character next to a "1" within a word is counted as a positive + * Conversely, any character next to a "1" within a word is counted as a positive * score. Thus "561 63" would score 4 (3 chars in a numeric word plus 1 side of * the "1" joined). "56163" would score 7 - all chars in a numeric word + 2 * sides of a "1" joined. diff --git a/src/ccmain/paragraphs.cpp b/src/ccmain/paragraphs.cpp index 136c75241..4889e57c5 100644 --- a/src/ccmain/paragraphs.cpp +++ b/src/ccmain/paragraphs.cpp @@ -1641,7 +1641,7 @@ bool FirstWordWouldHaveFit(const RowScratchRegisters &before, // Return whether the first word on the after line can fit in the space at // the end of the before line (not knowing which way the text goes) in a left -// or right alignemnt. +// or right alignment. bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const RowScratchRegisters &after) { if (before.ri_->num_words == 0 || after.ri_->num_words == 0) diff --git a/src/ccmain/superscript.cpp b/src/ccmain/superscript.cpp index 75e12b647..518b21e65 100644 --- a/src/ccmain/superscript.cpp +++ b/src/ccmain/superscript.cpp @@ -91,7 +91,7 @@ void YOutlierPieces(WERD_RES *word, int rebuilt_blob_index, /** * Attempt to split off any high (or low) bits at the ends of the word with poor * certainty and recognize them separately. If the certainty gets much better - * and other sanity checks pass, acccept. + * and other sanity checks pass, accept. * * This superscript fix is meant to be called in the second pass of recognition * when we have tried once and already have a preliminary answer for word. diff --git a/src/ccmain/tessedit.cpp b/src/ccmain/tessedit.cpp index e07be6823..48102fbbf 100644 --- a/src/ccmain/tessedit.cpp +++ b/src/ccmain/tessedit.cpp @@ -112,7 +112,7 @@ bool Tesseract::init_tesseract_lang_data( return false; } if (oem == OEM_DEFAULT) { - // Set the engine mode from availability, which can then be overidden by + // Set the engine mode from availability, which can then be overridden by // the config file when we read it below. if (!mgr->IsLSTMAvailable()) { tessedit_ocr_engine_mode.set_value(OEM_TESSERACT_ONLY); diff --git a/src/ccmain/tesseractclass.cpp b/src/ccmain/tesseractclass.cpp index 60db38615..8bdfa58dc 100644 --- a/src/ccmain/tesseractclass.cpp +++ b/src/ccmain/tesseractclass.cpp @@ -334,7 +334,7 @@ Tesseract::Tesseract() double_MEMBER(fixsp_small_outlines_size, 0.28, "Small if lt xht x this", this->params()), BOOL_MEMBER(tessedit_prefer_joined_punct, false, - "Reward punctation joins", this->params()), + "Reward punctuation joins", this->params()), INT_MEMBER(fixsp_done_mode, 1, "What constitues done for spacing", this->params()), INT_MEMBER(debug_fix_space_level, 0, "Contextual fixspace debug", @@ -621,7 +621,7 @@ void Tesseract::PrepareForPageseg() { sub_langs_[i]->pix_binary_ = pixClone(pix_binary()); } // Perform shiro-rekha (top-line) splitting and replace the current image by - // the newly splitted image. + // the newly split image. splitter_.set_orig_pix(pix_binary()); splitter_.set_pageseg_split_strategy(max_pageseg_strategy); if (splitter_.Split(true, &pixa_debug_)) { diff --git a/src/ccmain/tesseractclass.h b/src/ccmain/tesseractclass.h index c3a14032f..4d1757bc5 100644 --- a/src/ccmain/tesseractclass.h +++ b/src/ccmain/tesseractclass.h @@ -993,7 +993,7 @@ class Tesseract : public Wordrec { INT_VAR_H(fixsp_non_noise_limit, 1, "How many non-noise blbs either side?"); double_VAR_H(fixsp_small_outlines_size, 0.28, "Small if lt xht x this"); - BOOL_VAR_H(tessedit_prefer_joined_punct, false, "Reward punctation joins"); + BOOL_VAR_H(tessedit_prefer_joined_punct, false, "Reward punctuation joins"); INT_VAR_H(fixsp_done_mode, 1, "What constitues done for spacing"); INT_VAR_H(debug_fix_space_level, 0, "Contextual fixspace debug"); STRING_VAR_H(numeric_punctuation, ".,", diff --git a/src/ccstruct/crakedge.h b/src/ccstruct/crakedge.h index 8a7e79b13..d6493dde0 100644 --- a/src/ccstruct/crakedge.h +++ b/src/ccstruct/crakedge.h @@ -1,6 +1,6 @@ /********************************************************************** * File: crakedge.h (Formerly: crkedge.h) - * Description: Sturctures for the Crack following edge detector. + * Description: Structures for the Crack following edge detector. * Author: Ray Smith * Created: Fri Mar 22 16:06:38 GMT 1991 * diff --git a/src/ccstruct/linlsq.cpp b/src/ccstruct/linlsq.cpp index 0dc9b5fb8..bb4f49f86 100644 --- a/src/ccstruct/linlsq.cpp +++ b/src/ccstruct/linlsq.cpp @@ -152,7 +152,7 @@ double LLSQ::rms(double m, double c) const { // get error **********************************************************************/ double LLSQ::pearson() const { // get correlation - double r = 0.0; // Correlation is 0 if insufficent data. + double r = 0.0; // Correlation is 0 if insufficient data. double covar = covariance(); if (covar != 0.0) { diff --git a/src/ccstruct/matrix.h b/src/ccstruct/matrix.h index 4fd4339cd..2257f7d0e 100644 --- a/src/ccstruct/matrix.h +++ b/src/ccstruct/matrix.h @@ -5,7 +5,7 @@ * Author: Ray Smith * TODO(rays) Separate from ratings matrix, which it also contains: * - * Descrition: Ratings matrix class (specialization of banded matrix). + * Description: Ratings matrix class (specialization of banded matrix). * Segmentation search matrix of lists of BLOB_CHOICE. * Author: Mark Seaman, OCR Technology * Created: Wed May 16 13:22:06 1990 diff --git a/src/ccutil/elst.h b/src/ccutil/elst.h index 05846a265..15531cfb9 100644 --- a/src/ccutil/elst.h +++ b/src/ccutil/elst.h @@ -67,7 +67,7 @@ The implementation of lists is very careful about space and speed overheads. This is why many embedded lists are provided. The same concerns mean that in-line type coercion is done, rather than use virtual functions. This is cumbersome in that each data type to be listed requires its own iterator and -list class - though macros can gererate these. It also prevents heterogeneous +list class - though macros can generate these. It also prevents heterogeneous lists. **********************************************************************/ diff --git a/src/ccutil/genericvector.h b/src/ccutil/genericvector.h index c7c574386..73e5f6099 100644 --- a/src/ccutil/genericvector.h +++ b/src/ccutil/genericvector.h @@ -343,7 +343,7 @@ class GenericVector { // Init the object, allocating size memory. void init(int size); - // We are assuming that the object generally placed in thie + // We are assuming that the object generally placed in the // vector are small enough that for efficiency it makes sense // to start with a larger initial size. static const int kDefaultVectorSize = 4; diff --git a/src/ccutil/qrsequence.h b/src/ccutil/qrsequence.h index e6fd9674c..991004a0d 100644 --- a/src/ccutil/qrsequence.h +++ b/src/ccutil/qrsequence.h @@ -31,7 +31,7 @@ class QRSequenceGenerator { public: - // Object is initalized with the size of the output range. + // Object is initialized with the size of the output range. explicit QRSequenceGenerator(int N) : N_(N), next_num_(0) { num_bits_ = static_cast(ceil(log(static_cast(N)) / log(2.0))); } diff --git a/src/ccutil/unicharcompress.h b/src/ccutil/unicharcompress.h index bcf7bbea9..003c5153a 100644 --- a/src/ccutil/unicharcompress.h +++ b/src/ccutil/unicharcompress.h @@ -113,7 +113,7 @@ class RecodedCharID { // 2 (Indic): Instead of thousands of codes with one for each grapheme, re-code // as the unicode sequence (but coded in a more compact space). // 3 (the rest): Eliminate multi-path problems with ligatures and fold confusing -// and not significantly distinct shapes (quotes) togther, ie +// and not significantly distinct shapes (quotes) together, ie // represent the fi ligature as the f-i pair, and fold u+2019 and // friends all onto ascii single ' // 4 The null character and mapping to target activations: diff --git a/src/ccutil/unicharset.cpp b/src/ccutil/unicharset.cpp index d651ad6cd..875c56670 100644 --- a/src/ccutil/unicharset.cpp +++ b/src/ccutil/unicharset.cpp @@ -138,7 +138,7 @@ void UNICHARSET::UNICHAR_PROPERTIES::SetRangesEmpty() { } // Returns true if any of the top/bottom/width/bearing/advance ranges/stats -// is emtpy. +// is empty. bool UNICHARSET::UNICHAR_PROPERTIES::AnyRangeEmpty() const { return width == 0.0f || advance == 0.0f; } diff --git a/src/ccutil/unicharset.h b/src/ccutil/unicharset.h index 6ff00a170..f04b10f87 100644 --- a/src/ccutil/unicharset.h +++ b/src/ccutil/unicharset.h @@ -913,7 +913,7 @@ class UNICHARSET { // Sets all ranges to empty. Used before expanding with font-based data. void SetRangesEmpty(); // Returns true if any of the top/bottom/width/bearing/advance ranges/stats - // is emtpy. + // is empty. bool AnyRangeEmpty() const; // Expands the ranges with the ranges from the src properties. void ExpandRangesFrom(const UNICHAR_PROPERTIES& src); diff --git a/src/classify/cluster.cpp b/src/classify/cluster.cpp index 4b2567b71..a23968edd 100644 --- a/src/classify/cluster.cpp +++ b/src/classify/cluster.cpp @@ -2437,7 +2437,7 @@ FLOAT64 ChiArea(CHISTRUCT *ChiParams, FLOAT64 x) { /** * This routine looks at all samples in the specified cluster. * It computes a running estimate of the percentage of the - * charaters which have more than 1 sample in the cluster. + * characters which have more than 1 sample in the cluster. * When this percentage exceeds MaxIllegal, TRUE is returned. * Otherwise FALSE is returned. The CharID * fields must contain integers which identify the training diff --git a/src/classify/intmatcher.cpp b/src/classify/intmatcher.cpp index 66933bba1..a39adc2f4 100644 --- a/src/classify/intmatcher.cpp +++ b/src/classify/intmatcher.cpp @@ -718,7 +718,7 @@ void ScratchEvidence::ClearFeatureEvidence(const INT_CLASS class_template) { } /** - * Print debugging information for Configuations + * Print debugging information for Configurations * @return none * @note Exceptions: none * @note History: Wed Feb 27 14:12:28 MST 1991, RWM, Created. @@ -741,7 +741,7 @@ void IMDebugConfiguration(int FeatureNum, } /** - * Print debugging information for Configuations + * Print debugging information for Configurations * @return none * @note Exceptions: none * @note History: Wed Feb 27 14:12:28 MST 1991, RWM, Created. @@ -914,7 +914,7 @@ int IntegerMatcher::UpdateTablesForFeature( } /** - * Print debugging information for Configuations + * Print debugging information for Configurations * @return none * @note Exceptions: none * @note History: Wed Feb 27 14:12:28 MST 1991, RWM, Created. diff --git a/src/cutil/cutil.cpp b/src/cutil/cutil.cpp index 8a1f11620..6390eb4c0 100644 --- a/src/cutil/cutil.cpp +++ b/src/cutil/cutil.cpp @@ -50,7 +50,7 @@ Import original HP distribution * long_rand * * Return a long random number whose value is less than limit. Do this - * by calling the standard cheepo random number generator and reseting + * by calling the standard cheepo random number generator and resetting * it pretty often. **********************************************************************/ long long_rand(long limit) { diff --git a/src/cutil/oldlist.h b/src/cutil/oldlist.h index 2aa7a7b84..97ae66c27 100644 --- a/src/cutil/oldlist.h +++ b/src/cutil/oldlist.h @@ -65,7 +65,7 @@ * sort - Use quick sort to construct a new list. * transform - Creates a new list by transforming each of the nodes. * - * TRANFORMS: (Note: These functions all modify the input list.) + * TRANSFORMS: (Note: These functions all modify the input list.) * ---------- * join - Concatenates list 1 and list 2. * delete_d - Removes the requested elements from the list. diff --git a/src/dict/dawg.h b/src/dict/dawg.h index dd6ad49aa..9c4c09d23 100644 --- a/src/dict/dawg.h +++ b/src/dict/dawg.h @@ -285,7 +285,7 @@ class Dawg { void init(int unicharset_size); /// Matches all of the words that are represented by this string. - /// If wilcard is set to something other than INVALID_UNICHAR_ID, + /// If wildcard is set to something other than INVALID_UNICHAR_ID, /// the *'s in this string are interpreted as wildcards. /// WERD_CHOICE param is not passed by const so that wildcard searches /// can modify it and work without having to copy WERD_CHOICEs. diff --git a/src/dict/dict.cpp b/src/dict/dict.cpp index 9f59ed6d5..8a6b796e4 100644 --- a/src/dict/dict.cpp +++ b/src/dict/dict.cpp @@ -688,7 +688,7 @@ void Dict::adjust_word(WERD_CHOICE *word, // leave the factor alone - all good! break; } - // TODO(eger): if nonword is true, but there is a "core" thats' a dict + // TODO(eger): if nonword is true, but there is a "core" that is a dict // word, negate nonword status. } else { if (debug) { @@ -753,7 +753,7 @@ int Dict::valid_word(const WERD_CHOICE &word, bool numbers_ok) const { init_active_dawgs(&(active_dawgs[0]), false); DawgArgs dawg_args(&(active_dawgs[0]), &(active_dawgs[1]), NO_PERM); int last_index = word_ptr->length() - 1; - // Call leter_is_okay for each letter in the word. + // Call letter_is_okay for each letter in the word. for (int i = hyphen_base_size(); i <= last_index; ++i) { if (!((this->*letter_is_okay_)(&dawg_args, word_ptr->unichar_id(i), i == last_index))) break; diff --git a/src/dict/dict.h b/src/dict/dict.h index 35cad5bb2..4e1155d4c 100644 --- a/src/dict/dict.h +++ b/src/dict/dict.h @@ -340,7 +340,7 @@ class Dict { * For word_index > 0 the corresponding state (active_dawgs and punc position) * can be obtained from dawg_args->updated_dawgs passed to * def_letter_is_okay for word_index-1. - * Note: the function assumes that active_dawgs, nd updated_dawgs + * Note: the function assumes that active_dawgs, and updated_dawgs * member variables of dawg_args are not nullptr. * * Output: @@ -532,7 +532,7 @@ class Dict { Trie *pending_words_; /// The following pointers are only cached for convenience. /// The dawgs will be deleted when dawgs_ vector is destroyed. - // bigram_dawg_ points to a dawg of two-word bigrams which always supercede if + // bigram_dawg_ points to a dawg of two-word bigrams which always supersede if // any of them are present on the best choices list for a word pair. // the bigrams are stored as space-separated words where: // (1) leading and trailing punctuation has been removed from each word and diff --git a/src/dict/stopper.cpp b/src/dict/stopper.cpp index fa83b6d32..ea557218e 100644 --- a/src/dict/stopper.cpp +++ b/src/dict/stopper.cpp @@ -178,7 +178,7 @@ bool Dict::NoDangerousAmbig(WERD_CHOICE *best_choice, getUnicharAmbigs().replace_ambigs() : getUnicharAmbigs().dang_ambigs(); if (!replace) { // Initialize ambig_blob_choices with lists containing a single - // unichar id for the correspoding position in best_choice. + // unichar id for the corresponding position in best_choice. // best_choice consisting from only the original letters will // have a rating of 0.0. for (i = 0; i < best_choice->length(); ++i) { diff --git a/src/dict/trie.h b/src/dict/trie.h index 6ae151fae..2d4a5989c 100644 --- a/src/dict/trie.h +++ b/src/dict/trie.h @@ -402,7 +402,7 @@ class Trie : public Dawg { NODE_MARKER reduced_nodes); /** - * Order num_edges of consequtive EDGE_RECORDS in the given EDGE_VECTOR in + * Order num_edges of consecutive EDGE_RECORDS in the given EDGE_VECTOR in * increasing order of unichar ids. This function is normally called * for all edges in a single node, and since number of edges in each node * is usually quite small, selection sort is used. diff --git a/src/opencl/openclwrapper.cpp b/src/opencl/openclwrapper.cpp index aa211e3fa..ed74d09e5 100644 --- a/src/opencl/openclwrapper.cpp +++ b/src/opencl/openclwrapper.cpp @@ -998,7 +998,7 @@ int OpenclDevice::GeneratBinFromKernelSource( cl_program program, const char * c } } - // Release all resouces and memory + // Release all resources and memory for ( i = 0; i < numDevices; i++ ) { free(binaries[i]); diff --git a/src/opencl/openclwrapper.h b/src/opencl/openclwrapper.h index 6d03008e5..4d2d52dc1 100644 --- a/src/opencl/openclwrapper.h +++ b/src/opencl/openclwrapper.h @@ -241,7 +241,7 @@ public: /* OpenCL implementations of Morphological operations*/ - //Initialiation of OCL buffers used in Morph operations + //Initialization of OCL buffers used in Morph operations static int initMorphCLAllocations(l_int32 wpl, l_int32 h, Pix *pixs); static void releaseMorphCLBuffers(); diff --git a/src/textord/alignedblob.cpp b/src/textord/alignedblob.cpp index 494758dad..b177c7c33 100644 --- a/src/textord/alignedblob.cpp +++ b/src/textord/alignedblob.cpp @@ -239,7 +239,7 @@ TabVector* AlignedBlob::FindVerticalAlignment(AlignedBlobParams align_params, box = it.data()->bounding_box(); int start_x = align_params.right_tab ? box.right() : box.left(); int start_y = box.bottom(); - // Acceptable tab vectors must have a mininum number of points, + // Acceptable tab vectors must have a minimum number of points, // have a minimum acceptable length, and have a minimum gradient. // The gradient corresponds to the skew angle. // Ragged tabs don't need to satisfy the gradient condition, as they diff --git a/src/textord/cjkpitch.cpp b/src/textord/cjkpitch.cpp index e713191d8..2b948e87e 100644 --- a/src/textord/cjkpitch.cpp +++ b/src/textord/cjkpitch.cpp @@ -306,7 +306,7 @@ class FPRow { // merged with others any more. void FinalizeLargeChars(); - // Ouput pitch estimation results to attributes of TD_ROW. + // Output pitch estimation results to attributes of TD_ROW. void OutputEstimations(); void DebugOutputResult(int row_index); @@ -528,7 +528,7 @@ void FPRow::OutputEstimations() { if (good_pitches_.size() < all_pitches_.size() * kFixedPitchThreshold) { // If more than half of the characters of a line don't fit to the - // fixed pitch model, consider the line to be propotional. 50% + // fixed pitch model, consider the line to be proportional. 50% // seems to be a good threshold in practice as well. // Anyway we store estimated values (fixed_pitch, kern_size, etc.) in // real_row_ as a partial estimation result and try to use them in the diff --git a/src/textord/cjkpitch.h b/src/textord/cjkpitch.h index 601ec2137..ea4fe2b46 100644 --- a/src/textord/cjkpitch.h +++ b/src/textord/cjkpitch.h @@ -57,7 +57,7 @@ // the final decision about fixed-pitchness of each row and compute // pitch and spacing parameters. // -// (If a row is considered to be propotional, pitch_decision for the +// (If a row is considered to be proportional, pitch_decision for the // row is set to PITCH_CORR_PROP and the later phase // (i.e. Textord::to_spacing()) should determine its spacing // parameters) diff --git a/src/textord/colpartition.cpp b/src/textord/colpartition.cpp index 587d8aa7f..b86f4fba3 100644 --- a/src/textord/colpartition.cpp +++ b/src/textord/colpartition.cpp @@ -647,7 +647,7 @@ ColPartition* ColPartition::SingletonPartner(bool upper) { // Merge with the other partition and delete it. void ColPartition::Absorb(ColPartition* other, WidthCallback* cb) { // The result has to either own all of the blobs or none of them. - // Verify the flag is consisent. + // Verify the flag is consistent. ASSERT_HOST(owns_blobs() == other->owns_blobs()); // TODO(nbeato): check owns_blobs better. Right now owns_blobs // should always be true when this is called. So there is no issues. diff --git a/src/textord/colpartitionset.h b/src/textord/colpartitionset.h index ccf3dc277..51b430eec 100644 --- a/src/textord/colpartitionset.h +++ b/src/textord/colpartitionset.h @@ -101,7 +101,7 @@ class ColPartitionSet : public ELIST_LINK { // by the given coords(left,right,y), with the given margins. // Also return the first and last column index touched by the coords and // the leftmost spanned column. - // Column indices are 2n + 1 for real colums (0 based) and even values + // Column indices are 2n + 1 for real columns (0 based) and even values // represent the gaps in between columns, with 0 being left of the leftmost. // resolution refers to the ppi resolution of the image. It may be 0 if only // the first_col and last_col are required. diff --git a/src/textord/devanagari_processing.cpp b/src/textord/devanagari_processing.cpp index 7b2c72245..cc0b17d3f 100644 --- a/src/textord/devanagari_processing.cpp +++ b/src/textord/devanagari_processing.cpp @@ -307,7 +307,7 @@ void ShiroRekhaSplitter::SplitWordShiroRekha(SplitStrategy split_strategy, vert_hist.hist()[i] = 1; } // In order to split the line at any point, we make sure that the width of the - // gap is atleast half the stroke width. + // gap is at least half the stroke width. int i = 0; int cur_component_width = 0; while (i < width) { diff --git a/src/textord/fpchop.cpp b/src/textord/fpchop.cpp index 25999f43a..943d5d168 100644 --- a/src/textord/fpchop.cpp +++ b/src/textord/fpchop.cpp @@ -279,7 +279,7 @@ void fixed_chop_cblob( //split the blob ) { C_OUTLINE *old_right; //already there C_OUTLINE_LIST new_outlines; //new right ones - //ouput iterator + //output iterator C_OUTLINE_IT left_it = left_outlines; //in/out iterator C_OUTLINE_IT right_it = right_outlines; diff --git a/src/textord/gap_map.h b/src/textord/gap_map.h index 4a04edcf0..3582cdd57 100644 --- a/src/textord/gap_map.h +++ b/src/textord/gap_map.h @@ -33,7 +33,7 @@ class GAPMAP int16_t max_right; //Right extreme int16_t bucket_size; // half an x ht int16_t *map; //empty counts - int16_t map_max; //map[0..max_map] defind + int16_t map_max; //map[0..max_map] defined bool any_tabs; }; diff --git a/src/textord/imagefind.cpp b/src/textord/imagefind.cpp index c60f1b0e7..142d88feb 100644 --- a/src/textord/imagefind.cpp +++ b/src/textord/imagefind.cpp @@ -1239,7 +1239,7 @@ static void MarkAndDeleteImageParts(const FCOORD& rerotate, // Locates all the image partitions in the part_grid, that were found by a // previous call to FindImagePartitions, marks them in the image_mask, -// removes them from the grid, and deletes them. This makes it possble to +// removes them from the grid, and deletes them. This makes it possible to // call FindImagePartitions again to produce less broken-up and less // overlapping image partitions. // rerotation specifies how to rotate the partition coords to match diff --git a/src/textord/imagefind.h b/src/textord/imagefind.h index 5732a5405..36825d5e9 100644 --- a/src/textord/imagefind.h +++ b/src/textord/imagefind.h @@ -128,7 +128,7 @@ class ImageFind { // Locates all the image partitions in the part_grid, that were found by a // previous call to FindImagePartitions, marks them in the image_mask, - // removes them from the grid, and deletes them. This makes it possble to + // removes them from the grid, and deletes them. This makes it possible to // call FindImagePartitions again to produce less broken-up and less // overlapping image partitions. // rerotation specifies how to rotate the partition coords to match diff --git a/src/textord/linefind.cpp b/src/textord/linefind.cpp index 7370bb9e0..be5768dff 100644 --- a/src/textord/linefind.cpp +++ b/src/textord/linefind.cpp @@ -708,7 +708,7 @@ void LineFinder::GetLineMasks(int resolution, Pix* src_pix, } // Returns a list of boxes corresponding to the candidate line segments. Sets -// the line_crossings member of the boxes so we can later determin the number +// the line_crossings member of the boxes so we can later determine the number // of intersections touched by a full line. void LineFinder::GetLineBoxes(bool horizontal_lines, Pix* pix_lines, Pix* pix_intersections, diff --git a/src/textord/linefind.h b/src/textord/linefind.h index 264850f34..6b0b212ab 100644 --- a/src/textord/linefind.h +++ b/src/textord/linefind.h @@ -136,7 +136,7 @@ class LineFinder { Pixa* pixa_display); // Returns a list of boxes corresponding to the candidate line segments. Sets - // the line_crossings member of the boxes so we can later determin the number + // the line_crossings member of the boxes so we can later determine the number // of intersections touched by a full line. static void GetLineBoxes(bool horizontal_lines, Pix* pix_lines, Pix* pix_intersections, diff --git a/src/textord/oldbasel.cpp b/src/textord/oldbasel.cpp index b55b3681a..2fa087ea1 100644 --- a/src/textord/oldbasel.cpp +++ b/src/textord/oldbasel.cpp @@ -443,7 +443,7 @@ void Textord::find_textlines(TO_BLOCK *block, // block row is in int get_blob_coords( //get boxes TO_ROW* row, //row to use int32_t lineheight, //block level - TBOX* blobcoords, //ouput boxes + TBOX* blobcoords, //output boxes bool& holed_line, //lost a lot of blobs int& outcount //no of real blobs ) { @@ -1186,7 +1186,7 @@ int xstarts[] //result bool split_stepped_spline( //make xstarts QSPLINE* baseline, //current shot - float jumplimit, //max step fuction + float jumplimit, //max step function int* xcoords, /*points to work on */ int* xstarts, //result int& segments //no of segments diff --git a/src/textord/oldbasel.h b/src/textord/oldbasel.h index 74117777e..ae583a1dd 100644 --- a/src/textord/oldbasel.h +++ b/src/textord/oldbasel.h @@ -44,7 +44,7 @@ extern double_VAR_H (textord_oldbl_jumplimit, 0.15, int get_blob_coords( //get boxes TO_ROW* row, //row to use int32_t lineheight, //block level - TBOX* blobcoords, //ouput boxes + TBOX* blobcoords, //output boxes bool& holed_line, //lost a lot of blobs int& outcount //no of real blobs ); @@ -115,7 +115,7 @@ int xstarts[] //result ); bool split_stepped_spline( //make xstarts QSPLINE* baseline, //current shot - float jumplimit, //max step fuction + float jumplimit, //max step function int* xcoords, /*points to work on */ int* xstarts, //result int& segments //no of segments diff --git a/src/textord/sortflts.cpp b/src/textord/sortflts.cpp index 7a8c5fe8c..07ed684ad 100644 --- a/src/textord/sortflts.cpp +++ b/src/textord/sortflts.cpp @@ -23,7 +23,7 @@ ELISTIZE (SORTED_FLOAT) /** * @name SORTED_FLOATS::add * - * Add a new entry to the sorted lsit of floats. + * Add a new entry to the sorted list of floats. */ void SORTED_FLOATS::add( //add new entry float value, @@ -47,7 +47,7 @@ void SORTED_FLOATS::add( //add new entry /** * @name SORTED_FLOATS::remove * - * Remove an entry from the sorted lsit of floats. + * Remove an entry from the sorted list of floats. */ void SORTED_FLOATS::remove( //remove the entry diff --git a/src/textord/strokewidth.cpp b/src/textord/strokewidth.cpp index 0080d053e..6992a5876 100644 --- a/src/textord/strokewidth.cpp +++ b/src/textord/strokewidth.cpp @@ -559,7 +559,7 @@ void StrokeWidth::MarkLeaderNeighbours(const ColPartition* part, } } -// Helper to compute the UQ of the square-ish CJK charcters. +// Helper to compute the UQ of the square-ish CJK characters. static int UpperQuartileCJKSize(int gridsize, BLOBNBOX_LIST* blobs) { STATS sizes(0, gridsize * kMaxCJKSizeRatio); BLOBNBOX_IT it(blobs); diff --git a/src/textord/tablefind.cpp b/src/textord/tablefind.cpp index 37a91c0c3..ba5d0a4fa 100644 --- a/src/textord/tablefind.cpp +++ b/src/textord/tablefind.cpp @@ -551,7 +551,7 @@ void TableFinder::GroupColumnBlocks(ColSegment_LIST* new_blocks, TBOX dest_box = dest_seg->bounding_box(); if (ConsecutiveBoxes(src_box, dest_box)) { // If matching block is found, insert the current block into it - // and delete the soure block + // and delete the source block. dest_seg->InsertBox(src_box); match_found = true; delete src_it.extract(); diff --git a/src/textord/topitch.cpp b/src/textord/topitch.cpp index af264679e..9dc8ba8f9 100644 --- a/src/textord/topitch.cpp +++ b/src/textord/topitch.cpp @@ -841,7 +841,7 @@ bool find_row_pitch( //find lines int32_t row_index, //number of row bool testing_on //correct orientation ) { - bool used_dm_model; //looks lik dot matrix + bool used_dm_model; //looks like dot matrix float min_space; //estimate threshold float non_space; //gap size float gap_iqr; //interquartile range diff --git a/src/textord/tordmain.cpp b/src/textord/tordmain.cpp index 7fd428a38..cbd30db9e 100644 --- a/src/textord/tordmain.cpp +++ b/src/textord/tordmain.cpp @@ -123,7 +123,7 @@ void SetBlobStrokeWidth(Pix* pix, BLOBNBOX* blob) { // Store the horizontal and vertical width in the blob, keeping both // widths if there is enough information, otherwse only the one with // the most samples. - // If there are insufficent samples, store zero, rather than using + // If there are insufficient samples, store zero, rather than using // 2*area/perimeter, as the numbers that gives do not match the numbers // from the distance method. if (h_stats.get_total() >= (width + height) / 4) { diff --git a/src/textord/tospace.cpp b/src/textord/tospace.cpp index 01c6663e3..6b2f2a498 100644 --- a/src/textord/tospace.cpp +++ b/src/textord/tospace.cpp @@ -1330,7 +1330,7 @@ bool Textord::make_a_word_break( //Default as old TO space = current_gap > row->space_threshold; - /* Set defaults for the word break incase we find one. Currently there are + /* Set defaults for the word break in case we find one. Currently there are no fuzzy spaces. Depending on the reliability of the different heuristics we may need to set PARTICULAR spaces to fuzzy or not. The values will ONLY be used if the function returns TRUE - ie the word is to be broken. diff --git a/src/training/language-specific.sh b/src/training/language-specific.sh index c0c326d83..0f8fa6ed0 100644 --- a/src/training/language-specific.sh +++ b/src/training/language-specific.sh @@ -1005,7 +1005,7 @@ set_lang_specific_parameters() { test -z "$FONTS" && FONTS=( "${RUSSIAN_FONTS[@]}" ) ;; # Special code for performing Cyrillic language-id that is trained on - # Russian, Serbian, Ukranian, Belarusian, Macedonian, Tajik and Mongolian + # Russian, Serbian, Ukrainian, Belarusian, Macedonian, Tajik and Mongolian # text with the list of Russian fonts. cyr_lid ) TEXT_CORPUS=${FLAGS_webtext_prefix}/cyr_lid.corpus.txt diff --git a/src/training/pango_font_info.cpp b/src/training/pango_font_info.cpp index 4f92b7202..20a361a39 100644 --- a/src/training/pango_font_info.cpp +++ b/src/training/pango_font_info.cpp @@ -364,7 +364,7 @@ bool PangoFontInfo::CanRenderString(const char* utf8_word, int len, pango_context_set_font_map(context, font_map); PangoLayout* layout; { - // Pango is not relasing the cached layout. + // Pango is not releasing the cached layout. DISABLE_HEAP_LEAK_CHECK; layout = pango_layout_new(context); } diff --git a/src/viewer/svpaint.cpp b/src/viewer/svpaint.cpp index 53e7ab3be..5ae6ea841 100644 --- a/src/viewer/svpaint.cpp +++ b/src/viewer/svpaint.cpp @@ -226,7 +226,7 @@ SVPaint::SVPaint(const char *server_name) { } // If a parameter is given, we try to connect to the given server. -// This enables us to test the remote capabilites of ScrollView. +// This enables us to test the remote capabilities of ScrollView. int main(int argc, char** argv) { const char* server_name; if (argc > 1) { server_name = argv[1]; } else { server_name = "localhost"; } diff --git a/src/wordrec/chop.cpp b/src/wordrec/chop.cpp index f7f6a8fbe..5ff113eeb 100644 --- a/src/wordrec/chop.cpp +++ b/src/wordrec/chop.cpp @@ -59,7 +59,7 @@ PRIORITY Wordrec::point_priority(EDGEPT *point) { /** * @name add_point_to_list * - * Add an edge point to a POINT_GROUP containg a list of other points. + * Add an edge point to a POINT_GROUP containing a list of other points. */ void Wordrec::add_point_to_list(PointHeap* point_heap, EDGEPT *point) { if (point_heap->size() < MAX_NUM_POINTS - 2) { diff --git a/src/wordrec/findseam.cpp b/src/wordrec/findseam.cpp index a86f8432a..97df547b7 100644 --- a/src/wordrec/findseam.cpp +++ b/src/wordrec/findseam.cpp @@ -46,7 +46,7 @@ /* How many to keep */ #define MAX_OLD_SEAMS 150 #define NO_FULL_PRIORITY -1/* Special marker for pri. */ - /* Evalute right away */ + /* Evaluate right away */ #define BAD_PRIORITY 9999.0 /*---------------------------------------------------------------------- diff --git a/src/wordrec/tface.cpp b/src/wordrec/tface.cpp index 5b2083def..9576c02e5 100644 --- a/src/wordrec/tface.cpp +++ b/src/wordrec/tface.cpp @@ -72,7 +72,7 @@ int Wordrec::end_recog() { /** * @name program_editdown * - * This function holds any nessessary post processing for the Wise Owl + * This function holds any necessary post processing for the Wise Owl * program. */ void Wordrec::program_editdown(int32_t elasped_time) {