|
--- |
|
license: cc-by-4.0 |
|
language: |
|
- km |
|
pretty_name: khmerfonts |
|
|
|
dataset_info: |
|
features: |
|
- name: file_name |
|
dtype: image |
|
- name: text |
|
dtype: string |
|
--- |
|
|
|
|
|
## Dataset Info |
|
|
|
**Total files**: 26,591 files == (`(num_fonts * num_sentences) - num_0_byte_fonts - num_error_image`) |
|
|
|
**Total fonts**: 2,972 fonts |
|
|
|
**Total sentences**: 10 |
|
|
|
## Dataset Creation Info |
|
|
|
All images were downloaded from [khmerfonts.info](https://khmerfonts.info) by using a script below: |
|
|
|
```python |
|
with open("filelist.txt", "w") as outfile: |
|
items = [ |
|
f"https://www.khmerfonts.info/preview.php?font={font + 1}&sample={sample + 1}\n\tout=khmerfonts-{font + 1}-{sample + 1}.png" |
|
for font in range(2972) # maximum id at the moment |
|
for sample in range(10) |
|
] |
|
outfile.write("\n".join(items)) |
|
``` |
|
|
|
Download all files using `aria2c` |
|
|
|
```shell |
|
aria2c -i filelist.txt -d data -j16 |
|
``` |
|
|
|
Find 0-byte files and delete |
|
|
|
```shell |
|
find data/ -size 0 -delete |
|
``` |
|
|
|
|
|
```python |
|
sentences = [ |
|
"ααΆαα·ααΆααα·αααΉααα½α ααααΆααααα½ααααα
ααααΆαα ααααΎαααααααααΆααααΆαα αααα½αα α·αααααααααααΆααααΎαααα½α α", |
|
"α
αα’αααΈαα·αααΆααααααΎαααααΆα ααΆαα’αααΈαα·αααααΎααΆαααααα·ααααα· ααααΆααα’αααΈαα·αααααΎα
α·αααα’αα ααα ααΆα
α’αααΈαα·αααααΎα
α·αααααΆααΆ α", |
|
"α
αααααα·ααααΆαααα
ααα
αΆαα αα»αααΆαααααααα·ααααΌαααΆα αααααΈααααααααα’ααααα»ααααΆα αααααααΆαααααΆααα’αΆααααα α", |
|
"αααααααααΆαααα»ααααα½ααΆα ααΌα
ααααΆαααΆααΆαααα αΆαααΆαα· αααααααααΆαααα»ααααααααΆαα· ααΌα
ααΆαααααααααα αΆαα
αα α", |
|
"ααΆαααααα½αα
ααααΆαααααααααααααααααΆα αα½αααααΆα
αααα½αααααΆαααΆαααααααααΆ ααααααααααΌααα·ααα½αααααΆ αααΉααα
αα
αΆα₯αα’αΆαα»α α", |
|
"αα»ααα·ααααααα
ααααααΎαααααααΈ ααα’ααααααΎααααααΈααΆαα’ααααα ααααΌααααααααΎααΆααα·αα ααΎαααΆαααααααααα
ααΆαααααα α", |
|
"ααααΆααααΆαα’αα αααααΈαααααα αααααΆααΆααΆα αα·αααΉααααααααααΆα αα½αααααα·αααΆαα· ααααΎαααΆα’αΆαα ααΆα’αααααααααααα α", |
|
"ααααΆαααααααααΎαααα·αα»α αααααΆα²αααα»αααα
αΆααααααααΆ αα½αααααΆαααααααααααΆαααααααΆ αααααααα»ααααΆαααααΆαα½α α", |
|
"α
ααααα’α α½αααΆα α
ααααΆαα α½αααααΆααααα·αααΆααααΆ αα·αααΆαααΌα
ααα ααααααααΆααααΆ ααΌα
ααΆαααααααααΆ αα½αααΆαααααα α", |
|
"ααΆαα·ααα»αααααΆαααααα·ααα·α αα»αααααααΎαα·αααααΆααααα ααα»ααααα»α
αα·αα
α·αααααααα»αα αααα‘αΆαααααααα
α·αααα²ααααααΎ α", |
|
] |
|
``` |
|
|