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);
 
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:

  • TIme: O(V + E)
  • Space: O(1)
where V = # of states and E = # of arcs.

ProjectFst:

  • Time: O(v + e)
  • Space: O(1)
where v = # of states visited, e = # of arcs visited Constant time and to visit an input state or arc is assumed and exclusive of caching.

-- MichaelRiley - 1 Jul 2007

Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg project1.jpg r2 r1 manage 11.1 K 2007-07-02 - 03:09 MichaelRiley  
JPEGjpg project2.jpg r2 r1 manage 10.3 K 2007-07-02 - 03:09 MichaelRiley  
JPEGjpg project3.jpg r2 r1 manage 10.5 K 2007-07-02 - 03:10 MichaelRiley  
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2018-04-27 - 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