C# 클래스 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.
상속: IComponent, IDisposable
파일 보기 프로젝트 열기: nickun/OCRonet 1 사용 예제들

공개 메소드들

메소드 설명
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.

메소드 상세

AddTransition() 공개 메소드

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
리턴 void

AddTransition() 공개 추상적인 메소드

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
리턴 void

Arcs() 공개 메소드

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
리턴 void

BestPath() 공개 추상적인 메소드

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

Clear() 공개 추상적인 메소드

Clear the language model
public abstract Clear ( ) : void
리턴 void

Dispose() 공개 메소드

destroy the language model
public Dispose ( ) : void
리턴 void

GetAcceptCost() 공개 메소드

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

GetStart() 공개 메소드

Get the starting state.
public GetStart ( ) : int
리턴 int

GetTransitions() 공개 메소드

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
리턴 void

MakeFst() 공개 정적인 메소드

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

NewState() 공개 추상적인 메소드

Get a single new state
public abstract NewState ( ) : int
리턴 int

Rescore() 공개 메소드

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
리턴 void

Rescore() 공개 메소드

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
리턴 void

SetAccept() 공개 추상적인 메소드

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

SetStart() 공개 추상적인 메소드

Set the start state
public abstract SetStart ( int node ) : void
node int
리턴 void

SetString() 공개 메소드

simple interface for line recognizers
public SetString ( string text, Floatarray costs, Intarray ids ) : void
text string
costs Floatarray
ids Intarray
리턴 void

Special() 공개 추상적인 메소드

Obtain codes for "specials" (language model dependent)
public abstract Special ( string s ) : int
s string
리턴 int

isAccepting() 공개 메소드

Determine whether the given node is an accepting state.
public isAccepting ( int node ) : bool
node int
리턴 bool

nStates() 공개 메소드

Get the number of states.
public nStates ( ) : int
리턴 int