class_docstr: Objects of this class allow for building and maintaining a model for topic coherence.
  
  Examples
  ---------
  One way of using this feature is through providing a trained topic model. A dictionary has to be explicitly provided
  if the model does not contain a dictionary already
  
  .. sourcecode:: pycon
  
      >>> from gensim.test.utils import common_corpus, common_dictionary
      >>> from gensim.models.ldamodel import LdaModel
      >>> from gensim.models.coherencemodel import CoherenceModel
      >>>
      >>> model = LdaModel(common_corpus, 5, common_dictionary)
      >>>
      >>> cm = CoherenceModel(model=model, corpus=common_corpus, coherence='u_mass')
      >>> coherence = cm.get_coherence()  # get coherence value
  
  Another way of using this feature is through providing tokenized topics such as:
  
  .. sourcecode:: pycon
  
      >>> from gensim.test.utils import common_corpus, common_dictionary
      >>> from gensim.models.coherencemodel import CoherenceModel
      >>> topics = [
      ...     ['human', 'computer', 'system', 'interface'],
      ...     ['graph', 'minors', 'trees', 'eps']
      ... ]
      >>>
      >>> cm = CoherenceModel(topics=topics, corpus=common_corpus, dictionary=common_dictionary, coherence='u_mass')
      >>> coherence = cm.get_coherence()  # get coherence value
class_docstr_tok: ["Objects","of","this","class","allow","for","building","and","maintaining","a","model","for","topic","coherence",".","Examples","--","--","--","--","-","One","way","of","using","this","feature","is","through","providing","a","trained","topic","model",".","A","dictionary","has","to","be","explicitly","provided","if","the","model","does","not","contain","a","dictionary","already","..","sourcecode",":",":","pycon",">",">",">","from","gensim.test.utils","import","common_corpus",",","common_dictionary",">",">",">","from","gensim.models.ldamodel","import","LdaModel",">",">",">","from","gensim.models.coherencemodel","import","CoherenceModel",">",">",">",">",">",">","model","=","LdaModel","(","common_corpus",",","5",",","common_dictionary",")",">",">",">",">",">",">","cm","=","CoherenceModel","(","model=model",",","corpus=common_corpus",",","coherence='u_mass","'",")",">",">",">","coherence","=","cm.get_coherence","(",")","#","get","coherence","value","Another","way","of","using","this","feature","is","through","providing","tokenized","topics","such","as",":","..","sourcecode",":",":","pycon",">",">",">","from","gensim.test.utils","import","common_corpus",",","common_dictionary",">",">",">","from","gensim.models.coherencemodel","import","CoherenceModel",">",">",">","topics","=","[","...","[","'human","'",",","'computer","'",",","'system","'",",","'interface","'","]",",","...","[","'graph","'",",","'minors","'",",","'trees","'",",","'eps","'","]","...","]",">",">",">",">",">",">","cm","=","CoherenceModel","(","topics=topics",",","corpus=common_corpus",",","dictionary=common_dictionary",",","coherence='u_mass","'",")",">",">",">","coherence","=","cm.get_coherence","(",")","#","get","coherence","value"]
docstr: Accumulate word occurrences and co-occurrences from texts or corpus using the optimal method for the chosen
  coherence metric.
  
  Notes
  -----
  This operation may take quite some time for the sliding window based coherence methods.
  
  Parameters
  ----------
  segmented_topics : list of list of pair, optional
      Segmented topics, typically produced by :meth:`~gensim.models.coherencemodel.CoherenceModel.segment_topics`.
  
  Return
  ------
  :class:`~gensim.topic_coherence.text_analysis.CorpusAccumulator`
      Corpus accumulator.
docstr_tok: ["Accumulate","word","occurrences","and","co-occurrences","from","texts","or","corpus","using","the","optimal","method","for","the","chosen","coherence","metric",".","Notes","--","--","-","This","operation","may","take","quite","some","time","for","the","sliding","window","based","coherence","methods",".","Parameters","--","--","--","--","--","segmented_topics",":","list","of","list","of","pair",",","optional","Segmented","topics",",","typically","produced","by",":","meth",":","`","~gensim.models.coherencemodel.CoherenceModel.segment_topics","`",".","Return","--","--","--",":","class",":","`","~gensim.topic_coherence.text_analysis.CorpusAccumulator","`","Corpus","accumulator","."]
code: def estimate_probabilities(self, segmented_topics=None):
      """Accumulate word occurrences and co-occurrences from texts or corpus using the optimal method for the chosen
      coherence metric.
  
      Notes
      -----
      This operation may take quite some time for the sliding window based coherence methods.
  
      Parameters
      ----------
      segmented_topics : list of list of pair, optional
          Segmented topics, typically produced by :meth:`~gensim.models.coherencemodel.CoherenceModel.segment_topics`.
  
      Return
      ------
      :class:`~gensim.topic_coherence.text_analysis.CorpusAccumulator`
          Corpus accumulator.
  
      """
      if segmented_topics is None:
          segmented_topics = self.segment_topics()
  
      if self.coherence in BOOLEAN_DOCUMENT_BASED:
          self._accumulator = self.measure.prob(
              self.corpus, segmented_topics
          )
      else:
          kwargs = dict(
              texts=self.texts,
              segmented_topics=segmented_topics,
              dictionary=self.dictionary,
              window_size=self.window_size,
              processes=self.processes,
          )
          if self.coherence == "c_w2v":
              kwargs["model"] = self.keyed_vectors
  
          self._accumulator = self.measure.prob(**kwargs)
  
      return self._accumulator
  
imports: import logging
  import multiprocessing
  from collections import namedtuple
  import numpy
  from gensim import interfaces, matutils
  from gensim import utils
  from gensim.topic_coherence import segmentation, probability_estimation, direct_confirmation_measure, indirect_confirmation_measure, aggregation
  from gensim.topic_coherence.probability_estimation import unique_ids_from_segments
label_desc: Use image node_id 20 for calling the CoherenceModel obj's underlying member method code with example usage: obj.estimate_probabilities(segmented_topics) and returns: self