mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 08:12:24 +03:00
Fix attrs.pyx, lexeme.pyx, symbols.pxd, isort issues.
This commit is contained in:
parent
09d1a332a1
commit
c32414c43b
|
@ -117,7 +117,7 @@ def intify_attrs(stringy_attrs, strings_map=None, _do_deprecated=False):
|
||||||
if "pos" in stringy_attrs:
|
if "pos" in stringy_attrs:
|
||||||
stringy_attrs["TAG"] = stringy_attrs.pop("pos")
|
stringy_attrs["TAG"] = stringy_attrs.pop("pos")
|
||||||
if "morph" in stringy_attrs:
|
if "morph" in stringy_attrs:
|
||||||
morphs = stringy_attrs.pop("morph")
|
morphs = stringy_attrs.pop("morph") # no-cython-lint
|
||||||
if "number" in stringy_attrs:
|
if "number" in stringy_attrs:
|
||||||
stringy_attrs.pop("number")
|
stringy_attrs.pop("number")
|
||||||
if "tenspect" in stringy_attrs:
|
if "tenspect" in stringy_attrs:
|
||||||
|
|
|
@ -34,7 +34,6 @@ from .typedefs cimport attr_t, flags_t
|
||||||
from .attrs import intify_attrs
|
from .attrs import intify_attrs
|
||||||
from .errors import Errors, Warnings
|
from .errors import Errors, Warnings
|
||||||
|
|
||||||
|
|
||||||
OOV_RANK = 0xffffffffffffffff # UINT64_MAX
|
OOV_RANK = 0xffffffffffffffff # UINT64_MAX
|
||||||
memset(&EMPTY_LEXEME, 0, sizeof(LexemeC))
|
memset(&EMPTY_LEXEME, 0, sizeof(LexemeC))
|
||||||
EMPTY_LEXEME.id = OOV_RANK
|
EMPTY_LEXEME.id = OOV_RANK
|
||||||
|
|
|
@ -12,16 +12,7 @@ import warnings
|
||||||
|
|
||||||
import srsly
|
import srsly
|
||||||
|
|
||||||
from ..attrs cimport (
|
from ..attrs cimport DEP, ENT_IOB, ID, LEMMA, MORPH, NULL_ATTR, POS, TAG
|
||||||
DEP,
|
|
||||||
ENT_IOB,
|
|
||||||
ID,
|
|
||||||
LEMMA,
|
|
||||||
MORPH,
|
|
||||||
NULL_ATTR,
|
|
||||||
POS,
|
|
||||||
TAG,
|
|
||||||
)
|
|
||||||
from ..structs cimport TokenC
|
from ..structs cimport TokenC
|
||||||
from ..tokens.doc cimport Doc, get_token_attr_for_matcher
|
from ..tokens.doc cimport Doc, get_token_attr_for_matcher
|
||||||
from ..tokens.morphanalysis cimport MorphAnalysis
|
from ..tokens.morphanalysis cimport MorphAnalysis
|
||||||
|
|
|
@ -12,12 +12,10 @@ from libcpp.vector cimport vector
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|
||||||
import srsly
|
|
||||||
from thinc.api import CupyOps, NumpyOps, set_dropout_rate
|
|
||||||
|
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
import numpy.random
|
import numpy.random
|
||||||
|
import srsly
|
||||||
|
from thinc.api import CupyOps, NumpyOps, set_dropout_rate
|
||||||
|
|
||||||
from ..ml.parser_model cimport (
|
from ..ml.parser_model cimport (
|
||||||
ActivationsC,
|
ActivationsC,
|
||||||
|
|
|
@ -92,7 +92,7 @@ cdef enum symbol_t:
|
||||||
ADV
|
ADV
|
||||||
AUX
|
AUX
|
||||||
CONJ
|
CONJ
|
||||||
CCONJ # U20
|
CCONJ # U20
|
||||||
DET
|
DET
|
||||||
INTJ
|
INTJ
|
||||||
NOUN
|
NOUN
|
||||||
|
@ -418,7 +418,7 @@ cdef enum symbol_t:
|
||||||
ccomp
|
ccomp
|
||||||
complm
|
complm
|
||||||
conj
|
conj
|
||||||
cop # U20
|
cop # U20
|
||||||
csubj
|
csubj
|
||||||
csubjpass
|
csubjpass
|
||||||
dep
|
dep
|
||||||
|
@ -441,8 +441,8 @@ cdef enum symbol_t:
|
||||||
num
|
num
|
||||||
number
|
number
|
||||||
oprd
|
oprd
|
||||||
obj # U20
|
obj # U20
|
||||||
obl # U20
|
obl # U20
|
||||||
parataxis
|
parataxis
|
||||||
partmod
|
partmod
|
||||||
pcomp
|
pcomp
|
||||||
|
|
Loading…
Reference in New Issue
Block a user