-
Notifications
You must be signed in to change notification settings - Fork 0
/
bugs
67 lines (49 loc) · 1.83 KB
/
bugs
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
Bug 1
-----
Opened by: Bill McNeill, 13 May 2005
How should empty trees be handled? Currently, the following code throws
an error when we try to print $s.
use Lingua::Treebank::Const;
my $s = Lingua::Treebank::Const->new->from_penn_string('()');
print $s;
The problem is that the is_terminal function called by stringify
throws an error for nodes that contain neither words nor children.
(You'll see the same error for a tree like '(TAG )'.)
Effectively, trees like '()' and '(TAG)' are ill-formed, even though
it's possible to create them by withering non-branching trees. Is
this the desired behavior? If not, stringify and is_terminal and
other functions should handle empty trees properly. If so, the code
should raise and exception as soon as an empty tree is created, so
that it can be handled by the caller in a systematic way.
Bug 2
-----
Opened by: Bill McNeill, 18 May 2005
Lingua::Treebank::Const->is_empty_root() returns false for empty roots
with more than one child. Is this the desired behavior? For example,
it does not detect the following parse (from sw2433.mrg) as having an
empty root
( (S
(NP-SBJ
(TYPO (EX There) ))
(NP-PRD
(NP (DT some) (NNS things) )
(SBAR
(WHNP-2 (-NONE- 0) )
(S
(NP-SBJ-1 (PRP I) )
(VP (MD 'd)
(VP (VB like)
(S
(NP-SBJ (-NONE- *-1) )
(VP (TO to)
(VP (VB try)
(NP (-NONE- *T*-2) ))))))))))
(, ,) (-DFL- E_S) )
because the empty top level has two children: S and ,.
Maybe is_empty_root() should raise an exception in cases like this.
Bug 3
-----
Opened by: Bill McNeill, 13 February 2006
There should be a generic exception raising mechanism for when
Lingua::Treebank::Const tries to parse something that isn't a Penn
treebank string.