Skip to content

Commit bfc9903

Browse files
committed
changed some values to true or false, rather than Yes or No
1 parent 5ffcece commit bfc9903

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pyjsonnlp/conversion.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def wrap_up_doc():
153153
# multi-token expressions
154154
if '-' in str_token_id:
155155
# this will be in the range token, not the word itself
156-
if token.get('misc', defaultdict()).get('NewPar') == 'Yes':
156+
if token.get('misc', defaultdict()).get('NewPar') == True:
157157
new_paragraph_mid_sentence()
158158
# ignore ranges otherwise during token parsing
159159
continue
@@ -166,7 +166,7 @@ def wrap_up_doc():
166166
'upos': token['upostag'], # universal pos
167167
'xpos': token['xpostag'], # language-specific pos
168168
'features': OrderedDict({
169-
'Overt': 'Yes'
169+
'Overt': True
170170
})
171171
}
172172
if token.get('feats'):
@@ -177,12 +177,12 @@ def wrap_up_doc():
177177
if 'Mseg' in t['misc']:
178178
t['morphemes'] = t['misc']['Mseg'].split('-')
179179
# new paragraph in the middle of a sentence
180-
if t['misc'].get('NewPar') == 'Yes':
180+
if t['misc'].get('NewPar') == True:
181181
new_paragraph_mid_sentence()
182182

183183
# non-overt tokens are represented as decimal ids in conll
184184
if '.' in str_token_id:
185-
t['features']['Overt'] = 'No'
185+
t['features']['Overt'] = False
186186

187187
# bookkeeping
188188
token_lookup[(sent_num, str_token_id)] = token_id

0 commit comments

Comments
 (0)