mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Fix pronoun handling
Missed this case earlier. 連体詞 have three classes for UD purposes: - その -> DET - それ -> PRON - 同じ -> ADJ -POLM
This commit is contained in:
parent
c435f748d7
commit
53e17296e9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user