mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-16 06:37:04 +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>
62 lines
1.4 KiB
Python
62 lines
1.4 KiB
Python
from typing import (
|
|
Union,
|
|
Any,
|
|
)
|
|
from thinc.types import Floats1d
|
|
from .tokens import Doc, Span, Token
|
|
from .vocab import Vocab
|
|
|
|
class Lexeme:
|
|
def __init__(self, vocab: Vocab, orth: int) -> None: ...
|
|
def __richcmp__(self, other: Lexeme, op: int) -> bool: ...
|
|
def __hash__(self) -> int: ...
|
|
def set_attrs(self, **attrs: Any) -> None: ...
|
|
def set_flag(self, flag_id: int, value: bool) -> None: ...
|
|
def check_flag(self, flag_id: int) -> bool: ...
|
|
def similarity(self, other: Union[Doc, Span, Token, Lexeme]) -> float: ...
|
|
@property
|
|
def has_vector(self) -> bool: ...
|
|
@property
|
|
def vector_norm(self) -> float: ...
|
|
vector: Floats1d
|
|
rank: str
|
|
sentiment: float
|
|
@property
|
|
def orth_(self) -> str: ...
|
|
@property
|
|
def text(self) -> str: ...
|
|
lower: str
|
|
norm: int
|
|
shape: int
|
|
prefix: int
|
|
suffix: int
|
|
cluster: int
|
|
lang: int
|
|
prob: float
|
|
lower_: str
|
|
norm_: str
|
|
shape_: str
|
|
prefix_: str
|
|
suffix_: str
|
|
lang_: str
|
|
flags: int
|
|
@property
|
|
def is_oov(self) -> bool: ...
|
|
is_stop: bool
|
|
is_alpha: bool
|
|
is_ascii: bool
|
|
is_digit: bool
|
|
is_lower: bool
|
|
is_upper: bool
|
|
is_title: bool
|
|
is_punct: bool
|
|
is_space: bool
|
|
is_bracket: bool
|
|
is_quote: bool
|
|
is_left_punct: bool
|
|
is_right_punct: bool
|
|
is_currency: bool
|
|
like_url: bool
|
|
like_num: bool
|
|
like_email: bool
|