Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PVertex.h « Syntax « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 23cfbdb5f52e9f07c6f7d2e9481a4db5e09de982 (plain)
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
#pragma once

#include "moses/Word.h"
#include "moses/Range.h"

namespace Moses
{
namespace Syntax
{

struct PVertex {
public:
  PVertex(const Range &wr, const Word &w) : span(wr), symbol(w) {}

  Range span;
  Word symbol;
};

inline bool operator==(const PVertex &v, const PVertex &w)
{
  return v.span == w.span && v.symbol == w.symbol;
}

}  // Syntax
}  // Moses