From 36ecab047dde270fc7a379c0d1cf5b7d91ea8d65 Mon Sep 17 00:00:00 2001 From: ZenithClown Date: Thu, 22 Aug 2024 01:24:05 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20add=20docs=20for=20error=20repor?= =?UTF-8?q?t=20if=20a=20corpus=20is=20not=20available=20in=20system?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nlpurify/feature/selection/nltk.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nlpurify/feature/selection/nltk.py b/nlpurify/feature/selection/nltk.py index 2c100a5..c27dbd2 100644 --- a/nlpurify/feature/selection/nltk.py +++ b/nlpurify/feature/selection/nltk.py @@ -145,6 +145,9 @@ def tokenize_text(text : str, regexp : bool = False, vanilla : bool = False, **k :raises ValueError: The error is raised when both the attribute ``vanilla`` and ``regexp`` is set to True. + :raises ImportError: Error is raised when one or more nltk corpus + is not available in the system. + **Return Type** :rtype: list[str] @@ -281,6 +284,9 @@ def remove_stopwords(text : str, language : str = "english", rtype : object = st not in {str, list} values. Make sure the data type is an type instance and is not passed as a string value. + :raises ImportError: Error is raised when one or more nltk corpus + is not available in the system. + **Return Type** :rtype: str | list