From 2f9bb3b769c1e2256f34887eff29a38cd66c7a81 Mon Sep 17 00:00:00 2001 From: Wannaphong Date: Thu, 12 Dec 2024 11:52:46 +0700 Subject: [PATCH] Add clause_tokenize warnings --- pythainlp/tokenize/core.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pythainlp/tokenize/core.py b/pythainlp/tokenize/core.py index 993bcff64..b66977f4d 100644 --- a/pythainlp/tokenize/core.py +++ b/pythainlp/tokenize/core.py @@ -5,6 +5,7 @@ Generic functions of tokenizers """ import re +import warnings from typing import Iterable, List, Union from pythainlp.tokenize import ( @@ -43,6 +44,11 @@ def clause_tokenize(doc: List[str]) -> List[List[str]]: """ from pythainlp.tokenize.crfcls import segment + warnings.warn( + """ + clause_tokenize is no longer supported \ + and will be removed in version 5.1. + """, DeprecationWarning) return segment(doc)