Fix pronoun handling

Missed this case earlier.

連体詞 have three classes for UD purposes:

- その -> DET
- それ -> PRON
- 同じ -> ADJ

-POLM
This commit is contained in:
Paul O'Leary McCann 2017-08-22 00:01:49 +09:00
parent c435f748d7
commit 53e17296e9

View File

@ -51,9 +51,10 @@ def resolve_pos(token):
# PoS mappings.
if token.part_of_speech == '連体詞,*,*,*':
# determiner-likes get DET, otherwise ADJ
if re.match('^[こそあど此其彼]の', token.surface):
return token.part_of_speech + ',DET'
if re.match('^[こそあど此其彼]', token.surface):
return token.part_of_speech + ',PRON'
else:
return token.part_of_speech + ',ADJ'
return token.part_of_speech