Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Taka008 committed Aug 8, 2023
1 parent 28f31e9 commit 9741fc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/kwja/modules/seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def predict_step(self, batch: Any, batch_idx: int, dataloader_idx: int = 0) -> A
if self.use_forced_decoding
else None,
**self.hparams.decoding,
) # (b, max_tgt_len)
)
return {
"example_ids": batch["example_ids"] if "example_ids" in batch else [],
"seq2seq_predictions": generations,
Expand Down
1 change: 1 addition & 0 deletions src/kwja/utils/seq2seq_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def format_to_sent(self, text: str) -> Sentence:
)
canon = f'"代表表記:{canon}"' if canon != NO_CANON_TOKEN else "NIL"

# 例外処理
if surf == " " and reading == "\u3000" and lemma == "\u3000":
surf = "\u3000"

Check warning on line 153 in src/kwja/utils/seq2seq_format.py

View check run for this annotation

Codecov / codecov/patch

src/kwja/utils/seq2seq_format.py#L153

Added line #L153 was not covered by tests
if surf == "°C":
Expand Down

0 comments on commit 9741fc1

Please sign in to comment.