-
Notifications
You must be signed in to change notification settings - Fork 3
/
earley.datastructure.dsState.html
113 lines (102 loc) · 5.37 KB
/
earley.datastructure.dsState.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module earley.datastructure.dsState</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="earley.html"><font color="#ffffff">earley</font></a>.<a href="earley.datastructure.html"><font color="#ffffff">datastructure</font></a>.dsState</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///E:/workspace/husyntactic/src/earley/datastructure/dsstate.py">e:\workspace\husyntactic\src\earley\datastructure\dsstate.py</a></font></td></tr></table>
<p><tt>Created on 14-12-2011<br>
<br>
@author: hoangnm</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="earley.datastructure.dsState.html#State">State</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="State">class <strong>State</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A <a href="#State">State</a> <a href="__builtin__.html#object">object</a> in earley's process<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="State-__init__"><strong>__init__</strong></a>(self, rule, position, backpointer)</dt><dd><tt>Initialize a state in Earley algorithm process<br>
A state includes three components: <br>
* rule : instance of Rule, maybe grammar or lexicon<br>
* position : a list as [0,1], index of words position in sentence<br>
* backpointer: a list contains other state for back track <br>
to build tree parse</tt></dd></dl>
<dl><dt><a name="State-addBackPointer"><strong>addBackPointer</strong></a>(self, aState)</dt><dd><tt>Add a state to backpointer list <br>
<br>
Parameters<br>
----------<br>
aState: a state <br>
<br>
Returns<br>
-------<br>
out: backpointer list increases 1 element</tt></dd></dl>
<dl><dt><a name="State-compareTo"><strong>compareTo</strong></a>(self, aState)</dt><dd><tt>Compare this state with another state <br>
<br>
Parameters<br>
----------<br>
aState: another state<br>
<br>
Returns<br>
-------<br>
out: True if rule of this state is similar to rule of another state</tt></dd></dl>
<dl><dt><a name="State-getBackPointer"><strong>getBackPointer</strong></a>(self)</dt><dd><tt>Get back pointer list of this state <br>
<br>
Parameters<br>
----------<br>
<br>
Returns<br>
-------<br>
out: backpointer list</tt></dd></dl>
<dl><dt><a name="State-getPosition"><strong>getPosition</strong></a>(self)</dt><dd><tt>Get position list of state <br>
<br>
Parameters<br>
----------<br>
<br>
Returns<br>
-------<br>
out: a list position of this state</tt></dd></dl>
<dl><dt><a name="State-getRule"><strong>getRule</strong></a>(self)</dt><dd><tt>Get rule of this state <br>
<br>
Parameters<br>
----------<br>
<br>
Returns<br>
-------<br>
out: rule in this state</tt></dd></dl>
<dl><dt><a name="State-isComplete"><strong>isComplete</strong></a>(self)</dt><dd><tt>Check this state is complete <br>
<br>
Parameters<br>
----------<br>
<br>
Returns<br>
-------<br>
out: True if complete<br>
Otherwise, return False</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
</td></tr></table></td></tr></table>
</body></html>