class_docstr: Class for storing lemmas, stems and evaluation metrics.
docstr: Count (UI, OI) pairs for truncation points until we find the segment where (ui, oi) crosses the truncation line.
  
  :param cutlength: Optional parameter to start counting from (ui, oi)
  coordinates gotten by stemming at this length. Useful for speeding up
  the calculations when you know the approximate location of the
  intersection.
  :type cutlength: int
  :return: List of coordinate pairs that define the truncation line
  :rtype: list(tuple(float, float))
docstr_tok: ["Count","(","UI",",","OI",")","pairs","for","truncation","points","until","we","find","the","segment","where","(","ui",",","oi",")","crosses","the","truncation","line",".",":","param","cutlength",":","Optional","parameter","to","start","counting","from","(","ui",",","oi",")","coordinates","gotten","by","stemming","at","this","length",".","Useful","for","speeding","up","the","calculations","when","you","know","the","approximate","location","of","the","intersection",".",":","type","cutlength",":","int",":","return",":","List","of","coordinate","pairs","that","define","the","truncation","line",":","rtype",":","list","(","tuple","(","float",",","float",")",")"]
code: def _get_truncation_coordinates(self, cutlength=0):
      """Count (UI, OI) pairs for truncation points until we find the segment where (ui, oi) crosses the truncation line.
  
      :param cutlength: Optional parameter to start counting from (ui, oi)
      coordinates gotten by stemming at this length. Useful for speeding up
      the calculations when you know the approximate location of the
      intersection.
      :type cutlength: int
      :return: List of coordinate pairs that define the truncation line
      :rtype: list(tuple(float, float))
      """
      words = get_words_from_dictionary(self.lemmas)
      maxlength = max(len(word) for word in words)
  
      # Truncate words from different points until (0, 0) - (ui, oi) segment crosses the truncation line
      coords = []
      while cutlength <= maxlength:
          # Get (UI, OI) pair of current truncation point
          pair = self._get_truncation_indexes(words, cutlength)
  
          # Store only new coordinates so we'll have an actual
          # line segment when counting the intersection point
          if pair not in coords:
              coords.append(pair)
          if pair == (0.0, 0.0):
              # Stop counting if truncation line goes through origo;
              # length from origo to truncation line is 0
              return coords
          if len(coords) >= 2 and pair[0] > 0.0:
              derivative1 = _get_derivative(coords[-2])
              derivative2 = _get_derivative(coords[-1])
              # Derivative of the truncation line is a decreasing value;
              # when it passes Stemming Weight, we've found the segment
              # of truncation line intersecting with (0, 0) - (ui, oi) segment
              if derivative1 >= self.sw >= derivative2:
                  return coords
          cutlength += 1
      return coords
  
file_path: nltk/nltk/metrics/paice.py
imports: from math import sqrt
label_desc: Use image node_id 4 for calling the Paice obj's underlying member method code with example usage: obj._get_truncation_coordinates(cutlength) and returns: coords, coords, coords