Apply ruff formatting to 8 files
This commit is contained in:
@@ -207,7 +207,9 @@ def find_threshold(
|
||||
),
|
||||
)
|
||||
if hasattr(pipe, "cfg"):
|
||||
nlp.get_pipe(pipe_name).cfg = set_nested_item(pipe.cfg, config_keys, threshold)
|
||||
nlp.get_pipe(pipe_name).cfg = set_nested_item(
|
||||
pipe.cfg, config_keys, threshold
|
||||
)
|
||||
|
||||
eval_scores = nlp.evaluate(dev_dataset)
|
||||
if scores_key not in eval_scores:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from thinc.api import Model, normal_init
|
||||
|
||||
|
||||
|
||||
def PrecomputableAffine(nO, nI, nF, nP, dropout=0.1):
|
||||
model = Model(
|
||||
"precomputable_affine",
|
||||
|
||||
@@ -4,7 +4,6 @@ from thinc.api import Model, to_numpy
|
||||
from thinc.types import Ints1d, Ragged
|
||||
|
||||
|
||||
|
||||
def extract_spans() -> Model[Tuple[Ragged, Ragged], Ragged]:
|
||||
"""Extract spans from a sequence of source arrays, as specified by an array
|
||||
of (start, end) indices. The output is a ragged array of the
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
def test_bg_tokenizer_handles_final_diacritics(bg_tokenizer):
|
||||
text = "Ня̀маше яйца̀. Ня̀маше яйца̀."
|
||||
tokens = bg_tokenizer(text)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
def test_la_tokenizer_handles_exc_in_text(la_tokenizer):
|
||||
text = "scio te omnia facturum, ut nobiscum quam primum sis"
|
||||
tokens = la_tokenizer(text)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
def test_long_text(sl_tokenizer):
|
||||
# Excerpt: European Convention on Human Rights
|
||||
text = """
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
def test_long_text(sq_tokenizer):
|
||||
# Excerpt: European Convention on Human Rights
|
||||
text = """
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
def test_long_text(xx_tokenizer):
|
||||
# Excerpt: Text in Skolt Sami taken from https://www.samediggi.fi
|
||||
text = """
|
||||
|
||||
Reference in New Issue
Block a user