mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 13:44:55 +03:00
Add examples to docs. Rename _nlp to nlp in tests.
This commit is contained in:
parent
3f9d879bfe
commit
dd84d651c9
|
@ -883,7 +883,7 @@ def test_cli_find_threshold(capsys):
|
|||
},
|
||||
),
|
||||
]:
|
||||
doc = _nlp.make_doc(t[0])
|
||||
doc = nlp.make_doc(t[0])
|
||||
docs.append(Example.from_dict(doc, t[1]))
|
||||
|
||||
return docs
|
||||
|
|
|
@ -1175,9 +1175,18 @@ thresholds - e.g. `textcat_multilabel` and `spancat`, but not `textcat`. Note
|
|||
that the full path to the corresponding threshold attribute in the config has to
|
||||
be provided.
|
||||
|
||||
```cli
|
||||
$ python -m spacy find-threshold [model] [data_path] [pipe_name] [threshold_key] [scores_key] [--n_trials] [--code] [--use-gpu] [--gold-preproc] [--verbose]
|
||||
```
|
||||
> #### Examples
|
||||
>
|
||||
> ```cli
|
||||
> # For textcat_multilabel:
|
||||
> $ python -m spacy find-threshold my_nlp data.spacy textcat_multilabel threshold cats_macro_f
|
||||
> ```
|
||||
>
|
||||
> ```cli
|
||||
> # For spancat:
|
||||
> $ python -m spacy find-threshold my_nlp data.spacy spancat threshold spans_sc_f
|
||||
> ```
|
||||
|
||||
|
||||
| Name | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
|
|
Loading…
Reference in New Issue
Block a user