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

Search.cpp « src « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aa3bfe59f6e8a79a06f4d70174e332d3333aad82 (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
26
27
28
29
30
31

#include "Manager.h"
#include "SearchCubePruning.h"
#include "SearchNormal.h"
#include "UserMessage.h"

namespace Moses
{


Search *Search::CreateSearch(Manager& manager, const InputType &source,
                             SearchAlgorithm searchAlgorithm, const TranslationOptionCollection &transOptColl)
{
  switch(searchAlgorithm) {
  case Normal:
    return new SearchNormal(manager,source, transOptColl);
  case CubePruning:
    return new SearchCubePruning(manager, source, transOptColl);
  case CubeGrowing:
    return NULL;
  default:
    UserMessage::Add("ERROR: search. Aborting\n");
    abort();
    return NULL;
  }

}

}