mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-13 01:32:32 +03:00
fix: add required annotations
This commit is contained in:
parent
2d1e61449b
commit
967ce504fd
|
@ -3,12 +3,24 @@ from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple
|
||||||
from ..tokens import Doc, Span
|
from ..tokens import Doc, Span
|
||||||
from .alignment import Alignment
|
from .alignment import Alignment
|
||||||
|
|
||||||
def validate_examples(examples: Iterable[Example], method: str) -> None: ...
|
def annotations_to_doc(
|
||||||
|
vocab,
|
||||||
|
tok_annot,
|
||||||
|
doc_annot,
|
||||||
|
) -> Doc: ...
|
||||||
|
def validate_examples(
|
||||||
|
examples: Iterable[Example],
|
||||||
|
method: str,
|
||||||
|
) -> None: ...
|
||||||
def validate_get_examples(
|
def validate_get_examples(
|
||||||
get_examples: Callable[[], Iterable[Example]], method: str
|
get_examples: Callable[[], Iterable[Example]],
|
||||||
|
method: str,
|
||||||
): ...
|
): ...
|
||||||
|
|
||||||
class Example:
|
class Example:
|
||||||
|
x: Doc
|
||||||
|
y: Doc
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
predicted: Doc,
|
predicted: Doc,
|
||||||
|
@ -29,7 +41,7 @@ class Example:
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, predicted: Doc, example_dict: Dict) -> Example: ...
|
def from_dict(cls, predicted: Doc, example_dict: Dict) -> Example: ...
|
||||||
@property
|
@property
|
||||||
def alignment(self) -> Optional[Alignment]: ...
|
def alignment(self) -> Alignment: ...
|
||||||
def _get_aligned_vectorized(self, align, gold_values): ...
|
def _get_aligned_vectorized(self, align, gold_values): ...
|
||||||
def _get_aligned_non_vectorized(self, align, gold_values): ...
|
def _get_aligned_non_vectorized(self, align, gold_values): ...
|
||||||
def get_aligned(self, field, as_string=False): ...
|
def get_aligned(self, field, as_string=False): ...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user