This file is indexed.

/usr/include/tesseract/lang_mod_edge.h is in libtesseract-dev 3.02.01-6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**********************************************************************
 * File:        lang_mod_edge.h
 * Description: Declaration of the Language Model Edge Base Class
 * Author:    Ahmad Abdulkader
 * Created:   2007
 *
 * (C) Copyright 2008, Google Inc.
 ** Licensed under the Apache License, Version 2.0 (the "License");
 ** you may not use this file except in compliance with the License.
 ** You may obtain a copy of the License at
 ** http://www.apache.org/licenses/LICENSE-2.0
 ** Unless required by applicable law or agreed to in writing, software
 ** distributed under the License is distributed on an "AS IS" BASIS,
 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ** See the License for the specific language governing permissions and
 ** limitations under the License.
 *
 **********************************************************************/

// The LangModEdge abstracts an Edge in the language model trie
// This is an abstract class that any Language Model Edge should inherit from
// It provides methods for:
// 1- Returns the class ID corresponding to the edge
// 2- If the edge is a valid EndOfWord (EOW)
// 3- If the edge is coming from a OutOfDictionary (OOF) state machine
// 4- If the edge is a Terminal (has no children)
// 5- A Hash of the edge that will be used to retrieve the edge
// quickly from the BeamSearch lattice
// 6- If two edges are identcial
// 7- Returns a verbal description of the edge (use by debuggers)
// 8- the language model cost of the edge (if any)
// 9- The string corresponding to this edge
// 10- Getting and setting the "Root" status of the edge

#ifndef LANG_MOD_EDGE_H
#define LANG_MOD_EDGE_H

#include "cube_tuning_params.h"
#include "char_set.h"

namespace tesseract {

class LangModEdge {
 public:
   LangModEdge() {}
  virtual ~LangModEdge() {}

  // The string corresponding to this edge
  virtual const char_32 * EdgeString() const = 0;
  // Returns the class ID corresponding to the edge
  virtual int ClassID() const = 0;
  // If the edge is the root edge
  virtual bool IsRoot() const = 0;
  // Set the Root flag
  virtual void SetRoot(bool flag) = 0;
  // If the edge is a valid EndOfWord (EOW)
  virtual bool IsEOW() const = 0;
  // is the edge is coming from a OutOfDictionary (OOF) state machine
  virtual bool IsOOD() const = 0;
  // Is the edge is a Terminal (has no children)
  virtual bool IsTerminal() const = 0;
  // Returns A hash of the edge that will be used to retrieve the edge
  virtual unsigned int Hash() const = 0;
  // Are the two edges identcial?
  virtual bool IsIdentical(LangModEdge *edge) const = 0;
  // a verbal description of the edge (use by debuggers)
  virtual char *Description() const = 0;
  // the language model cost of the edge (if any)
  virtual int PathCost() const = 0;
};
}

#endif  // LANG_MOD_EDGE_H