main.h revision f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2
1// main.h
2
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Copyright 2005-2010 Google, Inc.
16// Author: riley@google.com (Michael Riley)
17//
18// \file
19// Classes and functions for registering and invoking Far main
20// functions that support multiple and extensible arc types.
21
22#ifndef FST_EXTENSIONS_FAR_MAIN_H__
23#define FST_EXTENSIONS_FAR_MAIN_H__
24
25#include <fst/extensions/far/far.h>
26
27namespace fst {
28
29FarEntryType StringToFarEntryType(const string &s);
30FarTokenType StringToFarTokenType(const string &s);
31
32// Return the 'FarType' value corresponding to a far type name.
33FarType FarTypeFromString(const string &str);
34
35// Return the textual name  corresponding to a 'FarType;.
36string FarTypeToString(FarType type);
37
38string LoadArcTypeFromFar(const string& far_fname);
39string LoadArcTypeFromFst(const string& far_fname);
40
41}  // namespace fst
42
43#endif  // FST_EXTENSIONS_FAR_MAIN_H__
44