e2k 0.2.0__tar.gz → 0.2.2__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.
- {e2k-0.2.0/src/e2k.egg-info → e2k-0.2.2}/PKG-INFO +3 -3
- {e2k-0.2.0 → e2k-0.2.2}/README.md +1 -1
- {e2k-0.2.0 → e2k-0.2.2}/pyproject.toml +2 -2
- {e2k-0.2.0 → e2k-0.2.2}/src/e2k/inference.py +5 -0
- {e2k-0.2.0 → e2k-0.2.2/src/e2k.egg-info}/PKG-INFO +3 -3
- e2k-0.2.2/src/e2k.egg-info/requires.txt +1 -0
- e2k-0.2.0/src/e2k.egg-info/requires.txt +0 -1
- {e2k-0.2.0 → e2k-0.2.2}/LICENSE +0 -0
- {e2k-0.2.0 → e2k-0.2.2}/setup.cfg +0 -0
- {e2k-0.2.0 → e2k-0.2.2}/src/e2k/__init__.py +0 -0
- {e2k-0.2.0 → e2k-0.2.2}/src/e2k/constants.py +0 -0
- {e2k-0.2.0 → e2k-0.2.2}/src/e2k/models/model-c2k.npz +0 -0
- {e2k-0.2.0 → e2k-0.2.2}/src/e2k/models/model-p2k.npz +0 -0
- {e2k-0.2.0 → e2k-0.2.2}/src/e2k.egg-info/SOURCES.txt +0 -0
- {e2k-0.2.0 → e2k-0.2.2}/src/e2k.egg-info/dependency_links.txt +0 -0
- {e2k-0.2.0 → e2k-0.2.2}/src/e2k.egg-info/top_level.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: e2k
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A tool for automatic English to Katakana conversion
|
|
5
5
|
Author-email: Patchethium <asguftuikh@gmail.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: numpy<
|
|
8
|
+
Requires-Dist: numpy<3.0,>=1.0
|
|
9
9
|
|
|
10
10
|
# English to Katakana Translator
|
|
11
11
|
|
|
@@ -154,7 +154,7 @@ After installing the dependencies, `torch` will be added as a development depend
|
|
|
154
154
|
python train.py --data ./vendor/katakana_dict.jsonl
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
It takes around 10 minutes on a desktop CPU. The model will be saved as `vendor/model-{p2k/c2k}-e
|
|
157
|
+
It takes around 10 minutes on a desktop CPU. The model will be saved as `vendor/model-{p2k/c2k}-e{epoch}.pth`.
|
|
158
158
|
|
|
159
159
|
Also, you'll need to either download the `katakana_dict.jsonl` from the releases or create it yourself using the `extract.py` script.
|
|
160
160
|
|
|
@@ -145,7 +145,7 @@ After installing the dependencies, `torch` will be added as a development depend
|
|
|
145
145
|
python train.py --data ./vendor/katakana_dict.jsonl
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
It takes around 10 minutes on a desktop CPU. The model will be saved as `vendor/model-{p2k/c2k}-e
|
|
148
|
+
It takes around 10 minutes on a desktop CPU. The model will be saved as `vendor/model-{p2k/c2k}-e{epoch}.pth`.
|
|
149
149
|
|
|
150
150
|
Also, you'll need to either download the `katakana_dict.jsonl` from the releases or create it yourself using the `extract.py` script.
|
|
151
151
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "e2k"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
description = "A tool for automatic English to Katakana conversion"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Patchethium", email = "asguftuikh@gmail.com" }]
|
|
7
7
|
requires-python = ">=3.10"
|
|
8
|
-
dependencies = ["numpy>=1.0,<
|
|
8
|
+
dependencies = ["numpy>=1.0,<3.0"]
|
|
9
9
|
|
|
10
10
|
[build-system]
|
|
11
11
|
requires = ["setuptools", "wheel"]
|
|
@@ -140,6 +140,11 @@ class MHA:
|
|
|
140
140
|
|
|
141
141
|
class S2S:
|
|
142
142
|
def __init__(self, weights: Dict[str, np.ndarray], max_len: int = 16):
|
|
143
|
+
# fp32 is usually faster than fp16 on CPU
|
|
144
|
+
new_weight = {}
|
|
145
|
+
for k, v in weights.items():
|
|
146
|
+
new_weight[k] = v.astype(np.float32)
|
|
147
|
+
weights = new_weight
|
|
143
148
|
self.e_emb = Embedding(weights["e_emb.weight"])
|
|
144
149
|
self.k_emb = Embedding(weights["k_emb.weight"])
|
|
145
150
|
self.encoder = GRU(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: e2k
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A tool for automatic English to Katakana conversion
|
|
5
5
|
Author-email: Patchethium <asguftuikh@gmail.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: numpy<
|
|
8
|
+
Requires-Dist: numpy<3.0,>=1.0
|
|
9
9
|
|
|
10
10
|
# English to Katakana Translator
|
|
11
11
|
|
|
@@ -154,7 +154,7 @@ After installing the dependencies, `torch` will be added as a development depend
|
|
|
154
154
|
python train.py --data ./vendor/katakana_dict.jsonl
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
It takes around 10 minutes on a desktop CPU. The model will be saved as `vendor/model-{p2k/c2k}-e
|
|
157
|
+
It takes around 10 minutes on a desktop CPU. The model will be saved as `vendor/model-{p2k/c2k}-e{epoch}.pth`.
|
|
158
158
|
|
|
159
159
|
Also, you'll need to either download the `katakana_dict.jsonl` from the releases or create it yourself using the `extract.py` script.
|
|
160
160
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
numpy<3.0,>=1.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
numpy<2.0,>=1.0
|
{e2k-0.2.0 → e2k-0.2.2}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|