class_docstr: Text spans scoring class.
  Contains misc scoring algorithms for scoring text fragments extracted
  from a corpus.
  
  Arguments:
      documents(list): List of spaCy documents.
      spans(list[list]): List of spaCy spans representing noun phrases of documents
          document.
class_docstr_tok: ["Text","spans","scoring","class",".","Contains","misc","scoring","algorithms","for","scoring","text","fragments","extracted","from","a","corpus",".","Arguments",":","documents","(","list",")",":","List","of","spaCy","documents",".","spans","(","list","[","list","]",")",":","List","of","spaCy","spans","representing","noun","phrases","of","documents","document","."]
code: def get_cvalue_scores(self, group_similar_spans=True):
      phrases_text = [
          p for ps in self.index.pid_to_spans.values() for p in ps
      ]
      phrase_scores = {}
      for phrase in phrases_text:
          sub_phrase_pids = None
          for w in phrase:
              sub_pids = self.index.get_subphrases_of_word(w)
              if sub_phrase_pids is None:
                  sub_phrase_pids = sub_pids
              else:
                  sub_phrase_pids = sub_phrase_pids.intersection(
                      sub_pids
                  )
          sub_phrase_pids.discard(self.index.get_pid(phrase))
  
          if len(sub_phrase_pids) > 0:
              score = math.log2(1 + len(phrase)) * (
                  self.index.tf(phrase)
                  - 1.0
                  / len(sub_phrase_pids)
                  * sum(
                      [
                          self.index.tf(
                              list(self.index.get_phrase(p))[0]
                          )
                          for p in sub_phrase_pids
                      ]
                  )
              )
          else:
              score = math.log2(1 + len(phrase)) * self.index.tf(phrase)
          phrase_scores[phrase] = score
      for phrase in phrase_scores:
          score = [
              phrase_scores[p]
              for p in self.index.get_phrase(self.index.get_pid(phrase))
          ]
          phrase_scores[phrase] = sum(score) / len(score)
      return self._maybe_group_and_sort(
          group_similar_spans, phrase_scores
      )
  
imports: import itertools
  import math
  import numpy
  import logging
  from spacy.tokens.doc import Doc
  from spacy.tokens.span import Span
  from spacy.tokens.token import Token
label_desc: Use image node_id 12 for calling the TextSpanScoring obj's underlying member method code with example usage: obj.get_cvalue_scores(group_similar_spans) and returns: self