Skip to content

Commit 549865d

Browse files
authored
Merge pull request #949 from bact/fix-nltk-download
Fix nltk.downloader warning
2 parents 0874f2e + 22fdb01 commit 549865d

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

.github/workflows/unittest-macos.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ on:
44
push:
55
paths-ignore:
66
- '**.md'
7-
- '**.yml'
87
- 'docs/**'
98
pull_request:
109
branches:
1110
- dev
1211
paths-ignore:
1312
- '**.md'
14-
- '**.yml'
1513
- 'docs/**'
1614

1715
jobs:
@@ -61,6 +59,6 @@ jobs:
6159
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6260
COVERALLS_SERVICE_NAME: github
6361
run: |
64-
python -m nltk.downloader omw-1.4
62+
python -c "import nltk; nltk.download('omw-1.4')"
6563
coveralls
6664
# coverage run -m unittest discover

.github/workflows/unittest-windows.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ on:
44
push:
55
paths-ignore:
66
- '**.md'
7-
- '**.yml'
87
- 'docs/**'
98
pull_request:
109
branches:
1110
- dev
1211
paths-ignore:
1312
- '**.md'
14-
- '**.yml'
1513
- 'docs/**'
1614

1715
jobs:
@@ -68,6 +66,6 @@ jobs:
6866
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6967
COVERALLS_SERVICE_NAME: github
7068
run: |
71-
python -m nltk.downloader omw-1.4
69+
python -c "import nltk; nltk.download('omw-1.4')"
7270
coveralls
7371
# coverage run -m unittest discover

.github/workflows/unitttest-ubuntu.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ on:
44
push:
55
paths-ignore:
66
- '**.md'
7-
- '**.yml'
87
- 'docs/**'
98
pull_request:
109
branches:
1110
- dev
1211
paths-ignore:
1312
- '**.md'
14-
- '**.yml'
1513
- 'docs/**'
1614

1715
jobs:
@@ -51,6 +49,6 @@ jobs:
5149
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5250
COVERALLS_SERVICE_NAME: github
5351
run: |
54-
python -m nltk.downloader omw-1.4
52+
python -c "import nltk; nltk.download('omw-1.4')"
5553
coveralls
5654
# coverage run -m unittest discover

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ For dependency details, look at the `extras` variable in [`setup.py`](https://gi
9292
- Some additional data, like word lists and language models, may be automatically downloaded during runtime.
9393
- PyThaiNLP caches these data under the directory `~/pythainlp-data` by default.
9494
- The data directory can be changed by specifying the environment variable `PYTHAINLP_DATA_DIR`.
95-
- See the data catalog (`db.json`) at https://github.com/PyThaiNLP/pythainlp-corpus
95+
- See the data catalog (`db.json`) at <https://github.com/PyThaiNLP/pythainlp-corpus>
9696

9797
## Command-Line Interface
9898

@@ -132,11 +132,11 @@ You can read [INTHEWILD.md](https://github.com/PyThaiNLP/pythainlp/blob/dev/INTH
132132

133133
If you use `PyThaiNLP` in your project or publication, please cite the library as follows:
134134

135-
Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, & Pattarawat Chormai. (2016, Jun 27). PyThaiNLP: Thai Natural Language Processing in Python. Zenodo. http://doi.org/10.5281/zenodo.3519354
135+
> Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, & Pattarawat Chormai. (2016, Jun 27). PyThaiNLP: Thai Natural Language Processing in Python. Zenodo. <http://doi.org/10.5281/zenodo.3519354>
136136
137137
or by BibTeX entry:
138138

139-
``` bib
139+
```bib
140140
@misc{pythainlp,
141141
title = "{P}y{T}hai{NLP}: {T}hai Natural Language Processing in {P}ython",
142142
author = "Phatthiyaphaibun, Wannaphong and
@@ -155,7 +155,7 @@ or by BibTeX entry:
155155

156156
Our [NLP-OSS 2023](https://nlposs.github.io/2023/) paper:
157157

158-
Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, Pattarawat Chormai, Peerat Limkonchotiwat, Thanathip Suntorntip, and Can Udomcharoenchaikit. 2023. [PyThaiNLP: Thai Natural Language Processing in Python.](https://aclanthology.org/2023.nlposs-1.4) In Proceedings of the 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS 2023), pages 25–36, Singapore, Singapore. Empirical Methods in Natural Language Processing.
158+
> Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, Pattarawat Chormai, Peerat Limkonchotiwat, Thanathip Suntorntip, and Can Udomcharoenchaikit. 2023. [PyThaiNLP: Thai Natural Language Processing in Python.](https://aclanthology.org/2023.nlposs-1.4) In Proceedings of the 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS 2023), pages 25–36, Singapore, Singapore. Empirical Methods in Natural Language Processing.
159159
160160
and its BibTeX entry:
161161

README_TH.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ PyThaiNLP มีความสามารถพื้นฐานสำหร
5555

5656
อ่านรายละเอียดได้ที่ [tutorials](https://pythainlp.org/tutorials)
5757

58-
5958
## การติดตั้ง
6059

6160
```sh
@@ -122,11 +121,11 @@ thainlp help
122121

123122
หากคุณใช้ซอฟต์แวร์ `PyThaiNLP` ในโครงงานหรืองานวิจัยของคุณ คุณสามารถอ้างอิงได้ตามนี้
124123

125-
Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, & Pattarawat Chormai. (2016, Jun 27). PyThaiNLP: Thai Natural Language Processing in Python. Zenodo. http://doi.org/10.5281/zenodo.3519354
124+
> Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, & Pattarawat Chormai. (2016, Jun 27). PyThaiNLP: Thai Natural Language Processing in Python. Zenodo. <http://doi.org/10.5281/zenodo.3519354>
126125
127126
โดยสามารถใช้ BibTeX นี้:
128127

129-
``` bib
128+
```bib
130129
@misc{pythainlp,
131130
author = {Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, Pattarawat Chormai},
132131
title = {{PyThaiNLP: Thai Natural Language Processing in Python}},
@@ -140,7 +139,7 @@ Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Sur
140139

141140
บทความของเราในงานประชุมวิชาการ [NLP-OSS 2023](https://nlposs.github.io/2023/):
142141

143-
Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, Pattarawat Chormai, Peerat Limkonchotiwat, Thanathip Suntorntip, and Can Udomcharoenchaikit. 2023. [PyThaiNLP: Thai Natural Language Processing in Python.](https://aclanthology.org/2023.nlposs-1.4) In Proceedings of the 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS 2023), pages 25–36, Singapore, Singapore. Empirical Methods in Natural Language Processing.
142+
> Wannaphong Phatthiyaphaibun, Korakot Chaovavanich, Charin Polpanumas, Arthit Suriyawongkul, Lalita Lowphansirikul, Pattarawat Chormai, Peerat Limkonchotiwat, Thanathip Suntorntip, and Can Udomcharoenchaikit. 2023. [PyThaiNLP: Thai Natural Language Processing in Python.](https://aclanthology.org/2023.nlposs-1.4) In Proceedings of the 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS 2023), pages 25–36, Singapore, Singapore. Empirical Methods in Natural Language Processing.
144143
145144
โดยสามารถใช้ BibTeX นี้:
146145

0 commit comments

Comments
 (0)