Skip to content

Commit cf19819

Browse files
committed
Add warning message
1 parent 8aac698 commit cf19819

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pythainlp/wangchanberta/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22
from typing import List, Tuple, Union
33
import re
4+
import warnings
45
from transformers import (
56
CamembertTokenizer,
67
pipeline,
@@ -35,6 +36,7 @@ def __init__(
3536
dep_msg = deprecation_message(
3637
[("dataset_name", "lst20")], "class `ThaiNameTagger`", "4.0.0"
3738
)
39+
warnings.warn(dep_msg, DeprecationWarning, stacklevel=2)
3840
self.dataset_name = dataset_name
3941
self.grouped_entities = grouped_entities
4042
self.classify_tokens = pipeline(

0 commit comments

Comments
 (0)