:mod:`capreolus.extractor.bagofwords` ===================================== .. py:module:: capreolus.extractor.bagofwords Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: capreolus.extractor.bagofwords.BagOfWords .. data:: logger .. py:class:: BagOfWords Bases: :class:`capreolus.extractor.Extractor` Bag of Words (or bag of trigrams when `datamode=trigram`) extractor. Used with the DSSM reranker. .. attribute:: module_name :annotation: = bagofwords .. attribute:: dependencies .. attribute:: config_spec .. attribute:: pad :annotation: = 0 .. attribute:: pad_tok :annotation: = .. method:: load_state(self, qids, docids) .. method:: cache_state(self, qids, docids) .. method:: get_trigrams_for_toks(self, toks_list) .. method:: exist(self) .. method:: preprocess(self, qids, docids, topics) .. method:: id2vec(self, q_id, posdoc_id, negdoc_id=None) .. method:: transform_txt(self, term_list, maxlen)