code: def test_ner(self):
      wv_url = "https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.en.300.vec.gz"
      model = txt.sequence_tagger(
          "bilstm-crf", self.preproc, wv_path_or_url=wv_url
      )
      learner = ktrain.get_learner(
          model, train_data=self.trn, val_data=self.val, batch_size=128
      )
      lr = 0.01
      hist = learner.fit(lr, 1)
  
      # test training results
      # self.assertAlmostEqual(max(hist.history['lr']), lr)
      self.assertGreater(learner.validate(), 0.65)
  
      # test top losses
      obs = learner.top_losses(n=1)
      self.assertIn(obs[0][0], list(range(len(self.val.x))))
      learner.view_top_losses(n=1)
  
      # test weight decay
      self.assertEqual(learner.get_weight_decay(), None)
      learner.set_weight_decay(1e-2)
      self.assertAlmostEqual(learner.get_weight_decay(), 1e-2)
  
      # test load and save model
      learner.save_model("/tmp/test_model")
      learner.load_model("/tmp/test_model")
  
      # test predictor
      SENT = "There is a man named John Smith."
      p = ktrain.get_predictor(learner.model, self.preproc)
      self.assertEqual(p.predict(SENT)[-2][1], "I-PER")
      p.save("/tmp/test_predictor")
      p = ktrain.load_predictor("/tmp/test_predictor")
      self.assertEqual(p.predict(SENT)[-2][1], "I-PER")
  
file_path: ktrain/tests/test_zzz_ner_v1.py
imports: import os
  from unittest import TestCase, main, skip
  import IPython
  import numpy
  import testenv
  import ktrain
  from ktrain import text
label_desc: Use image node_id 2 for calling the TestNERClassification obj's underlying member method code with example usage: obj.test_ner() without return types