diff --git a/cube/beam_search.cpp b/cube/beam_search.cpp index a89b15d8a9..fd17a1d59f 100644 --- a/cube/beam_search.cpp +++ b/cube/beam_search.cpp @@ -93,7 +93,7 @@ void BeamSearch::CreateChildren(SearchColumn *out_col, LangModel *lang_mod, } // lm_edges } -// Performs a beam seach in the specified search using the specified +// Performs a beam search in the specified search using the specified // language model; returns an alternate list of possible words as a result. WordAltList * BeamSearch::Search(SearchObject *srch_obj, LangModel *lang_mod) { // verifications diff --git a/cube/beam_search.h b/cube/beam_search.h index a39f5b1349..cd8fc0110d 100644 --- a/cube/beam_search.h +++ b/cube/beam_search.h @@ -45,7 +45,7 @@ class BeamSearch { public: explicit BeamSearch(CubeRecoContext *cntxt, bool word_mode = true); ~BeamSearch(); - // Performs a beam seach in the specified search using the specified + // Performs a beam search in the specified search using the specified // language model; returns an alternate list of possible words as a result. WordAltList *Search(SearchObject *srch_obj, LangModel *lang_mod = NULL); // Returns the best node in the last column of last performed search. diff --git a/cube/conv_net_classifier.cpp b/cube/conv_net_classifier.cpp index d6ae692e7b..ac33cd33b1 100644 --- a/cube/conv_net_classifier.cpp +++ b/cube/conv_net_classifier.cpp @@ -72,7 +72,7 @@ bool ConvNetCharClassifier::Train(CharSamp *char_samp, int ClassID) { /** * A secondary function needed for training. Allows the trainer to set the - * value of any train-time paramter. This function is currently not + * value of any train-time parameter. This function is currently not * implemented. TODO(ahmadab): implement end-2-end training */ bool ConvNetCharClassifier::SetLearnParam(char *var_name, float val) { diff --git a/cube/conv_net_classifier.h b/cube/conv_net_classifier.h index e9bcd8c2cc..b9e7692c28 100644 --- a/cube/conv_net_classifier.h +++ b/cube/conv_net_classifier.h @@ -55,7 +55,7 @@ class ConvNetCharClassifier : public CharClassifier { // is currently not implemented. TODO(ahmadab): implement end-2-end training virtual bool Train(CharSamp *char_samp, int ClassID); // A secondary function needed for training. Allows the trainer to set the - // value of any train-time paramter. This function is currently not + // value of any train-time parameter. This function is currently not // implemented. TODO(ahmadab): implement end-2-end training virtual bool SetLearnParam(char *var_name, float val); // Externally sets the Neural Net used by the classifier. Used for training diff --git a/cube/cube_line_object.cpp b/cube/cube_line_object.cpp index 64b90cadff..0325453740 100644 --- a/cube/cube_line_object.cpp +++ b/cube/cube_line_object.cpp @@ -247,7 +247,7 @@ int CubeLineObject::ComputeWordBreakThreshold(int con_comp_cnt, word_break_threshold--; } while (!valid && word_break_threshold > 0); - // failed to find a threshold that acheives the target aspect ratio. + // failed to find a threshold that achieves the target aspect ratio. // Just use the default threshold return static_cast(line_pix_->h * cntxt_->Params()->MaxSpaceHeightRatio()); diff --git a/cube/cube_line_segmenter.cpp b/cube/cube_line_segmenter.cpp index 82f8c8ede4..278011f090 100644 --- a/cube/cube_line_segmenter.cpp +++ b/cube/cube_line_segmenter.cpp @@ -237,7 +237,7 @@ Pixa *CubeLineSegmenter::CrackLine(Pix *cracked_line_pix, return NULL; } -// split a line continously until valid or fail +// split a line continuously until valid or fail Pixa *CubeLineSegmenter::SplitLine(Pix *line_mask_pix, Box *line_box) { // clone the line mask Pix *line_pix = pixClone(line_mask_pix); @@ -739,7 +739,7 @@ bool CubeLineSegmenter::LineSegment() { return true; } -// Estimate the paramters of the font(s) used in the page +// Estimate the parameters of the font(s) used in the page bool CubeLineSegmenter::EstimateFontParams() { int hgt_hist[kHgtBins]; int max_hgt; diff --git a/cube/cube_search_object.cpp b/cube/cube_search_object.cpp index 0cf54e31a9..61294f26b6 100644 --- a/cube/cube_search_object.cpp +++ b/cube/cube_search_object.cpp @@ -212,7 +212,7 @@ CharSamp *CubeSearchObject::CharSample(int start_pt, int end_pt) { samp->SetLastChar(last_char ? 255 : 0); } else { // for non cursive languages, these features correspond - // to whether the charsamp is at the begining or end of the word + // to whether the charsamp is at the beginning or end of the word samp->SetFirstChar((start_pt == -1) ? 255 : 0); samp->SetLastChar((end_pt == (segment_cnt_ - 1)) ? 255 : 0); } diff --git a/cube/cube_search_object.h b/cube/cube_search_object.h index 8452417a69..0a6c3ce20b 100644 --- a/cube/cube_search_object.h +++ b/cube/cube_search_object.h @@ -114,7 +114,7 @@ class CubeSearchObject : public SearchObject { end_pt <= (start_pt + max_seg_per_char_)); } // computes the space and no space costs at gaps between segments - // return true on sucess + // return true on success bool ComputeSpaceCosts(); }; } diff --git a/cube/hybrid_neural_net_classifier.cpp b/cube/hybrid_neural_net_classifier.cpp index b5822f6f22..671a74acdf 100644 --- a/cube/hybrid_neural_net_classifier.cpp +++ b/cube/hybrid_neural_net_classifier.cpp @@ -72,7 +72,7 @@ bool HybridNeuralNetCharClassifier::Train(CharSamp *char_samp, int ClassID) { } // A secondary function needed for training. Allows the trainer to set the -// value of any train-time paramter. This function is currently not +// value of any train-time parameter. This function is currently not // implemented. TODO(ahmadab): implement end-2-end training bool HybridNeuralNetCharClassifier::SetLearnParam(char *var_name, float val) { // TODO(ahmadab): implementation of parameter initializing. @@ -151,7 +151,7 @@ bool HybridNeuralNetCharClassifier::RunNets(CharSamp *char_samp) { return false; } - // go thru all the nets + // go through all the nets memset(net_output_, 0, class_cnt * sizeof(*net_output_)); float *inputs = net_input_; for (int net_idx = 0; net_idx < nets_.size(); net_idx++) { diff --git a/cube/hybrid_neural_net_classifier.h b/cube/hybrid_neural_net_classifier.h index 0ab9ba1235..6ad6233f43 100644 --- a/cube/hybrid_neural_net_classifier.h +++ b/cube/hybrid_neural_net_classifier.h @@ -48,7 +48,7 @@ class HybridNeuralNetCharClassifier : public CharClassifier { // is currently not implemented. TODO(ahmadab): implement end-2-end training virtual bool Train(CharSamp *char_samp, int ClassID); // A secondary function needed for training. Allows the trainer to set the - // value of any train-time paramter. This function is currently not + // value of any train-time parameter. This function is currently not // implemented. TODO(ahmadab): implement end-2-end training virtual bool SetLearnParam(char *var_name, float val); // Externally sets the Neural Net used by the classifier. Used for training diff --git a/cube/tess_lang_model.cpp b/cube/tess_lang_model.cpp index 8b4ff68ee4..5113207260 100644 --- a/cube/tess_lang_model.cpp +++ b/cube/tess_lang_model.cpp @@ -397,7 +397,7 @@ int TessLangModel::NumberEdges(EDGE_REF edge_ref, LangModEdge **edge_array) { return 0; } - // go thru all valid transitions from the state + // go through all valid transitions from the state int edge_cnt = 0; EDGE_REF new_edge_ref;