<commit_before>from cymem.cymem cimport Pool

from thinc.learner cimport LinearModel
from thinc.features cimport Extractor
from thinc.typedefs cimport atom_t, feat_t, weight_t, class_t

from .tokens cimport Tokens


cpdef enum PosTag:
    NONE
    ADJ
    ADP
    ADV
    CONJ
    DET
    NOUN
    NUM
    PDT
    POS
    PRON
    PRT
    PUNCT
    VERB


cdef class Tagger:
    cpdef readonly Extractor extractor
    cpdef readonly LinearModel model

    cpdef class_t predict(self, int i, Tokens tokens, class_t prev, class_t prev_prev) except 0
    cpdef bint tell_answer(self, class_t gold_tag) except *
 
    cdef Pool mem
    cdef class_t _guess
    cdef atom_t* _atoms
    cdef feat_t* _feats
    cdef weight_t* _values
    cdef weight_t* _scores
<commit_msg>* Add count_tags functionto pos.pyx, which should probably live in another file. Feature set achieves 97.9 on wsj19-21, 95.85 on onto web.<commit_after>from cymem.cymem cimport Pool

from thinc.learner cimport LinearModel
from thinc.features cimport Extractor
from thinc.typedefs cimport atom_t, feat_t, weight_t, class_t

from .tokens cimport Tokens


cdef class Tagger:
    cpdef readonly Extractor extractor
    cpdef readonly LinearModel model

    cpdef class_t predict(self, int i, Tokens tokens, class_t prev, class_t prev_prev) except 0
    cpdef bint tell_answer(self, class_t gold_tag) except *
 
    cdef Pool mem
    cdef class_t _guess
    cdef atom_t* _atoms
    cdef feat_t* _feats
    cdef weight_t* _values
    cdef weight_t* _scores

{'fraction_non_alphanumeric': 0.04087013843111404, 'fraction_numerical': 0.008569545154911009, 'mean_word_length': 3.324786324786325, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3570216', 'n_tokens_mistral': 559, 'n_tokens_neox': 519, 'n_words': 180}