FST  openfst-1.8.3
OpenFst Library
Classes | Typedefs | Functions | Variables
fst::internal Namespace Reference

Classes

class  AcyclicMinimizer
 
class  AddOnImpl
 
class  ArcMapFstImpl
 
class  CacheBaseImpl
 
class  CacheImpl
 
class  CompactFstImpl
 
class  ComplementFstImpl
 
class  ComposeFstImpl
 
class  ComposeFstImplBase
 
class  CompositeWeightIO
 
class  ConstFstImpl
 
class  ConstSymbolTableImpl
 
class  CyclicMinimizer
 
class  DenseSymbolMap
 
struct  DeterminizeArc
 
struct  DeterminizeElement
 
class  DeterminizeFsaImpl
 
class  DeterminizeFstImpl
 
class  DeterminizeFstImplBase
 
struct  DeterminizeStateTuple
 
struct  DfsState
 
class  Disambiguator
 
class  EditFstData
 
class  EditFstImpl
 
class  EncodeTable
 
struct  EquivalenceUtil
 
struct  ErrorLess
 
class  FactorWeightFstImpl
 
struct  FirstPathSelect
 
class  FirstPathSelect< S, W, NaturalAStarQueue< S, W, Estimate > >
 
class  FstImpl
 
class  Isomorphism
 
struct  KeyLookupReferenceType
 
struct  KeyLookupReferenceType< std::string >
 
class  KeyPair
 
struct  KeyPairHasher
 
class  LinearClassifierFstImpl
 
class  LinearTaggerFstImpl
 
class  MemoryArenaImpl
 
class  MemoryPoolImpl
 
class  MPdtExpandFstImpl
 
class  MPdtStack
 
class  MutableSymbolTableImpl
 
class  NGramFstImpl
 
struct  ParenState
 
class  Partition
 
class  PartitionIterator
 
class  PdtBalanceData
 
class  PdtExpandFstImpl
 
class  PdtParenReachable
 
class  PdtShortestPathData
 
class  PhiFstMatcherData
 
class  PruneCompare
 
class  RandGenFstImpl
 
class  RandGenVisitor
 
class  RationalFstImpl
 
class  RelabelFstImpl
 
class  RelationDeterminizeFilter
 
class  ReplaceFstImpl
 
struct  ReplaceParenHash
 
class  RhoFstMatcherData
 
class  RmEpsilonFstImpl
 
class  RmEpsilonState
 
class  ShortestDistanceState
 
class  ShortestPathCompare
 
class  SigmaFstMatcherData
 
class  SpanIterator
 
class  StateComparator
 
class  StateMapFstImpl
 
class  StateWeightCompare
 
class  StringReader
 
class  StringSplitter
 
class  SymbolTableImpl
 
class  SymbolTableImplBase
 
class  SynchronizeFstImpl
 
struct  type_identity
 
class  VectorFstBaseImpl
 
class  VectorFstImpl
 

Typedefs

template<typename T >
using type_identity_t = typename type_identity< T >::type
 
template<typename StackId , typename Level , Level nlevels>
using StackConfig = std::array< StackId, nlevels >
 

Functions

int KeySize (std::string_view source)
 
template<class Compactor , class Arc >
const Compactor * GetCompactor (const CompactFst< Arc, Compactor > &fst)
 
template<class Compactor , class Arc >
const Compactor * GetCompactor (const Fst< Arc > &fst)
 
template<class S >
size_t GetResultSize (const std::vector< S > &elements, size_t s_size)
 
template<class Arc >
Arc::Weight Final (const ExpandedFst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
ssize_t NumArcs (const ExpandedFst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
ssize_t NumInputEpsilons (const ExpandedFst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
ssize_t NumOutputEpsilons (const ExpandedFst< Arc > &fst, typename Arc::StateId s)
 
template<class Var , class Edge >
bool ExpandLZCode (const std::vector< std::pair< Var, Edge >> &code, std::vector< std::vector< Edge >> *expanded_code)
 
template<class Arc , class Functor >
void Map (FarReader< Arc > &reader, FarWriter< Arc > &writer, Functor functor)
 
template<class Arc , class Functor >
bool MapAllReduce (FarReader< Arc > &reader1, FarReader< Arc > &reader2, Functor functor, std::string_view begin_key="", std::string_view end_key="")
 
template<class T >
constexpr bool IsNan (T value)
 
double LogPosExp (double x)
 
double LogNegExp (double x)
 
double KahanLogSum (double a, double b, double *c)
 
double KahanLogDiff (double a, double b, double *c)
 
double KahanRealSum (double a, double b, double *c)
 
template<class F >
F::Arc::Weight Final (const F &fst, typename F::Arc::StateId s)
 
template<class F >
ssize_t NumArcs (const F &fst, typename F::Arc::StateId s)
 
template<class F >
ssize_t NumInputEpsilons (const F &fst, typename F::Arc::StateId s)
 
template<class F >
ssize_t NumOutputEpsilons (const F &fst, typename F::Arc::StateId s)
 
template<class Arc >
Arc::Weight Final (const Fst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
size_t NumArcs (const Fst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
size_t NumInputEpsilons (const Fst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
size_t NumOutputEpsilons (const Fst< Arc > &fst, typename Arc::StateId s)
 
template<class Weight , typename std::enable_if_t< IsIdempotent< Weight >::value > * = nullptr>
bool WeightCompare (const Weight &w1, const Weight &w2, float, bool *)
 
template<class Arc >
void MergeStates (const Partition< typename Arc::StateId > &partition, MutableFst< Arc > *fst)
 
template<class Arc >
void AcceptorMinimize (MutableFst< Arc > *fst)
 
template<class Arc >
Arc::Weight Final (const MutableFst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
ssize_t NumArcs (const MutableFst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
ssize_t NumInputEpsilons (const MutableFst< Arc > &fst, typename Arc::StateId s)
 
template<class Arc >
ssize_t NumOutputEpsilons (const MutableFst< Arc > &fst, typename Arc::StateId s)
 
uint64_t KnownProperties (uint64_t props)
 
bool CompatProperties (uint64_t props1, uint64_t props2)
 
template<class Arc >
void SingleShortestPathBacktrace (const Fst< Arc > &ifst, MutableFst< Arc > *ofst, const std::vector< std::pair< typename Arc::StateId, size_t >> &parent, typename Arc::StateId f_parent)
 
template<class Arc , class Queue , class ArcFilter >
bool SingleShortestPath (const Fst< Arc > &ifst, std::vector< typename Arc::Weight > *distance, const ShortestPathOptions< Arc, Queue, ArcFilter > &opts, typename Arc::StateId *f_parent, std::vector< std::pair< typename Arc::StateId, size_t >> *parent)
 
template<class Arc , class RevArc >
void NShortestPath (const Fst< RevArc > &ifst, MutableFst< Arc > *ofst, const std::vector< typename Arc::Weight > &distance, int32_t nshortest, float delta=kShortestDelta, typename Arc::Weight weight_threshold=Arc::Weight::Zero(), typename Arc::StateId state_threshold=kNoStateId)
 
template<class Label >
bool ConvertSymbolToLabel (std::string_view str, const SymbolTable *syms, Label unknown_label, Label *output)
 
template<class Label >
bool ConvertStringToLabels (std::string_view str, TokenType token_type, const SymbolTable *syms, Label unknown_label, std::vector< Label > *labels, std::string_view sep=FST_FLAGS_fst_field_separator)
 
template<class Label >
bool LabelsToSymbolString (const std::vector< Label > &labels, std::string *str, const SymbolTable &syms, std::string_view sep, bool omit_epsilon)
 
template<class Label >
bool LabelsToNumericString (const std::vector< Label > &labels, std::string *str, std::string_view sep, bool omit_epsilon)
 
template<class Arc >
uint64_t ComputeProperties (const Fst< Arc > &fst, uint64_t mask, uint64_t *known)
 
template<class Arc >
uint64_t ComputeOrUseStoredProperties (const Fst< Arc > &fst, uint64_t mask, uint64_t *known)
 
template<class Arc >
uint64_t TestProperties (const Fst< Arc > &fst, uint64_t mask, uint64_t *known)
 
template<class Arc >
uint64_t CheckProperties (const Fst< Arc > &fst, uint64_t check_mask, uint64_t test_mask)
 
template<class C , class ReserveFn >
std::istream & ReadContainerType (std::istream &strm, C *c, ReserveFn reserve)
 
template<typename T , class A , typename std::enable_if_t< std::is_class_v< T >, T > * = nullptr>
std::istream & ReadVectorType (std::istream &strm, std::vector< T, A > *c)
 
template<class C >
std::ostream & WriteSequence (std::ostream &strm, const C &c)
 
template<class C >
std::ostream & WriteContainer (std::ostream &strm, const C &c)
 

Variables

constexpr uint8_t kEncodeHasISymbols = 0x04
 
constexpr uint8_t kEncodeHasOSymbols = 0x08
 
constexpr int32_t kEncodeMagicNumber = 2128178506
 
constexpr int32_t kEncodeDeprecatedMagicNumber = 2129983209
 
constexpr uint8_t kPdtInited = 0x01
 
constexpr uint8_t kPdtFinal = 0x02
 
constexpr uint8_t kPdtMarked = 0x04
 
const std::string_view PropertyNames []
 
constexpr size_t kNoArc = -1
 
constexpr int kLineLen = 8096
 
template<class T >
constexpr bool IsScalarIOTypeV
 

Typedef Documentation

template<typename StackId , typename Level , Level nlevels>
using fst::internal::StackConfig = typedef std::array<StackId, nlevels>

Definition at line 54 of file mpdt.h.

template<typename T >
using fst::internal::type_identity_t = typedef typename type_identity<T>::type

Definition at line 85 of file compat.h.

Function Documentation

template<class Arc >
void fst::internal::AcceptorMinimize ( MutableFst< Arc > *  fst)

Definition at line 471 of file minimize.h.

template<class Arc >
uint64_t fst::internal::CheckProperties ( const Fst< Arc > &  fst,
uint64_t  check_mask,
uint64_t  test_mask 
)

Definition at line 227 of file test-properties.h.

bool fst::internal::CompatProperties ( uint64_t  props1,
uint64_t  props2 
)
inline

Definition at line 507 of file properties.h.

template<class Arc >
uint64_t fst::internal::ComputeOrUseStoredProperties ( const Fst< Arc > &  fst,
uint64_t  mask,
uint64_t *  known 
)

Definition at line 189 of file test-properties.h.

template<class Arc >
uint64_t fst::internal::ComputeProperties ( const Fst< Arc > &  fst,
uint64_t  mask,
uint64_t *  known 
)

Definition at line 52 of file test-properties.h.

template<class Label >
bool fst::internal::ConvertStringToLabels ( std::string_view  str,
TokenType  token_type,
const SymbolTable syms,
Label  unknown_label,
std::vector< Label > *  labels,
std::string_view  sep = FST_FLAGS_fst_field_separator 
)

Definition at line 93 of file string.h.

template<class Label >
bool fst::internal::ConvertSymbolToLabel ( std::string_view  str,
const SymbolTable syms,
Label  unknown_label,
Label *  output 
)

Definition at line 67 of file string.h.

template<class Var , class Edge >
bool fst::internal::ExpandLZCode ( const std::vector< std::pair< Var, Edge >> &  code,
std::vector< std::vector< Edge >> *  expanded_code 
)

Definition at line 65 of file compress.h.

template<class Arc >
Arc::Weight fst::internal::Final ( const ExpandedFst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 107 of file expanded-fst.h.

template<class Arc >
Arc::Weight fst::internal::Final ( const MutableFst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 265 of file mutable-fst.h.

template<class F >
F::Arc::Weight fst::internal::Final ( const F &  fst,
typename F::Arc::StateId  s 
)
inline

Definition at line 614 of file fst.h.

template<class Arc >
Arc::Weight fst::internal::Final ( const Fst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 636 of file fst.h.

template<class Compactor , class Arc >
const Compactor* fst::internal::GetCompactor ( const CompactFst< Arc, Compactor > &  fst)

Definition at line 1093 of file compact-fst.h.

template<class Compactor , class Arc >
const Compactor* fst::internal::GetCompactor ( const Fst< Arc > &  fst)

Definition at line 1098 of file compact-fst.h.

template<class S >
size_t fst::internal::GetResultSize ( const std::vector< S > &  elements,
size_t  s_size 
)

Definition at line 176 of file compat.h.

template<class T >
constexpr bool fst::internal::IsNan ( value)
inline

Definition at line 52 of file float-weight.h.

double fst::internal::KahanLogDiff ( double  a,
double  b,
double *  c 
)
inline

Definition at line 504 of file float-weight.h.

double fst::internal::KahanLogSum ( double  a,
double  b,
double *  c 
)
inline

Definition at line 492 of file float-weight.h.

double fst::internal::KahanRealSum ( double  a,
double  b,
double *  c 
)
inline

Definition at line 721 of file float-weight.h.

int fst::internal::KeySize ( std::string_view  source)

Definition at line 38 of file compile-strings.cc.

uint64_t fst::internal::KnownProperties ( uint64_t  props)
inline

Definition at line 500 of file properties.h.

template<class Label >
bool fst::internal::LabelsToNumericString ( const std::vector< Label > &  labels,
std::string *  str,
std::string_view  sep,
bool  omit_epsilon 
)

Definition at line 151 of file string.h.

template<class Label >
bool fst::internal::LabelsToSymbolString ( const std::vector< Label > &  labels,
std::string *  str,
const SymbolTable syms,
std::string_view  sep,
bool  omit_epsilon 
)

Definition at line 124 of file string.h.

double fst::internal::LogNegExp ( double  x)
inline

Definition at line 483 of file float-weight.h.

double fst::internal::LogPosExp ( double  x)
inline

Definition at line 477 of file float-weight.h.

template<class Arc , class Functor >
void fst::internal::Map ( FarReader< Arc > &  reader,
FarWriter< Arc > &  writer,
Functor  functor 
)

Definition at line 49 of file map-reduce.h.

template<class Arc , class Functor >
bool fst::internal::MapAllReduce ( FarReader< Arc > &  reader1,
FarReader< Arc > &  reader2,
Functor  functor,
std::string_view  begin_key = "",
std::string_view  end_key = "" 
)

Definition at line 71 of file map-reduce.h.

template<class Arc >
void fst::internal::MergeStates ( const Partition< typename Arc::StateId > &  partition,
MutableFst< Arc > *  fst 
)

Definition at line 441 of file minimize.h.

template<class Arc , class RevArc >
void fst::internal::NShortestPath ( const Fst< RevArc > &  ifst,
MutableFst< Arc > *  ofst,
const std::vector< typename Arc::Weight > &  distance,
int32_t  nshortest,
float  delta = kShortestDelta,
typename Arc::Weight  weight_threshold = Arc::Weight::Zero(),
typename Arc::StateId  state_threshold = kNoStateId 
)

Definition at line 320 of file shortest-path.h.

template<class Arc >
ssize_t fst::internal::NumArcs ( const ExpandedFst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 113 of file expanded-fst.h.

template<class Arc >
ssize_t fst::internal::NumArcs ( const MutableFst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 271 of file mutable-fst.h.

template<class F >
ssize_t fst::internal::NumArcs ( const F &  fst,
typename F::Arc::StateId  s 
)
inline

Definition at line 619 of file fst.h.

template<class Arc >
size_t fst::internal::NumArcs ( const Fst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 642 of file fst.h.

template<class Arc >
ssize_t fst::internal::NumInputEpsilons ( const ExpandedFst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 118 of file expanded-fst.h.

template<class Arc >
ssize_t fst::internal::NumInputEpsilons ( const MutableFst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 276 of file mutable-fst.h.

template<class F >
ssize_t fst::internal::NumInputEpsilons ( const F &  fst,
typename F::Arc::StateId  s 
)
inline

Definition at line 624 of file fst.h.

template<class Arc >
size_t fst::internal::NumInputEpsilons ( const Fst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 647 of file fst.h.

template<class Arc >
ssize_t fst::internal::NumOutputEpsilons ( const ExpandedFst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 124 of file expanded-fst.h.

template<class Arc >
ssize_t fst::internal::NumOutputEpsilons ( const MutableFst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 282 of file mutable-fst.h.

template<class F >
ssize_t fst::internal::NumOutputEpsilons ( const F &  fst,
typename F::Arc::StateId  s 
)
inline

Definition at line 629 of file fst.h.

template<class Arc >
size_t fst::internal::NumOutputEpsilons ( const Fst< Arc > &  fst,
typename Arc::StateId  s 
)
inline

Definition at line 652 of file fst.h.

template<class C , class ReserveFn >
std::istream& fst::internal::ReadContainerType ( std::istream &  strm,
C *  c,
ReserveFn  reserve 
)

Definition at line 141 of file util.h.

template<typename T , class A , typename std::enable_if_t< std::is_class_v< T >, T > * = nullptr>
std::istream & fst::internal::ReadVectorType ( std::istream &  strm,
std::vector< T, A > *  c 
)
inline

Definition at line 158 of file util.h.

template<class Arc , class Queue , class ArcFilter >
bool fst::internal::SingleShortestPath ( const Fst< Arc > &  ifst,
std::vector< typename Arc::Weight > *  distance,
const ShortestPathOptions< Arc, Queue, ArcFilter > &  opts,
typename Arc::StateId *  f_parent,
std::vector< std::pair< typename Arc::StateId, size_t >> *  parent 
)

Definition at line 170 of file shortest-path.h.

template<class Arc >
void fst::internal::SingleShortestPathBacktrace ( const Fst< Arc > &  ifst,
MutableFst< Arc > *  ofst,
const std::vector< std::pair< typename Arc::StateId, size_t >> &  parent,
typename Arc::StateId  f_parent 
)

Definition at line 94 of file shortest-path.h.

template<class Arc >
uint64_t fst::internal::TestProperties ( const Fst< Arc > &  fst,
uint64_t  mask,
uint64_t *  known 
)

Definition at line 208 of file test-properties.h.

template<class Weight , typename std::enable_if_t< IsIdempotent< Weight >::value > * = nullptr>
bool fst::internal::WeightCompare ( const Weight &  w1,
const Weight &  w2,
float  delta,
bool *  error 
)

Definition at line 45 of file isomorphic.h.

template<class C >
std::ostream& fst::internal::WriteContainer ( std::ostream &  strm,
const C &  c 
)

Definition at line 292 of file util.h.

template<class C >
std::ostream& fst::internal::WriteSequence ( std::ostream &  strm,
const C &  c 
)

Definition at line 284 of file util.h.

Variable Documentation

template<class T >
constexpr bool fst::internal::IsScalarIOTypeV
inline
Initial value:
=
std::is_arithmetic_v<T> || std::is_enum_v<T>

Definition at line 72 of file util.h.

constexpr int32_t fst::internal::kEncodeDeprecatedMagicNumber = 2129983209
inline

Definition at line 69 of file encode.h.

constexpr uint8_t fst::internal::kEncodeHasISymbols = 0x04
inline

Definition at line 63 of file encode.h.

constexpr uint8_t fst::internal::kEncodeHasOSymbols = 0x08
inline

Definition at line 64 of file encode.h.

constexpr int32_t fst::internal::kEncodeMagicNumber = 2128178506
inline

Definition at line 67 of file encode.h.

constexpr int fst::internal::kLineLen = 8096
inline

Definition at line 62 of file symbol-table.h.

constexpr size_t fst::internal::kNoArc = -1
inline

Definition at line 86 of file shortest-path.h.

constexpr uint8_t fst::internal::kPdtFinal = 0x02
inline

Definition at line 65 of file shortest-path.h.

constexpr uint8_t fst::internal::kPdtInited = 0x01
inline

Definition at line 64 of file shortest-path.h.

constexpr uint8_t fst::internal::kPdtMarked = 0x04
inline

Definition at line 66 of file shortest-path.h.

const std::string_view fst::internal::PropertyNames
Initial value:
= {
"expanded", "mutable", "error", "", "", "", "", "", "", "", "", "", "", "",
"", "",
"acceptor", "not acceptor", "input deterministic",
"non input deterministic", "output deterministic",
"non output deterministic", "input/output epsilons",
"no input/output epsilons", "input epsilons", "no input epsilons",
"output epsilons", "no output epsilons", "input label sorted",
"not input label sorted", "output label sorted", "not output label sorted",
"weighted", "unweighted", "cyclic", "acyclic", "cyclic at initial state",
"acyclic at initial state", "top sorted", "not top sorted", "accessible",
"not accessible", "coaccessible", "not coaccessible", "string",
"not string", "weighted cycles", "unweighted cycles"}

Definition at line 429 of file properties.cc.