C# Class Ocronet.Dynamic.Interfaces.IGenericFst

A generic interface for language models. An IGenericFst is a directed graph with output/cost/id written on arcs, accept cost written on vertices and a fixed start vertice.
Inheritance: IComponent, IDisposable
Afficher le fichier Open project: nickun/OCRonet Class Usage Examples

Méthodes publiques

Méthode Description
AddTransition ( int from, int to, int symbol, float cost ) : void

A variant of addTransition() with equal input and output.

AddTransition ( int from, int to, int output, float cost, int input ) : void

Add a transition between the given states

Arcs ( Intarray ids, Intarray targets, Intarray outputs, Floatarray costs, int from ) : void

Return an array of arcs leading from the given node. WARN_DEPRECATED

BestPath ( string &result ) : double

Compute the best path through the language model. Useful for simple OCR tasks and for debugging.

Clear ( ) : void

Clear the language model

Dispose ( ) : void

destroy the language model

GetAcceptCost ( int node ) : float

Get the accept cost of a given vertex (a cost to finish the line and quit).

GetStart ( ) : int

Get the starting state.

GetTransitions ( Intarray tos, Intarray symbols, Floatarray costs, Intarray inputs, int from ) : void

A variant of addTransition() with equal input and output.

MakeFst ( string name ) : IGenericFst

Создает экземпляр класса, наследованного от IGenericFst

NewState ( ) : int

Get a single new state

Rescore ( int from, int to, int symbol, float new_cost ) : void

A variant of rescore() with equal input and output.

Rescore ( int from, int to, int output, float new_cost, int input ) : void

Change a transition score between the given states

SetAccept ( int node, float cost = 0.0f ) : void

Set a state as an accept state

SetStart ( int node ) : void

Set the start state

SetString ( string text, Floatarray costs, Intarray ids ) : void

simple interface for line recognizers

Special ( string s ) : int

Obtain codes for "specials" (language model dependent)

isAccepting ( int node ) : bool

Determine whether the given node is an accepting state.

nStates ( ) : int

Get the number of states.

Method Details

AddTransition() public méthode

A variant of addTransition() with equal input and output.
public AddTransition ( int from, int to, int symbol, float cost ) : void
from int
to int
symbol int
cost float
Résultat void

AddTransition() public abstract méthode

Add a transition between the given states
public abstract AddTransition ( int from, int to, int output, float cost, int input ) : void
from int
to int
output int
cost float
input int
Résultat void

Arcs() public méthode

Return an array of arcs leading from the given node. WARN_DEPRECATED
public Arcs ( Intarray ids, Intarray targets, Intarray outputs, Floatarray costs, int from ) : void
ids Intarray
targets Intarray
outputs Intarray
costs Floatarray
from int
Résultat void

BestPath() public abstract méthode

Compute the best path through the language model. Useful for simple OCR tasks and for debugging.
public abstract BestPath ( string &result ) : double
result string
Résultat double

Clear() public abstract méthode

Clear the language model
public abstract Clear ( ) : void
Résultat void

Dispose() public méthode

destroy the language model
public Dispose ( ) : void
Résultat void

GetAcceptCost() public méthode

Get the accept cost of a given vertex (a cost to finish the line and quit).
public GetAcceptCost ( int node ) : float
node int
Résultat float

GetStart() public méthode

Get the starting state.
public GetStart ( ) : int
Résultat int

GetTransitions() public méthode

A variant of addTransition() with equal input and output.
public GetTransitions ( Intarray tos, Intarray symbols, Floatarray costs, Intarray inputs, int from ) : void
tos Intarray
symbols Intarray
costs Floatarray
inputs Intarray
from int
Résultat void

MakeFst() public static méthode

Создает экземпляр класса, наследованного от IGenericFst
public static MakeFst ( string name ) : IGenericFst
name string имя класа
Résultat IGenericFst

NewState() public abstract méthode

Get a single new state
public abstract NewState ( ) : int
Résultat int

Rescore() public méthode

A variant of rescore() with equal input and output.
public Rescore ( int from, int to, int symbol, float new_cost ) : void
from int
to int
symbol int
new_cost float
Résultat void

Rescore() public méthode

Change a transition score between the given states
public Rescore ( int from, int to, int output, float new_cost, int input ) : void
from int
to int
output int
new_cost float
input int
Résultat void

SetAccept() public abstract méthode

Set a state as an accept state
public abstract SetAccept ( int node, float cost = 0.0f ) : void
node int
cost float
Résultat void

SetStart() public abstract méthode

Set the start state
public abstract SetStart ( int node ) : void
node int
Résultat void

SetString() public méthode

simple interface for line recognizers
public SetString ( string text, Floatarray costs, Intarray ids ) : void
text string
costs Floatarray
ids Intarray
Résultat void

Special() public abstract méthode

Obtain codes for "specials" (language model dependent)
public abstract Special ( string s ) : int
s string
Résultat int

isAccepting() public méthode

Determine whether the given node is an accepting state.
public isAccepting ( int node ) : bool
node int
Résultat bool

nStates() public méthode

Get the number of states.
public nStates ( ) : int
Résultat int