Пример #1
0
 public DependencyParser(int order, string modelFileName, bool createForest)
 {
     DependencyPipe pipe = order == 2 ? new DependencyPipe2O(true) : new DependencyPipe(true);
     pipe.setLabel(createForest);
     m_pipe = pipe;
     m_params = new Parameters(pipe.DataAlphabet.Count);
     m_decoder = SecondOrder ? new DependencyDecoder2O(pipe) : new DependencyDecoder(pipe);
     LoadModel(modelFileName);
     pipe.CloseAlphabets();
 }
Пример #2
0
 public DependencyParser(DependencyPipe pipe)
 {
     m_pipe = pipe;
     m_params = new Parameters(pipe.DataAlphabet.Count);
     m_decoder = SecondOrder ? new DependencyDecoder2O(pipe) : new DependencyDecoder(pipe);
 }