edu.umn.cs.nlp.mt.huangchiang2005
Class Hyperarc<Node extends Vertex,Parse extends Derivation>

java.lang.Object
  extended by edu.umn.cs.nlp.mt.huangchiang2005.Hyperarc<Node,Parse>
Direct Known Subclasses:
RuleApplication

public abstract class Hyperarc<Node extends Vertex,Parse extends Derivation>
extends Object

Version:
$LastChangedDate: 2007-11-05 15:21:19 -0600 (Mon, 05 Nov 2007) $
Author:
Lane Schwartz
See Also:
"Better k-best Parsing" by Liang Huang & David Chiang (IWPT, 2005)

Field Summary
protected  Node head
           
protected  List<Node> tail
           
 
Constructor Summary
Hyperarc(Node head, List<Node> tail)
           
 
Method Summary
 int arity()
           
abstract  Parse getDerivation(List<Parse> children)
           
abstract  double getWeight()
           
 boolean isSourceVertex()
           
 List<Parse> naiveMult(int k)
          Gets the k-best derivations using the naive mult algorithm from Huang & Chiang (2005).
 List<Node> tail()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

head

protected final Node extends Vertex head

tail

protected final List<Node extends Vertex> tail
Constructor Detail

Hyperarc

public Hyperarc(Node head,
                List<Node> tail)
Method Detail

tail

public List<Node> tail()

arity

public int arity()

isSourceVertex

public boolean isSourceVertex()

getWeight

public abstract double getWeight()

getDerivation

public abstract Parse getDerivation(List<Parse> children)

naiveMult

public List<Parse> naiveMult(int k)
Gets the k-best derivations using the naive mult algorithm from Huang & Chiang (2005).

This method has an overall time complexity of O(r * k^r * log k) where r is the arity of this Hyperarc.

Parameters:
k - The number of derivations to extract
Returns:
The k-best derivations of this arc
See Also:
4.1 of "Better k-best Parsing" by Liang Huang & David Chiang (IWPT, 2005)