class_docstr: The scoring function of Trotman et al. [5]_.
  
  Examples
  --------
  .. sourcecode:: pycon
  
      >>> from gensim.corpora import Dictionary
      >>> from gensim.models import AtireBM25Model
      >>> from gensim.test.utils import common_texts
      >>>
      >>> dictionary = Dictionary(common_texts)  # fit dictionary
      >>> corpus = [dictionary.doc2bow(line) for line in common_texts]  # convert corpus to BoW format
      >>>
      >>> model = AtireBM25Model(dictionary=dictionary)  # fit model
      >>> vector = model[corpus[0]]  # apply model to the first corpus document
  
  References
  ----------
  .. [5] Trotman, A., Jia X., Crane M., `Towards an Efficient and Effective Search Engine
     <http://www.cs.otago.ac.nz/homepages/andrew/involvement/2012-SIGIR-OSIR.pdf#page=45>`_,
     In: SIGIR 2012 Workshop on Open Source Information Retrieval. 40–47.
class_docstr_tok: ["The","scoring","function","of","Trotman","et","al",".","[","5","]","_",".","Examples","--","--","--","--","..","sourcecode",":",":","pycon",">",">",">","from","gensim.corpora","import","Dictionary",">",">",">","from","gensim.models","import","AtireBM25Model",">",">",">","from","gensim.test.utils","import","common_texts",">",">",">",">",">",">","dictionary","=","Dictionary","(","common_texts",")","#","fit","dictionary",">",">",">","corpus","=","[","dictionary.doc2bow","(","line",")","for","line","in","common_texts","]","#","convert","corpus","to","BoW","format",">",">",">",">",">",">","model","=","AtireBM25Model","(","dictionary=dictionary",")","#","fit","model",">",">",">","vector","=","model","[","corpus","[","0","]","]","#","apply","model","to","the","first","corpus","document","References","--","--","--","--","--","..","[","5","]","Trotman",",","A.",",","Jia","X.",",","Crane","M.",",","`","Towards","an","Efficient","and","Effective","Search","Engine","<","http",":","\/\/www.cs.otago.ac.nz\/homepages\/andrew\/involvement\/2012-SIGIR-OSIR.pdf","#","page=45",">","`","_",",","In",":","SIGIR","2012","Workshop","on","Open","Source","Information","Retrieval",".","40\u201347","."]
code: def get_term_weights(self, num_tokens, term_frequencies, idfs):
      term_weights = idfs * (
          term_frequencies
          * (self.k1 + 1)
          / (
              term_frequencies
              + self.k1
              * (1 - self.b + self.b * num_tokens / self.avgdl)
          )
      )
      return term_weights
  
imports: from abc import ABCMeta, abstractmethod
  from collections import defaultdict
  import logging
  import math
  from gensim import interfaces, utils
  import numpy
label_desc: Use image node_id 3 for calling the AtireBM25Model obj's underlying member method code with example usage: obj.get_term_weights(num_tokens, term_frequencies, idfs) and returns: term_weights