• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 ///////////////////////////////////////////////////////////////////////
2 // File:        conversion.h
3 // Description: Collection of utility functions for A_CHOICE conversions.
4 //              TODO(daria): delete this file when conversion to unichar_ids
5 //              is finished and all permuters are completely updated/replaced.
6 // Author:      Daria Antonova
7 // Created:     Mon Jun 23 11:26:43 PDT 2008
8 //
9 // (C) Copyright 2007, Google Inc.
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 // http://www.apache.org/licenses/LICENSE-2.0
14 // Unless required by applicable law or agreed to in writing, software
15 // distributed under the License is distributed on an "AS IS" BASIS,
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 // See the License for the specific language governing permissions and
18 // limitations under the License.
19 //
20 ///////////////////////////////////////////////////////////////////////
21 
22 #ifndef TESSERACT_DICT_CONVERSION_H_
23 #define TESSERACT_DICT_CONVERSION_H_
24 
25 #include "choicearr.h"
26 #include "choices.h"
27 #include "ratngs.h"
28 #include "unicharset.h"
29 
30 void convert_to_word_choice(const A_CHOICE *a_choice,
31                             const UNICHARSET &current_unicharset,
32                             WERD_CHOICE *word_choice);
33 
34 WERD_CHOICE *get_best_delete_other(
35     const UNICHARSET &current_unicharset,
36     WERD_CHOICE *choice,
37     A_CHOICE *a_choice);
38 
39 CHOICES_LIST convert_to_choices_list(
40     const BLOB_CHOICE_LIST_VECTOR &char_choices,
41     const UNICHARSET &current_unicharset);
42 
43 #endif  // TESSERACT_DICT_CONVERSION_H_
44