Linhz commited on
Commit
82bb1a1
1 Parent(s): f1854a2

Update Model/NER/VLSP2021/Predict_Ner.py

Browse files
Files changed (1) hide show
  1. Model/NER/VLSP2021/Predict_Ner.py +1 -1
Model/NER/VLSP2021/Predict_Ner.py CHANGED
@@ -49,7 +49,7 @@ class ViTagger(object):
49
  def __init__(self, model_path: Union[str or os.PathLike], no_cuda=False):
50
  self.device = 'cuda' if not no_cuda and torch.cuda.is_available() else 'cpu'
51
  print("[ViTagger] VnCoreNLP loading ...")
52
- self.rdrsegmenter = VnCoreNLP("/VnCoreNLP/VnCoreNLP-1.1.1.jar", annotators="wseg", max_heap_size='-Xmx500m')
53
  print("[ViTagger] Model loading ...")
54
  self.model, self.tokenizer, self.max_seq_len, self.label2id, self.use_crf = self.load_model(model_path, device=self.device)
55
  self.id2label = {idx: label for idx, label in enumerate(self.label2id)}
 
49
  def __init__(self, model_path: Union[str or os.PathLike], no_cuda=False):
50
  self.device = 'cuda' if not no_cuda and torch.cuda.is_available() else 'cpu'
51
  print("[ViTagger] VnCoreNLP loading ...")
52
+ self.rdrsegmenter = VnCoreNLP("VnCoreNLP/VnCoreNLP-1.1.1.jar", annotators="wseg", max_heap_size='-Xmx500m')
53
  print("[ViTagger] Model loading ...")
54
  self.model, self.tokenizer, self.max_seq_len, self.label2id, self.use_crf = self.load_model(model_path, device=self.device)
55
  self.id2label = {idx: label for idx, label in enumerate(self.label2id)}