MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / __init__

Method __init__

numpy_ml/tests/test_ngram.py:108–123  ·  view source on GitHub ↗
(
        self, N, K=1, unk=True, filter_stopwords=True, filter_punctuation=True
    )

Source from the content-addressed store, hash-verified

106
107class AdditiveGold:
108 def __init__(
109 self, N, K=1, unk=True, filter_stopwords=True, filter_punctuation=True
110 ):
111 self.N = N
112 self.K = K
113 self.unk = unk
114 self.filter_stopwords = filter_stopwords
115 self.filter_punctuation = filter_punctuation
116
117 self.hyperparameters = {
118 "N": N,
119 "K": K,
120 "unk": unk,
121 "filter_stopwords": filter_stopwords,
122 "filter_punctuation": filter_punctuation,
123 }
124
125 def train(self, corpus_fp, vocab=None, encoding=None):
126 N = self.N

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected