code: def __init__(
      self,
      cond_check_number_images,
      number_images_min_cutoff,
      number_images_max_cutoff,
      cond_check_number_words_doc_level,
      strip_characters,
      number_words_doc_level_min_cutoff,
      number_words_doc_level_max_cutoff,
      cond_check_character_repetition_ratio_doc_level,
      character_repetition_length_doc_level,
      character_repetition_doc_level_max_cutoff,
      cond_check_word_repetition_ratio_doc_level,
      word_repetition_length_doc_level,
      word_repetition_doc_level_max_cutoff,
      cond_check_special_character_ratio_doc_level,
      special_character_ratio_doc_level_max_cutoff,
      cond_check_stopword_ratio_doc_level,
      stopwords,
      stopword_ratio_doc_level_min_cutoff,
      cond_check_flagged_word_ratio_doc_level,
      flagged_words,
      flagged_word_ratio_doc_level_max_cutoff,
      cond_check_punctuation_ratio_doc_level,
      punctuation,
      punctuation_ratio_doc_level_min_cutoff,
      cond_check_common_word_ratio_doc_level,
      path_common_words,
      common_word_ratio_doc_level_min_cutoff,
      cond_check_lang_id_doc_level,
      path_lang_id_model,
      lang_id_doc_level_min_cutoff,
      cond_check_perplexity_score_doc_level,
      non_printing_characters_re,
      digits_re,
      unicode_punctuation,
      path_sentencepiece_model,
      path_kenlm_model,
      perplexity_score_doc_level_max_cutoff,
  ):
      self.cond_check_number_images = cond_check_number_images
      self.number_images_min_cutoff = number_images_min_cutoff
      self.number_images_max_cutoff = number_images_max_cutoff
  
      self.cond_check_number_words_doc_level = (
          cond_check_number_words_doc_level
      )
      self.strip_characters = strip_characters
      self.number_words_doc_level_min_cutoff = (
          number_words_doc_level_min_cutoff
      )
      self.number_words_doc_level_max_cutoff = (
          number_words_doc_level_max_cutoff
      )
  
      self.cond_check_character_repetition_ratio_doc_level = (
          cond_check_character_repetition_ratio_doc_level
      )
      self.character_repetition_length_doc_level = (
          character_repetition_length_doc_level
      )
      self.character_repetition_doc_level_max_cutoff = (
          character_repetition_doc_level_max_cutoff
      )
  
      self.cond_check_word_repetition_ratio_doc_level = (
          cond_check_word_repetition_ratio_doc_level
      )
      self.word_repetition_length_doc_level = (
          word_repetition_length_doc_level
      )
      self.word_repetition_doc_level_max_cutoff = (
          word_repetition_doc_level_max_cutoff
      )
  
      self.cond_check_special_character_ratio_doc_level = (
          cond_check_special_character_ratio_doc_level
      )
      self.special_character_ratio_doc_level_max_cutoff = (
          special_character_ratio_doc_level_max_cutoff
      )
  
      self.cond_check_stopword_ratio_doc_level = (
          cond_check_stopword_ratio_doc_level
      )
      self.stopwords = stopwords
      self.stopword_ratio_doc_level_min_cutoff = (
          stopword_ratio_doc_level_min_cutoff
      )
  
      self.cond_check_flagged_word_ratio_doc_level = (
          cond_check_flagged_word_ratio_doc_level
      )
      self.flagged_words = flagged_words
      self.flagged_word_ratio_doc_level_max_cutoff = (
          flagged_word_ratio_doc_level_max_cutoff
      )
  
      self.cond_check_punctuation_ratio_doc_level = (
          cond_check_punctuation_ratio_doc_level
      )
      self.punctuation = punctuation
      self.punctuation_ratio_doc_level_min_cutoff = (
          punctuation_ratio_doc_level_min_cutoff
      )
  
      self.cond_check_common_word_ratio_doc_level = (
          cond_check_common_word_ratio_doc_level
      )
      self.path_common_words = path_common_words
      with open(path_common_words) as f:
          self.common_words = json.load(f)
      self.common_word_ratio_doc_level_min_cutoff = (
          common_word_ratio_doc_level_min_cutoff
      )
  
      self.cond_check_lang_id_doc_level = cond_check_lang_id_doc_level
      self.path_lang_id_model = path_lang_id_model
      if cond_check_lang_id_doc_level:
          self.lang_id_model = fasttext.load_model(path_lang_id_model)
      self.lang_id_doc_level_min_cutoff = lang_id_doc_level_min_cutoff
  
      self.cond_check_perplexity_score_doc_level = (
          cond_check_perplexity_score_doc_level
      )
      self.non_printing_characters_re = non_printing_characters_re
      self.digits_re = digits_re
      self.unicode_punctuation = unicode_punctuation
      self.path_sentencepiece_model = path_sentencepiece_model
      if cond_check_perplexity_score_doc_level:
          self.sentencepiece_model = (
              sentencepiece.SentencePieceProcessor()
          )
          self.sentencepiece_model.load(path_sentencepiece_model)
      self.path_kenlm_model = path_kenlm_model
      if cond_check_perplexity_score_doc_level:
          self.kenlm_model = kenlm.Model(path_kenlm_model)
      self.perplexity_score_doc_level_max_cutoff = (
          perplexity_score_doc_level_max_cutoff
      )
  
imports: import json
  import re
  from collections import Counter
  import fasttext
  import kenlm
  import numpy
  import sentencepiece
  from obelics.utils import SPECIAL_CHARACTERS
label_desc: Use image node_id 1 to create a new WebDocumentFilteringDocLevel object  with example: obj = WebDocumentFilteringDocLevel(cond_check_number_images, number_images_min_cutoff, number_images_max_cutoff, cond_check_number_words_doc_level, strip_characters, number_words_doc_level_min_cutoff, number_words_doc_level_max_cutoff, cond_check_character_repetition_ratio_doc_level, character_repetition_length_doc_level, character_repetition_doc_level_max_cutoff, cond_check_word_repetition_ratio_doc_level, word_repetition_length_doc_level, word_repetition_doc_level_max_cutoff, cond_check_special_character_ratio_doc_level, special_character_ratio_doc_level_max_cutoff, cond_check_stopword_ratio_doc_level, stopwords, stopword_ratio_doc_level_min_cutoff, cond_check_flagged_word_ratio_doc_level, flagged_words, flagged_word_ratio_doc_level_max_cutoff, cond_check_punctuation_ratio_doc_level, punctuation, punctuation_ratio_doc_level_min_cutoff, cond_check_common_word_ratio_doc_level, path_common_words, common_word_ratio_doc_level_min_cutoff, cond_check_lang_id_doc_level, path_lang_id_model, lang_id_doc_level_min_cutoff, cond_check_perplexity_score_doc_level, non_printing_characters_re, digits_re, unicode_punctuation, path_sentencepiece_model, path_kenlm_model, perplexity_score_doc_level_max_cutoff)