mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-14 18:22:27 +03:00
Minor reformatting
This commit is contained in:
parent
792b86d333
commit
086601410f
|
@ -1,20 +1,8 @@
|
||||||
|
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional
|
||||||
|
from typing import Protocol, Sequence, Tuple, Union, overload
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import (
|
import numpy
|
||||||
Any,
|
|
||||||
Callable,
|
|
||||||
Dict,
|
|
||||||
Iterable,
|
|
||||||
Iterator,
|
|
||||||
List,
|
|
||||||
Optional,
|
|
||||||
Protocol,
|
|
||||||
Sequence,
|
|
||||||
Tuple,
|
|
||||||
Union,
|
|
||||||
overload,
|
|
||||||
)
|
|
||||||
|
|
||||||
import numpy as np
|
|
||||||
from cymem.cymem import Pool
|
from cymem.cymem import Pool
|
||||||
from thinc.types import Floats1d, Floats2d, Ints2d
|
from thinc.types import Floats1d, Floats2d, Ints2d
|
||||||
|
|
||||||
|
@ -40,7 +28,7 @@ class Doc:
|
||||||
user_hooks: Dict[str, Callable[..., Any]]
|
user_hooks: Dict[str, Callable[..., Any]]
|
||||||
user_token_hooks: Dict[str, Callable[..., Any]]
|
user_token_hooks: Dict[str, Callable[..., Any]]
|
||||||
user_span_hooks: Dict[str, Callable[..., Any]]
|
user_span_hooks: Dict[str, Callable[..., Any]]
|
||||||
tensor: np.ndarray[Any, np.dtype[np.float_]]
|
tensor: numpy.ndarray[Any, numpy.dtype[numpy.float_]]
|
||||||
user_data: Dict[str, Any]
|
user_data: Dict[str, Any]
|
||||||
has_unknown_spaces: bool
|
has_unknown_spaces: bool
|
||||||
_context: Any
|
_context: Any
|
||||||
|
@ -164,7 +152,7 @@ class Doc:
|
||||||
) -> Doc: ...
|
) -> Doc: ...
|
||||||
def to_array(
|
def to_array(
|
||||||
self, py_attr_ids: Union[int, str, List[Union[int, str]]]
|
self, py_attr_ids: Union[int, str, List[Union[int, str]]]
|
||||||
) -> np.ndarray[Any, np.dtype[np.float_]]: ...
|
) -> numpy.ndarray[Any, numpy.dtype[numpy.float_]]: ...
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_docs(
|
def from_docs(
|
||||||
docs: List[Doc],
|
docs: List[Doc],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
from typing import TYPE_CHECKING, Callable, Iterable, List, Optional, Union
|
||||||
import random
|
import random
|
||||||
import warnings
|
import warnings
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Callable, Iterable, List, Optional, Union
|
|
||||||
|
|
||||||
import srsly
|
import srsly
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user