Package com.clearnlp.component.state

Examples of com.clearnlp.component.state.TagState


 
//  ====================================== PROCESS ======================================
 
  public void process(DEPTree tree, byte flag)
  {
    TagState state = initialize(tree, flag);
    List<StringInstance> insts = processAux(state, flag);
    finalize(state, insts, flag);
  }
View Full Code Here


  }
 
  /** Called by {@link #process(DEPTree)}. */
  private TagState initialize(DEPTree tree, byte flag)
  {
    TagState state = new TagState(tree);
    simplifyForms(tree, flag);
   
    if (flag != FLAG_DECODE)
    {
      state.setGoldLabels(tree.getPOSTags());
     
      if (flag != FLAG_COLLECT)
        tree.clearPOSTags();
    }
   
View Full Code Here

    s_model.setWeights(prevWeights);
  }
 
  protected AbstractState process(DEPTree tree, byte flag, List<StringInstance> insts)
  {
    TagState state = init(tree, flag);
   
    while (!state.isTerminate())
    {
      switch (flag)
      {
      case FLAG_COLLECT  : processCollect(state);        break;
      case FLAG_TRAIN    : processTrain(state, insts);    break;
      case FLAG_BOOTSTRAP: processBootstrap(state, insts)break;
      default            : processDecode(state);
      }
       
      state.moveForward();
    }
   
    return state;
  }
View Full Code Here

  }
 
  /** Called by {@link #process(DEPTree)}. */
  private TagState init(DEPTree tree, byte flag)
  {
    TagState state = new TagState(tree);
    NLPProcess.simplifyForms(tree);
   
    if (flag != FLAG_DECODE)
    {
      state.setGoldLabels(tree.getPOSTags());
      if (flag != FLAG_COLLECT) tree.clearPOSTags();
    }
   
    return state;
  }
View Full Code Here

TOP

Related Classes of com.clearnlp.component.state.TagState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.