From d1ec209484320c2a61c735721148a66f58e6f7b1 Mon Sep 17 00:00:00 2001 From: Harrison Saylor Date: Wed, 18 Aug 2021 09:06:43 -0500 Subject: [PATCH] fix(nlc): add deprecation warning add deprecation warning to NLC constructor fix #9624 --- ibm_watson/natural_language_classifier_v1.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ibm_watson/natural_language_classifier_v1.py b/ibm_watson/natural_language_classifier_v1.py index 16144ce7..c7675bd7 100644 --- a/ibm_watson/natural_language_classifier_v1.py +++ b/ibm_watson/natural_language_classifier_v1.py @@ -84,6 +84,15 @@ def classify(self, classifier_id: str, text: str, :rtype: DetailedResponse with `dict` result representing a `Classification` object """ + print( + """ + On 9 August 2021, IBM announced the deprecation of the Natural Language Classifier service. + The service will no longer be available from 8 August 2022. As of 9 September 2021, you will not be able to create new instances. + Existing instances will be supported until 8 August 2022. Any instance that still exists on that date will be deleted. + For more information, see https://cloud.ibm.com/docs/natural-language-classifier?topic=natural-language-classifier-migrating + """ + ) + if classifier_id is None: raise ValueError('classifier_id must be provided') if text is None: