SudachiDict-full 20230110__tar.gz → 20240109__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of SudachiDict-full might be problematic. Click here for more details.

@@ -0,0 +1,5 @@
1
+ {
2
+ "version": "20240109",
3
+ "dict_version": "20240109",
4
+ "edition": "full"
5
+ }
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: SudachiDict-full
3
- Version: 20230110
3
+ Version: 20240109
4
4
  Summary: Sudachi Dictionary for SudachiPy - Full Edition
5
5
  Home-page: https://github.com/WorksApplications/SudachiDict
6
6
  Author: Works Applications
7
7
  Author-email: sudachi@worksap.co.jp
8
8
  License: Apache-2.0
9
+ Platform: UNKNOWN
9
10
  Description-Content-Type: text/markdown
10
11
  License-File: LICENSE-2.0.txt
11
12
 
@@ -59,3 +60,5 @@ In case you are using SudachiPy before v0.5.2, please visit the old SudachiPy do
59
60
  - [https://github.com/WorksApplications/SudachiPy/tree/v0.5.1#dictionary-edition](https://github.com/WorksApplications/SudachiPy/tree/v0.5.1#dictionary-edition)
60
61
  - japanese
61
62
  - [https://github.com/WorksApplications/SudachiPy/blob/v0.5.1/docs/tutorial.md#%辞書の種類](https://github.com/WorksApplications/SudachiPy/blob/v0.5.1/docs/tutorial.md#%E8%BE%9E%E6%9B%B8%E3%81%AE%E7%A8%AE%E9%A1%9E)
63
+
64
+
@@ -1,11 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: SudachiDict-full
3
- Version: 20230110
3
+ Version: 20240109
4
4
  Summary: Sudachi Dictionary for SudachiPy - Full Edition
5
5
  Home-page: https://github.com/WorksApplications/SudachiDict
6
6
  Author: Works Applications
7
7
  Author-email: sudachi@worksap.co.jp
8
8
  License: Apache-2.0
9
+ Platform: UNKNOWN
9
10
  Description-Content-Type: text/markdown
10
11
  License-File: LICENSE-2.0.txt
11
12
 
@@ -59,3 +60,5 @@ In case you are using SudachiPy before v0.5.2, please visit the old SudachiPy do
59
60
  - [https://github.com/WorksApplications/SudachiPy/tree/v0.5.1#dictionary-edition](https://github.com/WorksApplications/SudachiPy/tree/v0.5.1#dictionary-edition)
60
61
  - japanese
61
62
  - [https://github.com/WorksApplications/SudachiPy/blob/v0.5.1/docs/tutorial.md#%辞書の種類](https://github.com/WorksApplications/SudachiPy/blob/v0.5.1/docs/tutorial.md#%E8%BE%9E%E6%9B%B8%E3%81%AE%E7%A8%AE%E9%A1%9E)
63
+
64
+
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2020 Works Applications Co., Ltd.
1
+ # Copyright (c) 2020-2023 Works Applications Co., Ltd.
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -15,19 +15,18 @@
15
15
  import setuptools
16
16
  import os
17
17
  import json
18
- from logging import getLogger
18
+ import sys
19
19
  from urllib.parse import urlparse
20
20
  from urllib.request import urlretrieve
21
21
  from zipfile import ZipFile
22
22
 
23
-
24
23
  with open("INFO.json") as fh:
25
24
  dict_info = json.load(fh)
26
25
  PKG_VERSION = dict_info["version"]
27
26
  DICT_VERSION = dict_info["dict_version"]
28
27
  DICT_EDITION = dict_info["edition"]
29
28
 
30
- ZIP_URL = "http://sudachi.s3-website-ap-northeast-1.amazonaws.com/sudachidict/"\
29
+ ZIP_URL = "https://d2ej7fkh96fzlu.cloudfront.net/sudachidict/" \
31
30
  "sudachi-dictionary-{}-{}.zip".format(DICT_VERSION, DICT_EDITION)
32
31
  ZIP_NAME = urlparse(ZIP_URL).path.split("/")[-1]
33
32
  UNZIP_NAME = "sudachi-dictionary-{}".format(DICT_VERSION)
@@ -35,12 +34,9 @@ PKG_DIR = "sudachidict_{}".format(DICT_EDITION)
35
34
  RESOURCE_DIR = os.path.join(PKG_DIR, "resources")
36
35
  BINARY_NAME = "system_{}.dic".format(DICT_EDITION)
37
36
 
38
-
39
- logger = getLogger(__name__)
40
-
41
37
  # Download and place the dictionary file
42
38
  if not os.path.exists(RESOURCE_DIR):
43
- logger.warning("Downloading the Sudachi dictionary (It may take a while) ...")
39
+ print("Downloading the binary Sudachi dictionary (it may take some time) ...", file=sys.stderr)
44
40
  _, _msg = urlretrieve(ZIP_URL, ZIP_NAME)
45
41
  with ZipFile(ZIP_NAME) as z:
46
42
  z.extractall()
@@ -48,7 +44,7 @@ if not os.path.exists(RESOURCE_DIR):
48
44
  os.rename(os.path.join(RESOURCE_DIR, BINARY_NAME),
49
45
  os.path.join(RESOURCE_DIR, "system.dic"))
50
46
  os.remove(ZIP_NAME)
51
- logger.warning("... downloaded and placed the dictionary at `{}`.".format(RESOURCE_DIR))
47
+ print("downloaded and extracted dictionary to `{}`.".format(RESOURCE_DIR), file=sys.stderr)
52
48
 
53
49
  with open("README.md", "r", encoding="utf-8") as fh:
54
50
  long_description = fh.read()
@@ -1,5 +0,0 @@
1
- {
2
- "version": "20230110",
3
- "dict_version": "20230110",
4
- "edition": "full"
5
- }