mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-06 17:32:41 +08:00
Fix some typos (most found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
420a4ed223
commit
509a6f0ce0
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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());
|
||||
|
@ -1029,7 +1029,7 @@ EquationDetect::IndentType EquationDetect::IsIndented(ColPartition* part) {
|
||||
const int kYGapTh = static_cast<int>(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);
|
||||
|
@ -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<TBOX>* 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,
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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_)) {
|
||||
|
@ -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, ".,",
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
**********************************************************************/
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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<int>(ceil(log(static_cast<double>(N)) / log(2.0)));
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
|
@ -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]);
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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"; }
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user