Commit Graph

14344 Commits

Author SHA1 Message Date
Sofie Van Landeghem 932887b950
textcat scoring fix and multi_label docs (#6974)
* add multi-label textcat to menu

* add infobox on textcat API

* add info to v3 migration guide

* small edits

* further fixes in doc strings

* add infobox to textcat architectures

* add textcat_multilabel to overview of built-in components

* spelling

* fix unrelated warn msg

* Add textcat_multilabel to quickstart [ci skip]

* remove separate documentation page for multilabel_textcategorizer

* small edits

* positive label clarification

* avoid duplicating information in self.cfg and fix textcat.score

* fix multilabel textcat too

* revert threshold to storage in cfg

* revert threshold stuff for multi-textcat

Co-authored-by: Ines Montani <ines@ines.io>
2021-03-09 23:04:22 +11:00
Sofie Van Landeghem 39de3602e0
return custom error in nlp.initialize (#7104)
* return custom error in nlp.initialize

* Rename error

Co-authored-by: Ines Montani <ines@ines.io>
2021-03-09 23:01:31 +11:00
Adriane Boyd 3f3e8110dc
Fix lowercase augmentation (#7336)
* Fix aborted/skipped augmentation for `spacy.orth_variants.v1` if
lowercasing was enabled for an example
* Simplify `spacy.orth_variants.v1` for `Example` vs. `GoldParse`
* Preserve reference tokenization in `spacy.lower_case.v1`
2021-03-09 14:02:32 +11:00
Sofie Van Landeghem cd70c3cb79
Fixing pretrain (#7342)
* initialize NLP with train corpus

* add more pretraining tests

* more tests

* function to fetch tok2vec layer for pretraining

* clarify parameter name

* test different objectives

* formatting

* fix check for static vectors when using vectors objective

* clarify docs

* logger statement

* fix init_tok2vec and proc.initialize order

* test training after pretraining

* add init_config tests for pretraining

* pop pretraining block to avoid config validation errors

* custom errors
2021-03-09 14:01:13 +11:00
Adriane Boyd 97bcf2ae3a
Fix patience for identical scores (#7250)
* Fix patience for identical scores

Fix training patience so that the earliest best step is chosen for
identical max scores.

* Restore break, remove print

* Explicitly define best_step for clarity
2021-03-06 18:42:14 +11:00
Ines Montani dfb23a419e Merge branch 'spacy.io' [ci skip] 2021-03-06 17:38:54 +11:00
Ines Montani 23eef78a4a
Merge pull request #7308 from graue70/patch-1 [ci skip]
Fix typo in docs
2021-03-06 17:38:03 +11:00
graue70 7d085d5b1c
Fix typo in docs 2021-03-05 18:30:09 +01:00
vincent d warmerdam 1b0d413e45
Removed Languages that were listed twice on Docs (#7272)
* removed languages that were listed twice

* sorted

* d0h

* the d0h strikes back when you dont hit save
2021-03-05 14:31:15 +01:00
Ines Montani ea555b03e0
Merge pull request #7255 from adrianeboyd/bugfix/extraneous-tok2vec
Omit unused tok2vec/transformer components
2021-03-03 23:15:06 +11:00
Ines Montani ada4cdbd71
Merge pull request #7257 from svlandeg/fix/registry_consistency 2021-03-03 23:14:19 +11:00
svlandeg 682a6232e3 fix typo 2021-03-02 17:59:13 +01:00
svlandeg d900c55061 consistently use registry as callable 2021-03-02 17:56:28 +01:00
Adriane Boyd 8a4200d4e9 Omit unused tok2vec/transformer components
Omit unused tok2vec/transformer components in quickstart template.
2021-03-02 15:53:30 +01:00
Sofie Van Landeghem 212f0e779e
Support doc.spans in Example.from_dict (#7197)
* add support for spans in Example.from_dict

* add unit tests

* update error to E879
2021-03-03 01:12:54 +11:00
Adriane Boyd fb98862337
Add hint for --gpu-id to CLI device info (#7234)
* Add hint for --gpu-id to CLI device info

If the user has `cupy` and an available GPU, add a hint about using
`--gpu-id 0` to the CLI output.

* Undo change to original CPU message
2021-03-03 01:11:18 +11:00
Ines Montani d723382caa
Merge pull request #7251 from graue70/patch-1 [ci skip]
Fix copy & paste error in API docs
2021-03-03 00:06:44 +11:00
Ines Montani c4e4147d12
Merge pull request #7247 from svlandeg/fix/pins 2021-03-03 00:06:09 +11:00
Ines Montani 635ae55b74
Merge pull request #7237 from adrianeboyd/bugfix/is-cython-func-7224 2021-03-03 00:05:16 +11:00
graue70 0fddc0447c
Fix copy & paste error in API docs 2021-03-02 14:00:14 +01:00
svlandeg d879d30aea raise hypothesis pin 2021-03-02 13:20:17 +01:00
svlandeg b1945f4e73 sync pins with thinc 2021-03-02 12:06:59 +01:00
Adriane Boyd 0efb7413f9 Use make_tempdir instead 2021-03-01 17:54:14 +01:00
Adriane Boyd e9f7f9a4bc Fix is_cython_func for additional imported code
* Fix `is_cython_func` for imported code loaded under `python_code`
module name
* Add `make_named_tempfile` context manager to test utils to test
loading of imported code
* Add test for validation of `initialize` params in custom module
2021-03-01 16:37:39 +01:00
Sofie Van Landeghem dd99872bb0
Fix spans weak ref in doc copy (#7225)
* failing unit test

* ensure that doc.spans refers to the copied doc, not the old

* add type info
2021-02-28 12:32:48 +11:00
Ines Montani 9f204b354b
Merge pull request #7204 from adrianeboyd/bugfix/include-dirs-distutils
Set include_dirs in Extension
2021-02-27 11:51:33 +11:00
Ines Montani 8f7c7b2658
Merge pull request #7211 from svlandeg/docs/el_update [ci skip]
kb.get_candidates renamed to get_alias_candidates
2021-02-27 11:51:22 +11:00
Ines Montani 408b94887a
Merge pull request #7207 from adrianeboyd/docs/get-noun-chunks [ci skip]
Extend docs related to Vocab.get_noun_chunks
2021-02-27 11:51:08 +11:00
Ines Montani dc46fa078f
Merge pull request #7220 from svlandeg/docs/has_annotation [ci skip]
has_annotation docs fix
2021-02-27 11:50:34 +11:00
Ines Montani 0dbc2a1b16
Merge pull request #7222 from adrianeboyd/bugfix/quickstart-recs-bg-bn
Fix formatting in bg/bn quickstart recs
2021-02-27 11:50:02 +11:00
Ines Montani fb0f095d0a
Merge pull request #7223 from svlandeg/ux/wandb_import
import wandb failure - UX
2021-02-27 11:49:20 +11:00
svlandeg 2010219a7f import wandb failure - UX 2021-02-26 18:00:39 +01:00
Adriane Boyd ee7bb0b393 Fix formatting in bg/bn quickstart recs 2021-02-26 17:08:37 +01:00
svlandeg 248339039e fix type in docs 2021-02-26 14:27:10 +01:00
Adriane Boyd e43d43db32
Allow sourcing disabled components (#7215)
Check `component_names` instead of `pipe_names` to allow sourcing
disabled components.
2021-02-26 13:50:56 +01:00
Adriane Boyd 10c930cc96
Re-refactor Sentencizer with Pipe API (#7176)
Reapply the refactoring (#4721) so that `Sentencizer` uses the faster
`predict` and `set_annotations` for both `__call__` and `pipe`.
2021-02-26 09:48:14 +01:00
svlandeg 08fd901a1b kb.get_candidates renamed to get_alias_candidates 2021-02-25 20:09:36 +01:00
Adriane Boyd 6a37f343d5 Extend docs related to Vocab.get_noun_chunks 2021-02-25 16:38:21 +01:00
Adriane Boyd 3abfa994d1 Set include_dirs in Extension
Set the `include_dirs` in each `Extension` rather than in `setup()` to
handle the case where there is a custom `distutils.cfg` that modifies
the include paths, in particular for python from homebrew.
2021-02-25 11:26:11 +01:00
Ines Montani 592678fb7d
Merge pull request #7073 from adrianeboyd/feature/logger-level-in-formatter
Add time and level to default logging formatter
2021-02-24 22:40:46 +11:00
Ines Montani d2c515354b Auto-format [ci skip] 2021-02-24 22:37:32 +11:00
Ines Montani 9e8a7e08c1
Merge pull request #7115 from SergeyShk/ruts [ci skip] 2021-02-24 22:37:00 +11:00
Ines Montani 24cecbb3f4
Merge pull request #7126 from adrianeboyd/docs/gpu-id-opt [ci skip]
Add tip about --gpu-id to training quickstart
2021-02-24 22:34:17 +11:00
Sofie Van Landeghem 0563cd73d6
Fix SpanGroup import (#7182)
* import SpanGroup from tokens module

* revert edits from different PR

* add to __all__
2021-02-24 21:06:16 +11:00
Ken fa7ddc7f88
Update sentencizer documentation example with sentencizer pipe name (#7185) 2021-02-24 08:06:54 +01:00
Tocic b1996a51a1
fix typo in models.md (#7157) 2021-02-22 09:00:38 +01:00
Sofie Van Landeghem b92f81d5da
fix NEL config and IO, and n_sents functionality (#7100)
* fix NEL config and IO, and n_sents functionality

* add docs

* fix test
2021-02-22 14:49:52 +11:00
Sofie Van Landeghem 113e8d082b
only evaluate named entities for NEL if there is a corresponding gold span (#7074) 2021-02-22 11:06:50 +11:00
Adriane Boyd 264862c67a
Fix Ukrainian lemmatizer init (#7127)
Fix class variable and init for `UkrainianLemmatizer` so that it loads
the `uk` dictionaries rather than having the parent `RussianLemmatizer`
override with the `ru` settings.
2021-02-22 11:05:08 +11:00
Sofie Van Landeghem ba5a50f62b
NEL docs & UX (#7129)
* EL set_kb docs fix

* custom warning for set_kb mistake
2021-02-22 11:04:22 +11:00