C# Класс Ocronet.Dynamic.Recognizers.Linerec

Наследование: Ocronet.Dynamic.Interfaces.IRecognizeLine
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Classifier_TrainRound ( object sender, TrainEventArgs e ) : void
TryAttachClassifierEvent ( IModel classifier ) : void
riuniform ( int hi ) : int

Описание методов

AddTrainingLine() публичный Метод

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
Результат bool

AddTrainingLine() публичный Метод

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
Результат void

Epoch() публичный Метод

public Epoch ( int n ) : void
n int
Результат void

EstimateSpaceSize() публичный Метод

public EstimateSpaceSize ( ) : void
Результат void

FinishTraining() публичный Метод

public FinishTraining ( ) : void
Результат void

GetClassifier() публичный Метод

public GetClassifier ( ) : IModel
Результат IModel

IncClass() публичный Метод

Original name: inc_class
public IncClass ( int c ) : void
c int
Результат void

Info() публичный Метод

public Info ( ) : void
Результат void

Linerec() публичный Метод

public Linerec ( ) : System
Результат System

Linerec() публичный Метод

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
Результат System

Load() публичный Метод

public Load ( string filename ) : void
filename string
Результат void

LoadLinerec() публичный статический Метод

public static LoadLinerec ( string filename ) : Linerec
filename string
Результат Linerec

LoadOldFormat() публичный Метод

public LoadOldFormat ( BinaryReader reader ) : void
reader System.IO.BinaryReader
Результат void

LoadOldFormat() публичный Метод

public LoadOldFormat ( string path ) : void
path string
Результат void

OnTrainRound() публичный Метод

public OnTrainRound ( object sender, TrainEventArgs args ) : void
sender object
args TrainEventArgs
Результат void

RecognizeLine() публичный Метод

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
Результат double

RecognizeLine() публичный Метод

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
Результат double

Save() публичный Метод

Save network to file
public Save ( string filepath ) : void
filepath string full file path
Результат void

SetClassifier() публичный Метод

public SetClassifier ( IModel classifier ) : void
classifier IModel
Результат void

SetLine() публичный Метод

public SetLine ( Bytearray image ) : void
image Bytearray
Результат void

StartTraining() публичный Метод

public StartTraining ( string type = "adaptation" ) : void
type string
Результат void