mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +03:00
Update spacy/lang/la/syntax_iterators.py
Reorganize la syntax iterators Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
This commit is contained in:
parent
2dd2b41124
commit
f7e4812cbd
|
@ -1,11 +1,9 @@
|
||||||
# NB: Modified from da on suggestion from https://github.com/explosion/spaCy/issues/7457#issuecomment-800349751 [PJB]
|
|
||||||
|
|
||||||
from typing import Union, Iterator, Tuple
|
from typing import Union, Iterator, Tuple
|
||||||
from ...tokens import Doc, Span
|
from ...tokens import Doc, Span
|
||||||
from ...symbols import NOUN, PROPN, PRON, VERB, AUX
|
from ...symbols import NOUN, PROPN, PRON, VERB, AUX
|
||||||
from ...errors import Errors
|
from ...errors import Errors
|
||||||
|
|
||||||
|
# NB: Modified from da on suggestion from https://github.com/explosion/spaCy/issues/7457#issuecomment-800349751 [PJB]
|
||||||
def noun_chunks(doclike: Union[Doc, Span]) -> Iterator[Tuple[int, int, int]]:
|
def noun_chunks(doclike: Union[Doc, Span]) -> Iterator[Tuple[int, int, int]]:
|
||||||
def is_verb_token(tok):
|
def is_verb_token(tok):
|
||||||
return tok.pos in [VERB, AUX]
|
return tok.pos in [VERB, AUX]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user