code: def train(self, jsondocs, model_dir):
          
          modelUtil = ModelStorageUtil(model_dir)
          modelUtil.makedir()
          modelUtil.copy_settings(self.settings)
  
          # Convert json documents to ner documents
          nerdocs = [json_document_to_estner_document(jsondoc)
                     for jsondoc in jsondocs]
  
          self.fex.prepare(nerdocs)
          self.fex.process(nerdocs)
  
          self.trainer.train(nerdocs, modelUtil.model_filename)
docs: Train a NER model using given documents.
          
          Each word in the documents must have a "label" attribute, which
          denote the named entities in the documents.
          
          Parameters
          ----------
          jsondocs: list of JSON-style documents.
              The documents used for training the CRF model.
          model_dir: str
              A directory where the model will be saved.