Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cube: Fix typos in comments
All of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Sep 14, 2015
1 parent 55fde61 commit 5378679
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cube/beam_search.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cube/beam_search.h
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cube/conv_net_classifier.cpp
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion cube/conv_net_classifier.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cube/cube_line_object.cpp
Expand Up @@ -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<int>(line_pix_->h *
cntxt_->Params()->MaxSpaceHeightRatio());
Expand Down
4 changes: 2 additions & 2 deletions cube/cube_line_segmenter.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion cube/cube_search_object.cpp
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion cube/cube_search_object.h
Expand Up @@ -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();
};
}
Expand Down
4 changes: 2 additions & 2 deletions cube/hybrid_neural_net_classifier.cpp
Expand Up @@ -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.
Expand Down Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion cube/hybrid_neural_net_classifier.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cube/tess_lang_model.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 5378679

Please sign in to comment.