C# 클래스 Ocronet.Dynamic.OcroFST.FstUtil

파일 보기 프로젝트 열기: nickun/OCRonet 1 사용 예제들

공개 메소드들

메소드 설명
fst_copy ( IGenericFst dst, IGenericFst src ) : void

Copy one FST to another.

fst_copy_best_arcs_only ( IGenericFst dst, IGenericFst src ) : void

Copy one FST to another, preserving only lowest-cost arcs. This is useful for visualization.

fst_copy_reverse ( IGenericFst dst, IGenericFst src, bool no_accept = false ) : void

Reverse the FST's arcs, adding a new start vertex (former accept).

fst_expand_composition ( IGenericFst outf, OcroFST f1, OcroFST f2 ) : void

Compose two FSTs. This function copies the composition of two given FSTs. That causes expansion (storing all arcs explicitly).

fst_line ( IGenericFst fst, string s ) : void
fst_sample ( Intarray result, IGenericFst fst, int max = 1000 ) : double

Randomly sample an FST, assuming any input.

fst_sample ( string &result, IGenericFst fst, int max ) : double

Randomly sample an FST, assuming any input.

fst_star ( IGenericFst fst ) : void

Make an in-place Kleene closure of the FST.

fst_star ( IGenericFst result, IGenericFst fst ) : void

Make a Kleene closure.

remove_epsilons ( string &outs, Intarray a ) : void

Remove epsilons (zeros) and converts integers to string.

sample_by_costs ( Floatarray costs ) : int

Pick an array element with probability proportional to exp(-cost).

scale_fst ( OcroFST fst, float scale ) : void

메소드 상세

fst_copy() 공개 정적인 메소드

Copy one FST to another.
public static fst_copy ( IGenericFst dst, IGenericFst src ) : void
dst Ocronet.Dynamic.Interfaces.IGenericFst The destination. Will be cleared before copying.
src Ocronet.Dynamic.Interfaces.IGenericFst The FST to copy.
리턴 void

fst_copy_best_arcs_only() 공개 정적인 메소드

Copy one FST to another, preserving only lowest-cost arcs. This is useful for visualization.
public static fst_copy_best_arcs_only ( IGenericFst dst, IGenericFst src ) : void
dst Ocronet.Dynamic.Interfaces.IGenericFst The destination. Will be cleared before copying.
src Ocronet.Dynamic.Interfaces.IGenericFst The FST to copy.
리턴 void

fst_copy_reverse() 공개 정적인 메소드

Reverse the FST's arcs, adding a new start vertex (former accept).
public static fst_copy_reverse ( IGenericFst dst, IGenericFst src, bool no_accept = false ) : void
dst Ocronet.Dynamic.Interfaces.IGenericFst
src Ocronet.Dynamic.Interfaces.IGenericFst
no_accept bool
리턴 void

fst_expand_composition() 공개 정적인 메소드

Compose two FSTs. This function copies the composition of two given FSTs. That causes expansion (storing all arcs explicitly).
public static fst_expand_composition ( IGenericFst outf, OcroFST f1, OcroFST f2 ) : void
outf Ocronet.Dynamic.Interfaces.IGenericFst
f1 OcroFST
f2 OcroFST
리턴 void

fst_line() 공개 정적인 메소드

public static fst_line ( IGenericFst fst, string s ) : void
fst Ocronet.Dynamic.Interfaces.IGenericFst
s string
리턴 void

fst_sample() 공개 정적인 메소드

Randomly sample an FST, assuming any input.
public static fst_sample ( Intarray result, IGenericFst fst, int max = 1000 ) : double
result Intarray The array of output symbols, excluding epsilons.
fst Ocronet.Dynamic.Interfaces.IGenericFst The FST.
max int The maximum length of the result.
리턴 double

fst_sample() 공개 정적인 메소드

Randomly sample an FST, assuming any input.
public static fst_sample ( string &result, IGenericFst fst, int max ) : double
result string
fst Ocronet.Dynamic.Interfaces.IGenericFst
max int
리턴 double

fst_star() 공개 정적인 메소드

Make an in-place Kleene closure of the FST.
public static fst_star ( IGenericFst fst ) : void
fst Ocronet.Dynamic.Interfaces.IGenericFst
리턴 void

fst_star() 공개 정적인 메소드

Make a Kleene closure.
public static fst_star ( IGenericFst result, IGenericFst fst ) : void
result Ocronet.Dynamic.Interfaces.IGenericFst
fst Ocronet.Dynamic.Interfaces.IGenericFst
리턴 void

remove_epsilons() 공개 정적인 메소드

Remove epsilons (zeros) and converts integers to string.
public static remove_epsilons ( string &outs, Intarray a ) : void
outs string
a Intarray
리턴 void

sample_by_costs() 공개 정적인 메소드

Pick an array element with probability proportional to exp(-cost).
public static sample_by_costs ( Floatarray costs ) : int
costs Floatarray
리턴 int

scale_fst() 공개 정적인 메소드

public static scale_fst ( OcroFST fst, float scale ) : void
fst OcroFST
scale float
리턴 void