Skip to content

Commit

Permalink
quick fix to cast type
Browse files Browse the repository at this point in the history
  • Loading branch information
SecroLoL committed Jan 12, 2024
1 parent 02215ce commit 3261caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stanza/models/lemma_classifier/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def load_dataset(data_path: str, batch_size=DEFAULT_BATCH_SIZE, get_counts: bool
sentences, indices, labels, upos_ids, counts, upos_to_id = [], [], [], [], Counter(), defaultdict(str)
for i, line in enumerate(f.readlines()):
split = line.split(" ")
num_tokens = split[-1]
num_tokens = int(split[-1])
sentence = split[: num_tokens]
upos_tags = split[num_tokens: num_tokens * 2]
tgt_idx = int(split[-3])
Expand Down

0 comments on commit 3261caf

Please sign in to comment.