e2k 0.2.3__tar.gz → 0.3.0__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.3/src/e2k.egg-info → e2k-0.3.0}/PKG-INFO +8 -11
- {e2k-0.2.3 → e2k-0.3.0}/README.md +7 -10
- {e2k-0.2.3 → e2k-0.3.0}/pyproject.toml +1 -1
- {e2k-0.2.3 → e2k-0.3.0}/src/e2k/constants.py +3 -3
- {e2k-0.2.3 → e2k-0.3.0}/src/e2k/inference.py +1 -1
- e2k-0.3.0/src/e2k/models/model-c2k.npz +0 -0
- e2k-0.3.0/src/e2k/models/model-p2k.npz +0 -0
- {e2k-0.2.3 → e2k-0.3.0/src/e2k.egg-info}/PKG-INFO +8 -11
- e2k-0.2.3/src/e2k/models/model-c2k.npz +0 -0
- e2k-0.2.3/src/e2k/models/model-p2k.npz +0 -0
- {e2k-0.2.3 → e2k-0.3.0}/LICENSE +0 -0
- {e2k-0.2.3 → e2k-0.3.0}/setup.cfg +0 -0
- {e2k-0.2.3 → e2k-0.3.0}/src/e2k/__init__.py +0 -0
- {e2k-0.2.3 → e2k-0.3.0}/src/e2k.egg-info/SOURCES.txt +0 -0
- {e2k-0.2.3 → e2k-0.3.0}/src/e2k.egg-info/dependency_links.txt +0 -0
- {e2k-0.2.3 → e2k-0.3.0}/src/e2k.egg-info/requires.txt +0 -0
- {e2k-0.2.3 → e2k-0.3.0}/src/e2k.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: e2k
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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
|
|
@@ -61,7 +61,7 @@ print(katakana) # "ワード"
|
|
|
61
61
|
|
|
62
62
|
# decode strategy
|
|
63
63
|
# greedy by default, top_k and top_p are available
|
|
64
|
-
#
|
|
64
|
+
# I tried implementing beam search but it barely differs from greedy
|
|
65
65
|
c2k.set_decode_strategy("top_k", top_k=2) # low quality results, not recommended
|
|
66
66
|
c2k.set_decode_strategy("top_p", top_p=0.6, t=0.8)
|
|
67
67
|
# for further information, see
|
|
@@ -78,8 +78,8 @@ The BLEU score is calculated on a random subset with size of 10% of the dataset.
|
|
|
78
78
|
|
|
79
79
|
| Model | BLEU Score ↑ |
|
|
80
80
|
| ----- | ------------ |
|
|
81
|
-
| P2K | 0.
|
|
82
|
-
| C2K | 0.
|
|
81
|
+
| P2K | 0.89 |
|
|
82
|
+
| C2K | 0.92 |
|
|
83
83
|
|
|
84
84
|
## Dictionary
|
|
85
85
|
|
|
@@ -189,13 +189,10 @@ python export.py --model /path/to/your/model.pth --p2k --output /path/to/your/mo
|
|
|
189
189
|
|
|
190
190
|
## License
|
|
191
191
|
|
|
192
|
-
The code is released under WTFPL, you can do WTF you want with it.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
In short, as long as you provide the attribution, you can use it for both commercial and non-commercial purposes.
|
|
197
|
-
|
|
198
|
-
The model weights are released under the same license as the dictionary.
|
|
192
|
+
- The code is released under WTFPL, you can do WTF you want with it.
|
|
193
|
+
- The dictionary follows the [Wikimedia's license](https://dumps.wikimedia.org/legal.html) and the [JMdict / EDICT's Copyright](https://www.edrdg.org/) license.
|
|
194
|
+
- In short, they both fall into CC-BY-SA.
|
|
195
|
+
- The model weights are trained using the dictionary. I am not a lawyer, whether the machine learning weights is considered as a derivative work is up to you.
|
|
199
196
|
|
|
200
197
|
## Credits
|
|
201
198
|
|
|
@@ -52,7 +52,7 @@ print(katakana) # "ワード"
|
|
|
52
52
|
|
|
53
53
|
# decode strategy
|
|
54
54
|
# greedy by default, top_k and top_p are available
|
|
55
|
-
#
|
|
55
|
+
# I tried implementing beam search but it barely differs from greedy
|
|
56
56
|
c2k.set_decode_strategy("top_k", top_k=2) # low quality results, not recommended
|
|
57
57
|
c2k.set_decode_strategy("top_p", top_p=0.6, t=0.8)
|
|
58
58
|
# for further information, see
|
|
@@ -69,8 +69,8 @@ The BLEU score is calculated on a random subset with size of 10% of the dataset.
|
|
|
69
69
|
|
|
70
70
|
| Model | BLEU Score ↑ |
|
|
71
71
|
| ----- | ------------ |
|
|
72
|
-
| P2K | 0.
|
|
73
|
-
| C2K | 0.
|
|
72
|
+
| P2K | 0.89 |
|
|
73
|
+
| C2K | 0.92 |
|
|
74
74
|
|
|
75
75
|
## Dictionary
|
|
76
76
|
|
|
@@ -180,13 +180,10 @@ python export.py --model /path/to/your/model.pth --p2k --output /path/to/your/mo
|
|
|
180
180
|
|
|
181
181
|
## License
|
|
182
182
|
|
|
183
|
-
The code is released under WTFPL, you can do WTF you want with it.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
In short, as long as you provide the attribution, you can use it for both commercial and non-commercial purposes.
|
|
188
|
-
|
|
189
|
-
The model weights are released under the same license as the dictionary.
|
|
183
|
+
- The code is released under WTFPL, you can do WTF you want with it.
|
|
184
|
+
- The dictionary follows the [Wikimedia's license](https://dumps.wikimedia.org/legal.html) and the [JMdict / EDICT's Copyright](https://www.edrdg.org/) license.
|
|
185
|
+
- In short, they both fall into CC-BY-SA.
|
|
186
|
+
- The model weights are trained using the dictionary. I am not a lawyer, whether the machine learning weights is considered as a derivative work is up to you.
|
|
190
187
|
|
|
191
188
|
## Credits
|
|
192
189
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from string import
|
|
1
|
+
from string import ascii_lowercase
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
PAD_IDX = 0
|
|
@@ -165,7 +165,7 @@ en_phones = [
|
|
|
165
165
|
"ZH",
|
|
166
166
|
]
|
|
167
167
|
|
|
168
|
-
ascii_entries = ["<pad>", "<sos>", "<eos>"] + list(
|
|
168
|
+
ascii_entries = ["<pad>", "<sos>", "<eos>"] + list(ascii_lowercase) + [" ", "'"]
|
|
169
169
|
|
|
170
170
|
kanas = ["<pad>", "<sos>", "<eos>"] + kanas
|
|
171
|
-
en_phones = ["<pad>", "<sos>", "<eos>"] + en_phones + [" "]
|
|
171
|
+
en_phones = ["<pad>", "<sos>", "<eos>"] + en_phones + [" ", "'"]
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: e2k
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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
|
|
@@ -61,7 +61,7 @@ print(katakana) # "ワード"
|
|
|
61
61
|
|
|
62
62
|
# decode strategy
|
|
63
63
|
# greedy by default, top_k and top_p are available
|
|
64
|
-
#
|
|
64
|
+
# I tried implementing beam search but it barely differs from greedy
|
|
65
65
|
c2k.set_decode_strategy("top_k", top_k=2) # low quality results, not recommended
|
|
66
66
|
c2k.set_decode_strategy("top_p", top_p=0.6, t=0.8)
|
|
67
67
|
# for further information, see
|
|
@@ -78,8 +78,8 @@ The BLEU score is calculated on a random subset with size of 10% of the dataset.
|
|
|
78
78
|
|
|
79
79
|
| Model | BLEU Score ↑ |
|
|
80
80
|
| ----- | ------------ |
|
|
81
|
-
| P2K | 0.
|
|
82
|
-
| C2K | 0.
|
|
81
|
+
| P2K | 0.89 |
|
|
82
|
+
| C2K | 0.92 |
|
|
83
83
|
|
|
84
84
|
## Dictionary
|
|
85
85
|
|
|
@@ -189,13 +189,10 @@ python export.py --model /path/to/your/model.pth --p2k --output /path/to/your/mo
|
|
|
189
189
|
|
|
190
190
|
## License
|
|
191
191
|
|
|
192
|
-
The code is released under WTFPL, you can do WTF you want with it.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
In short, as long as you provide the attribution, you can use it for both commercial and non-commercial purposes.
|
|
197
|
-
|
|
198
|
-
The model weights are released under the same license as the dictionary.
|
|
192
|
+
- The code is released under WTFPL, you can do WTF you want with it.
|
|
193
|
+
- The dictionary follows the [Wikimedia's license](https://dumps.wikimedia.org/legal.html) and the [JMdict / EDICT's Copyright](https://www.edrdg.org/) license.
|
|
194
|
+
- In short, they both fall into CC-BY-SA.
|
|
195
|
+
- The model weights are trained using the dictionary. I am not a lawyer, whether the machine learning weights is considered as a derivative work is up to you.
|
|
199
196
|
|
|
200
197
|
## Credits
|
|
201
198
|
|
|
Binary file
|
|
Binary file
|
{e2k-0.2.3 → e2k-0.3.0}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|