Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ print(f'Run time: {time:.2f}s')
rules.to_csv('output.csv')
```

**Note:** You may need to download stopwords and the punkt tokenizer from nltk by running `import nltk; nltk.download('stopwords'); nltk.download('punkt')`.
**Note:** You may need to download stopwords and the punkt_tab tokenizer from nltk by running `import nltk; nltk.download('stopwords'); nltk.download('punkt_tab')`.

For a full list of examples see the [examples folder](https://github.com/firefly-cpp/NiaARM/tree/main/examples)
in the GitHub repository.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ added to the :mod:`niaarm.mine` module.
print('No rules generated')
print(f'Run time: {time:.2f}s')

**Note:** You may need to download stopwords and the punkt tokenizer from nltk by running `import nltk; nltk.download('stopwords'); nltk.download('punkt')`.
**Note:** You may need to download stopwords and the punkt_tab tokenizer from nltk by running `import nltk; nltk.download('stopwords'); nltk.download('punkt_tab')`.

**Output:**

Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
niapy>=2.5.2,<3.0.0
numpy>=1.26.1,<2.0.0
pandas>=2.1.1,<3.0.0
numpy>=1.22.4
pandas>=2.2.2,<3.0.0
nltk>=3.8.1,<4.0.0
plotly>=5.22.0,<6.0.0
scikit-learn>=1.5.1,<2.0.0
Expand Down
4 changes: 2 additions & 2 deletions examples/text_mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
df = pd.read_json("datasets/text/artm_test_dataset.json", orient="records")
documents = df["text"].tolist()

# create a Corpus object from the documents (requires nltk's punkt tokenizer and the stopwords list)
# create a Corpus object from the documents (requires nltk's punkt_tab tokenizer and the stopwords list)
try:
corpus = Corpus.from_list(documents)
except LookupError:
import nltk

nltk.download("punkt")
nltk.download("punkt_tab")
nltk.download("stopwords")
corpus = Corpus.from_list(documents)

Expand Down
4 changes: 2 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ include = [
[tool.poetry.dependencies]
python = ">=3.9,<3.14"
niapy = "^2.5.2"
numpy = "^1.26.1"
pandas = "^2.1.1"
numpy = ">=1.22.4"
pandas = "^2.2.2"
nltk = "^3.8.1"
tomli = { version = "^2.0.1", python = "<3.11" }
plotly = "^5.22.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_text_mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class TestTextMining(TestCase):
def setUp(self):
nltk.download("punkt")
nltk.download("punkt_tab")
nltk.download("stopwords")
ds_path = os.path.join(
os.path.dirname(__file__), "test_data", "artm_test_dataset.json"
Expand Down
Loading