#include <fst/matcher.h>
Inherits MatcherBase< M::Arc >.

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 Arc & | Value () const |
| void | Next () |
| virtual const FST & | GetFst () const |
| virtual uint64 | Properties (uint64 props) const |
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.
| typedef M::Arc fst::PhiMatcher< M >::Arc |
Reimplemented from fst::MatcherBase< M::Arc >.
| typedef M::FST fst::PhiMatcher< M >::FST |
| typedef Arc::Label fst::PhiMatcher< M >::Label |
Reimplemented from fst::MatcherBase< M::Arc >.
| typedef Arc::StateId fst::PhiMatcher< M >::StateId |
Reimplemented from fst::MatcherBase< M::Arc >.
| typedef Arc::Weight fst::PhiMatcher< M >::Weight |
Reimplemented from fst::MatcherBase< M::Arc >.
| 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] |
| fst::PhiMatcher< M >::PhiMatcher | ( | const PhiMatcher< M > & | matcher, | |
| bool | safe = false | |||
| ) | [inline] |
| virtual fst::PhiMatcher< M >::~PhiMatcher | ( | ) | [inline, virtual] |
| virtual PhiMatcher<M>* fst::PhiMatcher< M >::Copy | ( | bool | safe = false |
) | const [inline, virtual] |
Implements fst::MatcherBase< M::Arc >.
| bool fst::PhiMatcher< M >::Done | ( | ) | const [inline] |
Reimplemented from fst::MatcherBase< M::Arc >.
| bool fst::PhiMatcher< M >::Find | ( | Label | match_label | ) | [inline] |
| virtual const FST& fst::PhiMatcher< M >::GetFst | ( | ) | const [inline, virtual] |
Implements fst::MatcherBase< M::Arc >.
| void fst::PhiMatcher< M >::Next | ( | ) | [inline] |
Reimplemented from fst::MatcherBase< M::Arc >.
| uint64 fst::PhiMatcher< M >::Properties | ( | uint64 | props | ) | const [inline, virtual] |
Implements fst::MatcherBase< M::Arc >.
| void fst::PhiMatcher< M >::SetState | ( | StateId | s | ) | [inline] |
| virtual MatchType fst::PhiMatcher< M >::Type | ( | bool | test | ) | const [inline, virtual] |
Implements fst::MatcherBase< M::Arc >.
| const Arc& fst::PhiMatcher< M >::Value | ( | ) | const [inline] |
Reimplemented from fst::MatcherBase< M::Arc >.
1.7.1