88COLOR_OF = {
99 'form' : 'yellow' ,
1010 'lemma' : 'cyan' ,
11- 'upostag ' : 'red' ,
11+ 'upos ' : 'red' ,
1212 'deprel' : 'blue' ,
1313 'ord' : 'yellow' ,
1414}
@@ -60,7 +60,7 @@ class TextModeTrees(BaseWriter):
6060 """
6161
6262 def __init__ (self , print_sent_id = False , print_sentence = False , add_empty_line = True , indent = 1 ,
63- minimize_cross = True , color = 'auto' , attributes = 'form,upostag ,deprel' ,
63+ minimize_cross = True , color = 'auto' , attributes = 'form,upos ,deprel' ,
6464 print_undef_as = '' , ** kwargs ):
6565 '''Create new TextModeTrees block object.
6666
@@ -79,16 +79,16 @@ def __init__(self, print_sent_id=False, print_sentence=False, add_empty_line=Tru
7979 If you plan to pipe the output (e.g. to "less -R") and you want the colors,
8080 you need to set explicitly color=1, see the example in Synopsis.
8181 attributes: A comma-separated list of node attributes which should be printed. Possible
82- values are ord, form, lemma, upostag, xpostag , feats, deprel, deps, misc.
82+ values are ord, form, lemma, upos, xpos , feats, deprel, deps, misc.
8383 print_undef_as: What should be printed instead of undefined attribute values (if any)?
8484 '''
8585 super ().__init__ (** kwargs )
8686 self .print_sent_id = print_sent_id
8787 self .print_sentence = print_sentence
8888 self .add_empty_line = add_empty_line
89- self .indent = indent
89+ self .indent = indent
9090 self .minimize_cross = minimize_cross
91- self .color = color
91+ self .color = color
9292 self .attributes = attributes
9393 self .print_undef_as = print_undef_as
9494
@@ -118,7 +118,7 @@ def _compute_gaps(self, node):
118118 lm , rm , de = self ._compute_gaps (child )
119119 lmost = min (lm , lmost )
120120 rmost = max (rm , rmost )
121- descs += de ;
121+ descs += de
122122 self ._gaps [node .ord ] = rmost - lmost - descs
123123 return lmost , rmost , descs + 1
124124
0 commit comments