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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e2k
3
- Version: 0.2.3
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
- # TODO: beam searh
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.87 |
82
- | C2K | 0.91 |
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
- The dictionary should follow the [Wikimedia's license](https://dumps.wikimedia.org/legal.html) and the [JMdict / EDICT's Copyright](https://www.edrdg.org/) license.
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
- # TODO: beam searh
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.87 |
73
- | C2K | 0.91 |
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
- The dictionary should follow the [Wikimedia's license](https://dumps.wikimedia.org/legal.html) and the [JMdict / EDICT's Copyright](https://www.edrdg.org/) license.
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,6 +1,6 @@
1
1
  [project]
2
2
  name = "e2k"
3
- version = "0.2.3"
3
+ version = "0.3.0"
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" }]
@@ -1,4 +1,4 @@
1
- from string import ascii_letters
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(ascii_letters) + [" "]
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 + [" ", "'"]
@@ -314,7 +314,7 @@ if __name__ == "__main__":
314
314
  args = parser.parse_args()
315
315
  p2k = P2K()
316
316
  c2k = C2K()
317
- word = "gutenberg"
317
+ word = "vordhosbn"
318
318
  phonemes = g2p(word)
319
319
  print(word)
320
320
  print("P2K: ", p2k(phonemes))
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e2k
3
- Version: 0.2.3
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
- # TODO: beam searh
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.87 |
82
- | C2K | 0.91 |
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
- The dictionary should follow the [Wikimedia's license](https://dumps.wikimedia.org/legal.html) and the [JMdict / EDICT's Copyright](https://www.edrdg.org/) license.
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes