C# Class Ocronet.Dynamic.Recognizers.Linerec

Inheritance: Ocronet.Dynamic.Interfaces.IRecognizeLine
Afficher le fichier Open project: nickun/OCRonet Class Usage Examples

Méthodes publiques

Méthode Description
AddTrainingLine ( Intarray cseg, Bytearray image_grayscale, string tr ) : bool

Train on a text line, given a segmentation. This is analogous to addTrainingLine(bytearray,nustring) except that it takes the "ground truth" line segmentation.

AddTrainingLine ( Intarray cseg, string tr ) : void

Train on a text line. Usage is: call addTrainingLine with training data, then call finishTraining The state of the object is undefined between calling addTrainingLine and finishTraining, and it is an error to call recognizeLine before finishTraining completes. This allows both batch and incemental training. NB: you might train on length 1 strings for single character training and might train on words if line alignment is not working (well, for some training data)

Epoch ( int n ) : void
EstimateSpaceSize ( ) : void
FinishTraining ( ) : void
GetClassifier ( ) : IModel
IncClass ( int c ) : void

Original name: inc_class

Info ( ) : void
Linerec ( ) : System
Linerec ( string classifier1 = "latin", string extractor1 = "scaledfe", string segmenter1 = "DpSegmenter", int use_reject = 1 ) : System
Load ( string filename ) : void
LoadLinerec ( string filename ) : Linerec
LoadOldFormat ( BinaryReader reader ) : void
LoadOldFormat ( string path ) : void
OnTrainRound ( object sender, TrainEventArgs args ) : void
RecognizeLine ( IGenericFst result, Bytearray image ) : double

Recognize a text line and return a lattice representing the recognition alternatives.

RecognizeLine ( Intarray segmentation_, IGenericFst result, Bytearray image_ ) : double

This is a weird, optional method that exposes character segmentation for those line recognizers that have it segmentation contains colored pixels, and a transition in the transducer of the form * --- 1/eps --> * --- 2/a --> * means that pixels with color 1 and 2 together form the letter "a"

Save ( string filepath ) : void

Save network to file

SetClassifier ( IModel classifier ) : void
SetLine ( Bytearray image ) : void
StartTraining ( string type = "adaptation" ) : void

Private Methods

Méthode Description
Classifier_TrainRound ( object sender, TrainEventArgs e ) : void
TryAttachClassifierEvent ( IModel classifier ) : void
riuniform ( int hi ) : int

Method Details

AddTrainingLine() public méthode

Train on a text line, given a segmentation. This is analogous to addTrainingLine(bytearray,nustring) except that it takes the "ground truth" line segmentation.
public AddTrainingLine ( Intarray cseg, Bytearray image_grayscale, string tr ) : bool
cseg Intarray
image_grayscale Bytearray
tr string
Résultat bool

AddTrainingLine() public méthode

Train on a text line. Usage is: call addTrainingLine with training data, then call finishTraining The state of the object is undefined between calling addTrainingLine and finishTraining, and it is an error to call recognizeLine before finishTraining completes. This allows both batch and incemental training. NB: you might train on length 1 strings for single character training and might train on words if line alignment is not working (well, for some training data)
public AddTrainingLine ( Intarray cseg, string tr ) : void
cseg Intarray
tr string
Résultat void

Epoch() public méthode

public Epoch ( int n ) : void
n int
Résultat void

EstimateSpaceSize() public méthode

public EstimateSpaceSize ( ) : void
Résultat void

FinishTraining() public méthode

public FinishTraining ( ) : void
Résultat void

GetClassifier() public méthode

public GetClassifier ( ) : IModel
Résultat IModel

IncClass() public méthode

Original name: inc_class
public IncClass ( int c ) : void
c int
Résultat void

Info() public méthode

public Info ( ) : void
Résultat void

Linerec() public méthode

public Linerec ( ) : System
Résultat System

Linerec() public méthode

public Linerec ( string classifier1 = "latin", string extractor1 = "scaledfe", string segmenter1 = "DpSegmenter", int use_reject = 1 ) : System
classifier1 string
extractor1 string
segmenter1 string
use_reject int
Résultat System

Load() public méthode

public Load ( string filename ) : void
filename string
Résultat void

LoadLinerec() public static méthode

public static LoadLinerec ( string filename ) : Linerec
filename string
Résultat Linerec

LoadOldFormat() public méthode

public LoadOldFormat ( BinaryReader reader ) : void
reader System.IO.BinaryReader
Résultat void

LoadOldFormat() public méthode

public LoadOldFormat ( string path ) : void
path string
Résultat void

OnTrainRound() public méthode

public OnTrainRound ( object sender, TrainEventArgs args ) : void
sender object
args TrainEventArgs
Résultat void

RecognizeLine() public méthode

Recognize a text line and return a lattice representing the recognition alternatives.
public RecognizeLine ( IGenericFst result, Bytearray image ) : double
result Ocronet.Dynamic.Interfaces.IGenericFst
image Bytearray
Résultat double

RecognizeLine() public méthode

This is a weird, optional method that exposes character segmentation for those line recognizers that have it segmentation contains colored pixels, and a transition in the transducer of the form * --- 1/eps --> * --- 2/a --> * means that pixels with color 1 and 2 together form the letter "a"
public RecognizeLine ( Intarray segmentation_, IGenericFst result, Bytearray image_ ) : double
segmentation_ Intarray
result Ocronet.Dynamic.Interfaces.IGenericFst
image_ Bytearray
Résultat double

Save() public méthode

Save network to file
public Save ( string filepath ) : void
filepath string full file path
Résultat void

SetClassifier() public méthode

public SetClassifier ( IModel classifier ) : void
classifier IModel
Résultat void

SetLine() public méthode

public SetLine ( Bytearray image ) : void
image Bytearray
Résultat void

StartTraining() public méthode

public StartTraining ( string type = "adaptation" ) : void
type string
Résultat void