mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +03:00
Fix missing imports
This commit is contained in:
parent
0fc13b2f14
commit
7c6854d8d4
|
@ -1,8 +1,9 @@
|
|||
# cython: infer_types=True, profile=True, binding=True
|
||||
from typing import List
|
||||
import numpy
|
||||
import srsly
|
||||
|
||||
from thinc.api import Model, set_dropout_rate, SequenceCategoricalCrossentropy, Config
|
||||
from thinc.types import Floats2d
|
||||
import warnings
|
||||
|
||||
from ..tokens.doc cimport Doc
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from typing import Iterable, Tuple, Optional, Dict, List, Callable, Iterator, Any
|
||||
from thinc.api import get_array_module, Model, Optimizer, set_dropout_rate, Config
|
||||
from thinc.types import Floats2d
|
||||
import numpy
|
||||
|
||||
from .pipe import Pipe
|
||||
|
@ -69,7 +70,10 @@ subword_features = true
|
|||
default_score_weights={"cats_score": 1.0},
|
||||
)
|
||||
def make_textcat(
|
||||
nlp: Language, name: str, model: Model[List[Doc], List[Floats2d]], labels: Iterable[str]
|
||||
nlp: Language,
|
||||
name: str,
|
||||
model: Model[List[Doc], List[Floats2d]],
|
||||
labels: Iterable[str],
|
||||
) -> "TextCategorizer":
|
||||
"""Create a TextCategorizer compoment. The text categorizer predicts categories
|
||||
over a whole document. It can learn one or more labels, and the labels can
|
||||
|
|
Loading…
Reference in New Issue
Block a user