mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 13:47:13 +03:00
439f30faad
* Add stub files for main API classes * Add contributor agreement for ezorita * Update types for ndarray and hash() * Fix __getitem__ and __iter__ * Add attributes of Doc and Token classes * Overload type hints for Span.__getitem__ * Fix type hint overload for Span.__getitem__ Co-authored-by: Luca Dorigo <dorigoluca@gmail.com>
21 lines
768 B
Python
21 lines
768 B
Python
from typing import Any, Dict, Iterator, List, Union
|
|
from ..vocab import Vocab
|
|
|
|
class MorphAnalysis:
|
|
def __init__(
|
|
self, vocab: Vocab, features: Union[Dict[str, str], str] = ...
|
|
) -> None: ...
|
|
@classmethod
|
|
def from_id(cls, vocab: Vocab, key: Any) -> MorphAnalysis: ...
|
|
def __contains__(self, feature: str) -> bool: ...
|
|
def __iter__(self) -> Iterator[str]: ...
|
|
def __len__(self) -> int: ...
|
|
def __hash__(self) -> int: ...
|
|
def __eq__(self, other: MorphAnalysis) -> bool: ...
|
|
def __ne__(self, other: MorphAnalysis) -> bool: ...
|
|
def get(self, field: Any) -> List[str]: ...
|
|
def to_json(self) -> str: ...
|
|
def to_dict(self) -> Dict[str, str]: ...
|
|
def __str__(self) -> str: ...
|
|
def __repr__(self) -> str: ...
|