mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
Clean up Morphology imports and definitions (#7441)
* Clean up Morphology imports and definitions * Whitespace formatting
This commit is contained in:
parent
ceee1ecf17
commit
ae855a4625
|
@ -1,14 +1,11 @@
|
||||||
from cymem.cymem cimport Pool
|
from cymem.cymem cimport Pool
|
||||||
from preshed.maps cimport PreshMap, PreshMapArray
|
from preshed.maps cimport PreshMap
|
||||||
from libc.stdint cimport uint64_t
|
|
||||||
from murmurhash cimport mrmr
|
|
||||||
cimport numpy as np
|
cimport numpy as np
|
||||||
|
from libc.stdint cimport uint64_t
|
||||||
|
|
||||||
from .structs cimport TokenC, MorphAnalysisC
|
from .structs cimport MorphAnalysisC
|
||||||
from .strings cimport StringStore
|
from .strings cimport StringStore
|
||||||
from .typedefs cimport hash_t, attr_t, flags_t
|
from .typedefs cimport attr_t, hash_t
|
||||||
from .parts_of_speech cimport univ_pos_t
|
|
||||||
from . cimport symbols
|
|
||||||
|
|
||||||
|
|
||||||
cdef class Morphology:
|
cdef class Morphology:
|
||||||
|
@ -16,14 +13,6 @@ cdef class Morphology:
|
||||||
cdef readonly StringStore strings
|
cdef readonly StringStore strings
|
||||||
cdef PreshMap tags # Keyed by hash, value is pointer to tag
|
cdef PreshMap tags # Keyed by hash, value is pointer to tag
|
||||||
|
|
||||||
cdef public object lemmatizer
|
|
||||||
cdef readonly object tag_map
|
|
||||||
cdef readonly object tag_names
|
|
||||||
cdef readonly object reverse_index
|
|
||||||
cdef readonly object _exc
|
|
||||||
cdef readonly PreshMapArray _cache
|
|
||||||
cdef readonly int n_tags
|
|
||||||
|
|
||||||
cdef MorphAnalysisC create_morph_tag(self, field_feature_pairs) except *
|
cdef MorphAnalysisC create_morph_tag(self, field_feature_pairs) except *
|
||||||
cdef int insert(self, MorphAnalysisC tag) except -1
|
cdef int insert(self, MorphAnalysisC tag) except -1
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,11 @@
|
||||||
# cython: infer_types
|
# cython: infer_types
|
||||||
from libc.string cimport memset
|
|
||||||
|
|
||||||
import srsly
|
|
||||||
from collections import Counter
|
|
||||||
import numpy
|
import numpy
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from .attrs cimport POS, IS_SPACE
|
from .attrs cimport POS
|
||||||
from .parts_of_speech cimport SPACE
|
|
||||||
from .lexeme cimport Lexeme
|
|
||||||
|
|
||||||
from .strings import get_string_id
|
|
||||||
from .attrs import LEMMA, intify_attrs
|
|
||||||
from .parts_of_speech import IDS as POS_IDS
|
from .parts_of_speech import IDS as POS_IDS
|
||||||
from .errors import Errors, Warnings
|
from .errors import Warnings
|
||||||
from .util import ensure_path
|
|
||||||
from . import symbols
|
from . import symbols
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user