def train(self, jsondocs, model_dir):
        """ 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.
        """
        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)
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.