class_docstr: Class for detecting language of text.
class_docstr_tok: ["Class","for","detecting","language","of","text","."]
docstr: Identify language of list of strings or Documents
docstr_tok: ["Identify","language","of","list","of","strings","or","Documents"]
code: def _process_list(self, docs):
      """
      Identify language of list of strings or Documents
      """
  
      if len(docs) == 0:
          # TO DO: what standard do we want for bad input, such as empty list?
          # TO DO: more handling of bad input
          return
  
      if isinstance(docs[0], str):
          docs = [Document([], text) for text in docs]
  
      docs_by_length = {}
      for doc in docs:
          text = (
              LangIDProcessor.clean_text(doc.text)
              if self._clean_text
              else doc.text
          )
          doc_length = len(text)
          if doc_length not in docs_by_length:
              docs_by_length[doc_length] = []
          docs_by_length[doc_length].append((doc, text))
  
      for doc_length in docs_by_length:
          inputs = [doc[1] for doc in docs_by_length[doc_length]]
          predictions = self._id_langs(self._text_to_tensor(inputs))
          for doc, lang in zip(docs_by_length[doc_length], predictions):
              doc[0].lang = lang
  
      return docs
  
file_path: stanza/stanza/pipeline/langid_processor.py
imports: import emoji
  import re
  import stanza
  import torch
  from stanza.models.common.doc import Document
  from stanza.models.langid.model import LangIDBiLSTM
  from stanza.pipeline._constants import *
  from stanza.pipeline.processor import UDProcessor, register_processor
label_desc: Use image node_id 5 for calling the LangIDProcessor obj's underlying member method code with example usage: obj._process_list(docs) and returns: docs