Project

Description

This operation projects an FST onto its domain or range by either copying each arc's input label to its output label or vice versa.

Usage

enum ProjectType { PROJECT_INPUT, PROJECT_OUTPUT };

template<class Arc>
void Project(MutableFst<Arc> *fst, ProjectType type);
doc [bad link?]
template <class Arc> ProjectFst<Arc>::
ProjectFst(const Fst<Arc> &fst, ProjectType type);
doc
fstproject [--opts] a.fst out.fst
  --project_output: Project on output (def false)
 

Examples

A:

project1.jpg

π1(A):

project2.jpg

Project(&A, PROJECT_INPUT);
ProjectFst<Arc>(A, PROJECT_INPUT);
fstproject a.fst out.fst

π2(A):

project3.jpg

Project(&A, PROJECT_OUTPUT);
ProjectFst<Arc>(A, PROJECT_OUPUT);
fstproject --project_output=true a.fst out.fst

Complexity

Project: O(V + E), where V = # of states and E = # of arcs.

ProjectFst:

  • Constructor: O(1)
  • Traversal: O(v + e),
    where v = # of states visited, e = # of arcs visited and constant time to visit an input state or arc is assumed.

-- MichaelRiley - 1 Jul 2007

Topic attachments
I Attachment History Action SizeSorted descending Date Who Comment
JPEGjpg project1.jpg r2 r1 manage 11.1 K 2007-07-02 - 03:09 MichaelRiley  
JPEGjpg project3.jpg r2 r1 manage 10.5 K 2007-07-02 - 03:10 MichaelRiley  
JPEGjpg project2.jpg r2 r1 manage 10.3 K 2007-07-02 - 03:09 MichaelRiley  

This topic: FST > WebHome > FstQuickTour > ProjectDoc
Topic revision: r1 - 2007-07-02 - MichaelRiley
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback