Skip to content

Commit

Permalink
Replace 'can not' by 'cannot'
Browse files Browse the repository at this point in the history
Both forms are used in American English, but 'cannot' is more common
(also in Tesseract code), so use it always.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Feb 8, 2023
1 parent 7becbbd commit 1e04be8
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ if DISABLED_LEGACY_ENGINE
training_CPPFLAGS += -DDISABLED_LEGACY_ENGINE
endif

# TODO: training programs can not be linked to shared library created
# TODO: training programs cannot be linked to shared library created
# with -fvisibility
if VISIBILITY
AM_LDFLAGS += -all-static
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ AM_COND_IF([ENABLE_TRAINING],
echo "$ sudo make training-install"
echo ""],
[
echo "You can not build training tools because of missing dependency."
echo "You cannot build training tools because of missing dependency."
echo "Check configure output for details."
echo ""]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ccstruct/boxread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool ReadAllBoxes(int target_page, bool skip_blanks, const char *filename, std::
std::vector<int> *pages) {
std::ifstream input(BoxFileName(filename).c_str(), std::ios::in | std::ios::binary);
if (input.fail()) {
tprintf("Can not read box data from '%s'.\n", BoxFileName(filename).c_str());
tprintf("Cannot read box data from '%s'.\n", BoxFileName(filename).c_str());
tprintf("Does it exists?\n");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ccutil/unicharset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ CHAR_FRAGMENT *CHAR_FRAGMENT::parse_from_string(const char *string) {
const char *ptr = string;
int len = strlen(string);
if (len < kMinLen || *ptr != kSeparator) {
return nullptr; // this string can not represent a fragment
return nullptr; // this string cannot represent a fragment
}
ptr++; // move to the next character
int step = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/dict/dawg.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class DawgPositionVector : public std::vector<DawgPosition> {
//
/// Concrete class that can operate on a compacted (squished) Dawg (read,
/// search and write to file). This class is read-only in the sense that
/// new words can not be added to an instance of SquishedDawg.
/// new words cannot be added to an instance of SquishedDawg.
/// The underlying representation of the nodes and edges in SquishedDawg
/// is stored as a contiguous EDGE_ARRAY (read from file or given as an
/// argument to the constructor).
Expand Down
2 changes: 1 addition & 1 deletion src/dict/permdawg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ bool Dict::fragment_state_okay(UNICHAR_ID curr_unichar_id, float curr_rating, fl
}
if (word_ending && char_frag_info->fragment) {
if (debug) {
tprintf("Word can not end with a fragment\n");
tprintf("Word cannot end with a fragment\n");
}
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/textord/makerow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ void Textord::compute_block_xheight(TO_BLOCK *block, float gradient) {
// Try to search for two modes in row_cap_heights that could
// be the xheight and the capheight (e.g. some of the rows
// were lowercase, but did not have enough (a/de)scenders.
// If such two modes can not be found, this block is most
// If such two modes cannot be found, this block is most
// likely all caps (or all small caps, in which case the code
// still works as intended).
compute_xheight_from_modes(
Expand Down
2 changes: 1 addition & 1 deletion src/training/pango/pango_font_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ void FontUtils::PangoFontTypeInfo() {
CAIRO_FONT_TYPE_USER) {
printf("Using CAIRO_FONT_TYPE_USER.\n");
} else if (!font_map) {
printf("Can not create pango cairo font map!\n");
printf("Cannot create pango cairo font map!\n");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/training/unicharset_extractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static int Main(int argc, char **argv) {
/*continue_on_failure*/ false, /*boxes*/ nullptr, &texts,
/*box_texts*/ nullptr, /*pages*/ nullptr);
if (!res) {
tprintf("Can not read box data from '%s'\n", argv[arg]);
tprintf("Cannot read box data from '%s'\n", argv[arg]);
return EXIT_FAILURE;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/wordrec/language_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ float LanguageModel::ComputeDenom(BLOB_CHOICE_LIST *curr_list) {
assert(len != 0);
// The ideal situation would be to have the classifier scores for
// classifying each position as each of the characters in the unicharset.
// Since we can not do this because of speed, we add a very crude estimate
// Since we cannot do this because of speed, we add a very crude estimate
// of what these scores for the "missing" classifications would sum up to.
denom +=
(dict_->getUnicharset().size() - len) * CertaintyScore(language_model_ngram_nonmatch_score);
Expand Down
2 changes: 1 addition & 1 deletion src/wordrec/language_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class LanguageModel {
// could be pruned out (i.e. is neither a system/user/frequent dictionary
// nor a top choice path).
// In non-space delimited languages all paths can be "somewhat" dictionary
// words. In such languages we can not do dictionary-driven path pruning,
// words. In such languages we cannot do dictionary-driven path pruning,
// so paths with non-empty dawg_info are considered prunable.
inline bool PrunablePath(const ViterbiStateEntry &vse) {
if (vse.top_choice_flags) {
Expand Down
2 changes: 1 addition & 1 deletion src/wordrec/segsearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void Wordrec::ProcessSegSearchPainPoint(float pain_point_priority, const MATRIX_
if (lst == nullptr) {
ratings->put(pain_point.col, pain_point.row, classified);
} else {
// We can not delete old BLOB_CHOICEs, since they might contain
// We cannot delete old BLOB_CHOICEs, since they might contain
// ViterbiStateEntries that are parents of other "active" entries.
// Thus if the matrix cell already contains classifications we add
// the new ones to the beginning of the list.
Expand Down

0 comments on commit 1e04be8

Please sign in to comment.