mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-04 06:16:33 +03:00
Make Doc.activations type visible to MyPy
This commit is contained in:
parent
acf47e8e48
commit
42526a6fa1
|
@ -1,7 +1,7 @@
|
||||||
from typing import Callable, Protocol, Iterable, Iterator, Optional
|
from typing import Callable, Protocol, Iterable, Iterator, Optional
|
||||||
from typing import Union, Tuple, List, Dict, Any, overload
|
from typing import Union, Tuple, List, Dict, Any, overload
|
||||||
from cymem.cymem import Pool
|
from cymem.cymem import Pool
|
||||||
from thinc.types import Floats1d, Floats2d, Ints2d
|
from thinc.types import ArrayXd, Floats1d, Floats2d, Ints2d
|
||||||
from .span import Span
|
from .span import Span
|
||||||
from .token import Token
|
from .token import Token
|
||||||
from ._dict_proxies import SpanGroups
|
from ._dict_proxies import SpanGroups
|
||||||
|
@ -22,6 +22,7 @@ class Doc:
|
||||||
max_length: int
|
max_length: int
|
||||||
length: int
|
length: int
|
||||||
sentiment: float
|
sentiment: float
|
||||||
|
activations: Dict[str, Dict[str, ArrayXd]]
|
||||||
cats: Dict[str, float]
|
cats: Dict[str, float]
|
||||||
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]]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user