mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 00:46:28 +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 preshed.maps cimport PreshMap, PreshMapArray
|
||||
from libc.stdint cimport uint64_t
|
||||
from murmurhash cimport mrmr
|
||||
from preshed.maps cimport PreshMap
|
||||
cimport numpy as np
|
||||
from libc.stdint cimport uint64_t
|
||||
|
||||
from .structs cimport TokenC, MorphAnalysisC
|
||||
from .structs cimport MorphAnalysisC
|
||||
from .strings cimport StringStore
|
||||
from .typedefs cimport hash_t, attr_t, flags_t
|
||||
from .parts_of_speech cimport univ_pos_t
|
||||
from . cimport symbols
|
||||
from .typedefs cimport attr_t, hash_t
|
||||
|
||||
|
||||
cdef class Morphology:
|
||||
|
@ -16,14 +13,6 @@ cdef class Morphology:
|
|||
cdef readonly StringStore strings
|
||||
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 int insert(self, MorphAnalysisC tag) except -1
|
||||
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
# cython: infer_types
|
||||
from libc.string cimport memset
|
||||
|
||||
import srsly
|
||||
from collections import Counter
|
||||
import numpy
|
||||
import warnings
|
||||
|
||||
from .attrs cimport POS, IS_SPACE
|
||||
from .parts_of_speech cimport SPACE
|
||||
from .lexeme cimport Lexeme
|
||||
from .attrs cimport POS
|
||||
|
||||
from .strings import get_string_id
|
||||
from .attrs import LEMMA, intify_attrs
|
||||
from .parts_of_speech import IDS as POS_IDS
|
||||
from .errors import Errors, Warnings
|
||||
from .util import ensure_path
|
||||
from .errors import Warnings
|
||||
from . import symbols
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user