Package joshua.decoder.hypergraph

Examples of joshua.decoder.hypergraph.HGNode


    int[] enWords = rule.getEnglish();   
    for(int c=0; c<enWords.length; c++){
        int c_id = enWords[c];
        if(symbolTbl.isNonterminal(c_id)==true){
          int index=symbolTbl.getTargetNonterminalIndex(c_id);
          HGNode antNode = antNodes.get(index);   
         
          NgramDPState state     = (NgramDPState) antNode.getDPState(this.ngramStateID);
          List<Integer>   l_context = state.getLeftLMStateWords();
          List<Integer>   r_context = state.getRightLMStateWords();
   
          if(contextWord!=null){
            String bigram = null;
View Full Code Here


    splitRefinedNodesTbl.clear();
    numRefinedNodes = 0;
    numRefinedEdges = 0;   
   
    splitNode(hg.goalNode);
    HGNode newGoal = getVirtualGoalItem(hg, splitRefinedNodesTbl);
    printInfo();
   
    HyperGraph newHG = new HyperGraph(newGoal, numRefinedNodes, numRefinedEdges, hg.sentID, hg.sentLen);
    return newHG;
 
View Full Code Here

   
    List<HGNode> originalAntNodes = originalEdge.getAntNodes();
   
    if(originalAntNodes!=null){         
      if(originalAntNodes.size()==1){//arity: one
        HGNode it = originalAntNodes.get(0);
        List<RefinedNode> virtualItems = splitRefinedNodesTbl.get(it);       
        for(RefinedNode antVirtualItem: virtualItems){
          ArrayList<HGNode> antRefinedNodes = new ArrayList<HGNode>();//used in combination
          antRefinedNodes.add(antVirtualItem);
         
          handleOneCombination(originalParentHGNode, originalEdge, antRefinedNodes, refinedNodeSigs);
        }
       
      }else if(originalAntNodes.size()==2){//arity: two
        HGNode it1 = originalAntNodes.get(0);
        HGNode it2 = originalAntNodes.get(1);
        List<RefinedNode> virtualItems1 = splitRefinedNodesTbl.get(it1);
        List<RefinedNode> virtualItems2 = splitRefinedNodesTbl.get(it2);
       
        /*if(virtualItems1.size()>1 && virtualItems2.size()>1){
          System.out.println("virtualItems1.size " + virtualItems1.size());
View Full Code Here

TOP

Related Classes of joshua.decoder.hypergraph.HGNode

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.