Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
honnibal committed Jan 13, 2025
1 parent 6c59f6c commit 685a386
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions spacy/tests/lang/ca/test_text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test that longer and mixed texts are tokenized correctly."""

import pytest


Expand Down
8 changes: 7 additions & 1 deletion spacy/tests/lang/ja/test_lemmatization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@

@pytest.mark.parametrize(
"word,lemma",
[("新しく", "新しい"), ("赤く", "赤い"), ("すごく", "すごい"), ("いただきました", "いただく"), ("なった", "なる")],
[
("新しく", "新しい"),
("赤く", "赤い"),
("すごく", "すごい"),
("いただきました", "いただく"),
("なった", "なる"),
],
)
def test_ja_lemmatizer_assigns(ja_tokenizer, word, lemma):
test_lemma = ja_tokenizer(word)[0].lemma_
Expand Down
7 changes: 6 additions & 1 deletion spacy/tests/lang/ja/test_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ def test_ja_tokenizer_sub_tokens(
[
(
"取ってつけた",
(["五段-ラ行;連用形-促音便"], [], ["下一段-カ行;連用形-一般"], ["助動詞-タ;終止形-一般"]),
(
["五段-ラ行;連用形-促音便"],
[],
["下一段-カ行;連用形-一般"],
["助動詞-タ;終止形-一般"],
),
(["トッ"], ["テ"], ["ツケ"], ["タ"]),
),
("2=3", ([], [], []), (["ニ"], ["_"], ["サン"])),
Expand Down
9 changes: 8 additions & 1 deletion spacy/tests/lang/ko/test_lemmatization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@


@pytest.mark.parametrize(
"word,lemma", [("새로운", "새롭"), ("빨간", "빨갛"), ("클수록", "크"), ("뭡니까", "뭣"), ("됐다", "되")]
"word,lemma",
[
("새로운", "새롭"),
("빨간", "빨갛"),
("클수록", "크"),
("뭡니까", "뭣"),
("됐다", "되"),
],
)
def test_ko_lemmatizer_assigns(ko_tokenizer, word, lemma):
test_lemma = ko_tokenizer(word)[0].lemma_
Expand Down
1 change: 1 addition & 0 deletions spacy/tests/lang/pl/test_text.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Words like numbers are recognized correctly."""

import pytest


Expand Down
2 changes: 1 addition & 1 deletion spacy/tests/training/test_pretraining.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def test_pretraining_tagger():


# Try to debug segfault on windows
#def test_pretraining_training():
# def test_pretraining_training():
# """Test that training can use a pretrained Tok2Vec model"""
# config = Config().from_str(pretrain_string_internal)
# nlp = util.load_model_from_config(config, auto_fill=True, validate=False)
Expand Down

0 comments on commit 685a386

Please sign in to comment.