Skip to content

Commit 809de1a

Browse files
committed
Slightly clarify an error (still a lot of work to do to make it human readable)
1 parent 3dc17ff commit 809de1a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stanza/models/pos/data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ def init_vocab(docs, args):
6767
wordvocab = WordVocab(data, args['shorthand'], cutoff=args['word_cutoff'], lower=True)
6868
uposvocab = WordVocab(data, args['shorthand'], idx=1)
6969
xposvocab = xpos_vocab_factory(data, args['shorthand'])
70-
featsvocab = FeatureVocab(data, args['shorthand'], idx=3)
70+
try:
71+
featsvocab = FeatureVocab(data, args['shorthand'], idx=3)
72+
except ValueError as e:
73+
raise ValueError("Unable to build features vocab. Please check the Features column of your data for an error which may match the following description.") from e
7174
vocab = MultiVocab({'char': charvocab,
7275
'word': wordvocab,
7376
'upos': uposvocab,

0 commit comments

Comments
 (0)