code: def get_partial_text(fulltext):
      
      def _get_index(x):
          return int(float(x) / 100 * len(fulltext))
  
      partial_text = [
          fulltext[_get_index(start):_get_index(end)]
          for start, end in current_app.config[
              "CLASSIFIER_PARTIAL_TEXT_PERCENTAGES"
          ]
      ]
  
      return "\n".join(partial_text)
docs: Return a short version of the fulltext used with partial matching mode.
  
      The version is composed of 20% in the beginning and 20% in the middle of
      the text.