Package nltk :: Package ccg :: Module chart :: Class CCGEdge
[hide private]
[frames] | no frames]

type CCGEdge

source code

       object --+    
                |    
parse.chart.EdgeI --+
                    |
                   CCGEdge

Instance Methods [hide private]
 
__init__(self, span, categ, rule) source code
 
lhs(self)
Returns: This edge's left-hand side, which specifies what kind of structure is hypothesized by this edge.
source code
(int, int)
span(self)
Returns: A tuple (s,e), where subtokens[s:e] is the portion of the sentence that is consistent with this edge's structure.
source code
int
start(self)
Returns: The start index of this edge's span.
source code
int
end(self)
Returns: The end index of this edge's span.
source code
int
length(self)
Returns: The length of this edge's span.
source code
 
rhs(self)
Returns: This edge's right-hand side, which specifies the content of the structure hypothesized by this edge.
source code
int
dot(self)
Returns: This edge's dot position, which indicates how much of the hypothesized structure is consistent with the sentence.
source code
boolean
is_complete(self)
Returns: True if this edge's structure is fully consistent with the text.
source code
boolean
is_incomplete(self)
Returns: True if this edge's structure is partially consistent with the text.
source code
Nonterminal or terminal or None
next(self)
Returns: The element of this edge's right-hand side that immediately follows its dot.
source code
 
categ(self) source code
 
rule(self) source code
 
__cmp__(self, other) source code
 
__hash__(self) source code
Method Details [hide private]

__init__(self, span, categ, rule)
(Constructor)

source code 
Overrides: parse.chart.EdgeI.__init__

lhs(self)

source code 
Returns:
This edge's left-hand side, which specifies what kind of structure is hypothesized by this edge.
Overrides: parse.chart.EdgeI.lhs
(inherited documentation)

span(self)

source code 
Returns: (int, int)
A tuple (s,e), where subtokens[s:e] is the portion of the sentence that is consistent with this edge's structure.
Overrides: parse.chart.EdgeI.span
(inherited documentation)

start(self)

source code 
Returns: int
The start index of this edge's span.
Overrides: parse.chart.EdgeI.start
(inherited documentation)

end(self)

source code 
Returns: int
The end index of this edge's span.
Overrides: parse.chart.EdgeI.end
(inherited documentation)

length(self)

source code 
Returns: int
The length of this edge's span.
Overrides: parse.chart.EdgeI.length
(inherited documentation)

rhs(self)

source code 
Returns:
This edge's right-hand side, which specifies the content of the structure hypothesized by this edge.
Overrides: parse.chart.EdgeI.rhs
(inherited documentation)

dot(self)

source code 
Returns: int
This edge's dot position, which indicates how much of the hypothesized structure is consistent with the sentence. In particular, self.rhs[:dot] is consistent with subtoks[self.start():self.end()].
Overrides: parse.chart.EdgeI.dot
(inherited documentation)

is_complete(self)

source code 
Returns: boolean
True if this edge's structure is fully consistent with the text.
Overrides: parse.chart.EdgeI.is_complete
(inherited documentation)

is_incomplete(self)

source code 
Returns: boolean
True if this edge's structure is partially consistent with the text.
Overrides: parse.chart.EdgeI.is_incomplete
(inherited documentation)

next(self)

source code 
Returns: Nonterminal or terminal or None
The element of this edge's right-hand side that immediately follows its dot.
Overrides: parse.chart.EdgeI.next
(inherited documentation)

__cmp__(self, other)
(Comparison operator)

source code 
Overrides: parse.chart.EdgeI.__cmp__

__hash__(self)
(Hashing function)

source code 
Overrides: parse.chart.EdgeI.__hash__