Skip to content

Commit 2235cb4

Browse files
author
Vincent Kriz
committed
ASCII trees renamed to TextModeTrees to be consistent with the rest of the project. Removed empty lines from zellig-harris/baseline.
1 parent e0cc264 commit 2235cb4

2 files changed

Lines changed: 7 additions & 31 deletions

File tree

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
from udapi.core.block import Block
88

99

10+
# TODO
11+
# Implement parameters, colors and nonprojectivities according to the Perl implementation
12+
# https://github.com/udapi/udapi-perl/blob/master/lib/Udapi/Block/Write/TextModeTrees.pm
13+
1014
def get_number_of_antecedents(node):
1115
"""
1216
Return a number of antecedents.
@@ -74,13 +78,13 @@ def print_tree(root_node):
7478
print ' %s|' % offset
7579

7680

77-
class AsciiTree(Block):
81+
class TextModeTrees(Block):
7882
"""
7983
A pretty ACSII printer of the dependency trees.
8084
8185
"""
8286
def __init__(self, args=None):
83-
super(AsciiTree, self).__init__(args)
87+
super(TextModeTrees, self).__init__(args)
8488
if args is None:
8589
args = {}
8690

udapi/block/zellig_harris/baseline.py

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, args=None):
5656

5757
self.suffixed_forms = False
5858
if 'suffixed_form' in args and args['suffixed_forms'] == '1':
59-
self.suffixed_forms == True
59+
self.suffixed_forms = True
6060

6161
def process_node(self, node):
6262
"""
@@ -114,31 +114,3 @@ def process_node(self, node):
114114

115115
if has_preposition:
116116
print "%s %s_%s" % (node_form, child_form, 'prep')
117-
118-
119-
120-
121-
122-
123-
124-
125-
126-
127-
128-
129-
130-
131-
132-
133-
134-
135-
136-
137-
138-
139-
140-
141-
142-
143-
144-

0 commit comments

Comments
 (0)