mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-27 10:26:35 +03:00
e2b70df012
* Use isort with Black profile * isort all the things * Fix import cycles as a result of import sorting * Add DOCBIN_ALL_ATTRS type definition * Add isort to requirements * Remove isort from build dependencies check * Typo
50 lines
1.2 KiB
Python
50 lines
1.2 KiB
Python
from pathlib import Path
|
|
from typing import (
|
|
Any,
|
|
Callable,
|
|
Dict,
|
|
Iterable,
|
|
Iterator,
|
|
List,
|
|
NoReturn,
|
|
Optional,
|
|
Tuple,
|
|
Union,
|
|
)
|
|
|
|
from ..language import Language
|
|
from ..tokens.doc import Doc
|
|
from ..training import Example
|
|
|
|
class Pipe:
|
|
def __call__(self, doc: Doc) -> Doc: ...
|
|
def pipe(
|
|
self, stream: Iterable[Doc], *, batch_size: int = ...
|
|
) -> Iterator[Doc]: ...
|
|
def initialize(
|
|
self,
|
|
get_examples: Callable[[], Iterable[Example]],
|
|
*,
|
|
nlp: Language = ...,
|
|
) -> None: ...
|
|
def score(
|
|
self, examples: Iterable[Example], **kwargs: Any
|
|
) -> Dict[str, Union[float, Dict[str, float]]]: ...
|
|
@property
|
|
def is_trainable(self) -> bool: ...
|
|
@property
|
|
def labels(self) -> Tuple[str, ...]: ...
|
|
@property
|
|
def hide_labels(self) -> bool: ...
|
|
@property
|
|
def label_data(self) -> Any: ...
|
|
def _require_labels(self) -> None: ...
|
|
def set_error_handler(
|
|
self, error_handler: Callable[[str, "Pipe", List[Doc], Exception], NoReturn]
|
|
) -> None: ...
|
|
def get_error_handler(
|
|
self,
|
|
) -> Callable[[str, "Pipe", List[Doc], Exception], NoReturn]: ...
|
|
|
|
def deserialize_config(path: Path) -> Any: ...
|