Public Types | Public Member Functions

fst::PhiMatcher< M > Class Template Reference

#include <fst/matcher.h>

Inherits MatcherBase< M::Arc >.

Collaboration diagram for fst::PhiMatcher< M >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef M::FST FST
typedef M::Arc Arc
typedef Arc::StateId StateId
typedef Arc::Label Label
typedef Arc::Weight Weight

Public Member Functions

 PhiMatcher (const FST &fst, MatchType match_type, Label phi_label=kNoLabel, bool phi_loop=true, MatcherRewriteMode rewrite_mode=MATCHER_REWRITE_AUTO, M *matcher=0)
 PhiMatcher (const PhiMatcher< M > &matcher, bool safe=false)
virtual ~PhiMatcher ()
virtual PhiMatcher< M > * Copy (bool safe=false) const
virtual MatchType Type (bool test) const
void SetState (StateId s)
bool Find (Label match_label)
bool Done () const
const ArcValue () const
void Next ()
virtual const FSTGetFst () const
virtual uint64 Properties (uint64 props) const

Detailed Description

template<class M>
class fst::PhiMatcher< M >

For any requested label that doesn't match at a state, this matcher considers the *unique* transition that match the label 'phi_label' (phi = 'fail'), and recursively look for a match at its destination. When 'phi_loop' is true, if no match is found but a phi self-loop is found, then the phi transition found is returned with the phi_label rewritten as the requested label (both sides if an acceptor, or if 'rewrite_both' is true and both input and output labels of the found transition are 'phi_label'). If 'phi_label' is kNoLabel, this special matching is not done. PhiMatcher is templated itself on a matcher, which is used to perform the underlying matching. By default, the underlying matcher is constructed by PhiMatcher. The user can instead pass in this object; in that case, PhiMatcher takes its ownership. Warning: phi non-determinism not supported (for simplicity).

Definition at line 652 of file matcher.h.


Member Typedef Documentation

template<class M>
typedef M::Arc fst::PhiMatcher< M >::Arc

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 655 of file matcher.h.

template<class M>
typedef M::FST fst::PhiMatcher< M >::FST

Definition at line 654 of file matcher.h.

template<class M>
typedef Arc::Label fst::PhiMatcher< M >::Label

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 657 of file matcher.h.

template<class M>
typedef Arc::StateId fst::PhiMatcher< M >::StateId

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 656 of file matcher.h.

template<class M>
typedef Arc::Weight fst::PhiMatcher< M >::Weight

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 658 of file matcher.h.


Constructor & Destructor Documentation

template<class M>
fst::PhiMatcher< M >::PhiMatcher ( const FST fst,
MatchType  match_type,
Label  phi_label = kNoLabel,
bool  phi_loop = true,
MatcherRewriteMode  rewrite_mode = MATCHER_REWRITE_AUTO,
M *  matcher = 0 
) [inline]

Definition at line 660 of file matcher.h.

template<class M>
fst::PhiMatcher< M >::PhiMatcher ( const PhiMatcher< M > &  matcher,
bool  safe = false 
) [inline]

Definition at line 684 of file matcher.h.

template<class M>
virtual fst::PhiMatcher< M >::~PhiMatcher (  )  [inline, virtual]

Definition at line 692 of file matcher.h.


Member Function Documentation

template<class M>
virtual PhiMatcher<M>* fst::PhiMatcher< M >::Copy ( bool  safe = false  )  const [inline, virtual]

Implements fst::MatcherBase< M::Arc >.

Definition at line 696 of file matcher.h.

template<class M>
bool fst::PhiMatcher< M >::Done (  )  const [inline]

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 710 of file matcher.h.

template<class M >
bool fst::PhiMatcher< M >::Find ( Label  match_label  )  [inline]

Definition at line 763 of file matcher.h.

template<class M>
virtual const FST& fst::PhiMatcher< M >::GetFst (  )  const [inline, virtual]

Implements fst::MatcherBase< M::Arc >.

Definition at line 736 of file matcher.h.

template<class M>
void fst::PhiMatcher< M >::Next (  )  [inline]

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 734 of file matcher.h.

template<class M >
uint64 fst::PhiMatcher< M >::Properties ( uint64  props  )  const [inline, virtual]

Implements fst::MatcherBase< M::Arc >.

Definition at line 791 of file matcher.h.

template<class M>
void fst::PhiMatcher< M >::SetState ( StateId  s  )  [inline]

Definition at line 702 of file matcher.h.

template<class M>
virtual MatchType fst::PhiMatcher< M >::Type ( bool  test  )  const [inline, virtual]

Implements fst::MatcherBase< M::Arc >.

Definition at line 700 of file matcher.h.

template<class M>
const Arc& fst::PhiMatcher< M >::Value (  )  const [inline]

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 712 of file matcher.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines