Datasets:
ArXiv:
License:
update
Browse files- README.md +34 -0
- data/para_crawl_en_bg.jsonl +3 -0
- data/para_crawl_en_cs.jsonl +3 -0
- data/para_crawl_en_da.jsonl +3 -0
- data/para_crawl_en_de.jsonl +3 -0
- data/para_crawl_en_el.jsonl +3 -0
- data/para_crawl_en_es.jsonl +3 -0
- data/para_crawl_en_et.jsonl +3 -0
- data/para_crawl_en_fi.jsonl +3 -0
- data/para_crawl_en_fr.jsonl +0 -0
- data/para_crawl_en_ga.jsonl +3 -0
- data/para_crawl_en_hr.jsonl +3 -0
- data/para_crawl_en_hu.jsonl +3 -0
- data/para_crawl_en_it.jsonl +3 -0
- data/para_crawl_en_lt.jsonl +3 -0
- data/para_crawl_en_lv.jsonl +3 -0
- data/para_crawl_en_mt.jsonl +3 -0
- data/para_crawl_en_nl.jsonl +3 -0
- data/para_crawl_en_pl.jsonl +3 -0
- data/para_crawl_en_pt.jsonl +3 -0
- data/para_crawl_en_ro.jsonl +3 -0
- examples/load_data/plan_1.py +5 -0
- examples/preprocess/preprocess_para_crawl.py +24 -3
- language_identification.py +40 -2
- load_data.md +67 -3
README.md
CHANGED
@@ -53,6 +53,8 @@ Tips:
|
|
53 |
| para_pat | [ParaPat](https://aclanthology.org/2020.lrec-1.465.pdf); [Homepage](https://figshare.com/articles/dataset/ParaPat_The_Multi-Million_Sentences_Parallel_Corpus_of_Patents_Abstracts/12627632) | TRAIN: 10242500 | ParaPat:专利摘要的数百万个句子平行语料库 | [para_pat](https://huggingface.co/datasets/para_pat) |
|
54 |
| pib | [CVIT-PIB](https://arxiv.org/abs/2008.04860) | | 该数据集是 11 种印度语言的大规模句子对齐语料库,即: CVIT-PIB 语料库是印度语言可用的最大多语言语料库。 | [pib](https://huggingface.co/datasets/pib) |
|
55 |
| poleval2019_mt | | | PolEval 是一项受 SemEval 启发的波兰语自然语言处理工具评估活动。 | [poleval2019_mt](https://huggingface.co/datasets/poleval2019_mt) |
|
|
|
|
|
56 |
|
57 |
|
58 |
机器翻译
|
@@ -70,6 +72,38 @@ https://opus.nlpl.eu/
|
|
70 |
| para_crawl | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
71 |
| php | [PHP](https://opus.nlpl.eu/PHP/corpus/version/PHP) | TRAIN: 44007 | 最初从 http://se.php.net/download-docs.php 中提取的并行语料库。该语料库相当嘈杂。 | [php](https://huggingface.co/datasets/php) |
|
72 |
| tatoeba | [Tatoeba](https://opus.nlpl.eu/Tatoeba/corpus/version/Tatoeba); [tatoeba](https://tatoeba.org/); [Tatoeba Paper](https://arxiv.org/abs/1812.10464v2) | TRAIN: 702895 | Tatoeba 是句子和翻译的集合。 | [tatoeba](https://huggingface.co/datasets/tatoeba) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
|
75 |
### 参考来源
|
|
|
53 |
| para_pat | [ParaPat](https://aclanthology.org/2020.lrec-1.465.pdf); [Homepage](https://figshare.com/articles/dataset/ParaPat_The_Multi-Million_Sentences_Parallel_Corpus_of_Patents_Abstracts/12627632) | TRAIN: 10242500 | ParaPat:专利摘要的数百万个句子平行语料库 | [para_pat](https://huggingface.co/datasets/para_pat) |
|
54 |
| pib | [CVIT-PIB](https://arxiv.org/abs/2008.04860) | | 该数据集是 11 种印度语言的大规模句子对齐语料库,即: CVIT-PIB 语料库是印度语言可用的最大多语言语料库。 | [pib](https://huggingface.co/datasets/pib) |
|
55 |
| poleval2019_mt | | | PolEval 是一项受 SemEval 启发的波兰语自然语言处理工具评估活动。 | [poleval2019_mt](https://huggingface.co/datasets/poleval2019_mt) |
|
56 |
+
| wmt19 | [statmt.org](https://www.statmt.org/wmt19/translation-task.html) | 样本个数 | 我们的目标是尽可能使用公开的数据源。我们的训练数据主要来源是Europarl 语料库、 UN 语料库、新闻评论语料库和 ParaCrawl语料库。我们还发布了单语 新闻抓取语料库。将提供其他特定语言的语料库。 | [wmt/wmt19](https://huggingface.co/datasets/wmt/wmt19) |
|
57 |
+
| ro_sts_parallel | | 样本个数 | 我们提出 RO-STS-Parallel - 通过将 STS 英语数据集翻译成罗马尼亚语而获得的并行罗马尼亚语-英语数据集。 | [ro_sts_parallel](https://huggingface.co/datasets/ro_sts_parallel) |
|
58 |
|
59 |
|
60 |
机器翻译
|
|
|
72 |
| para_crawl | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
73 |
| php | [PHP](https://opus.nlpl.eu/PHP/corpus/version/PHP) | TRAIN: 44007 | 最初从 http://se.php.net/download-docs.php 中提取的并行语料库。该语料库相当嘈杂。 | [php](https://huggingface.co/datasets/php) |
|
74 |
| tatoeba | [Tatoeba](https://opus.nlpl.eu/Tatoeba/corpus/version/Tatoeba); [tatoeba](https://tatoeba.org/); [Tatoeba Paper](https://arxiv.org/abs/1812.10464v2) | TRAIN: 702895 | Tatoeba 是句子和翻译的集合。 | [tatoeba](https://huggingface.co/datasets/tatoeba) |
|
75 |
+
| qed_amara | [QED](https://opus.nlpl.eu/QED/corpus/version/QED) | 样本个数 | | [qed_amara](https://huggingface.co/datasets/qed_amara) |
|
76 |
+
| setimes | [SETIMES](https://opus.nlpl.eu/SETIMES/corpus/version/SETIMES) | 样本个数 | 英语和东南欧语言平行语料库 | [setimes](https://huggingface.co/datasets/setimes) |
|
77 |
+
| spc | [SPC](https://opus.nlpl.eu/SPC/corpus/version/SPC) | 样本个数 | | [spc](https://huggingface.co/datasets/spc) |
|
78 |
+
| tanzil | [Tanzil](https://opus.nlpl.eu/Tanzil/corpus/version/Tanzil) | 样本个数 | | [tanzil](https://huggingface.co/datasets/tanzil) |
|
79 |
+
|
80 |
+
|
81 |
+
机器翻译
|
82 |
+
|
83 |
+
https://opus.nlpl.eu/
|
84 |
+
|
85 |
+
| 数据 | 原始数据/项目地址 | 样本个数 | 原始数据描述 | 替代数据下载地址 |
|
86 |
+
| :--- | :---: | :---: | :---: | :---: |
|
87 |
+
| para_crawl_en_bg | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 1967082 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
88 |
+
| para_crawl_en_cs | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 5601171 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
89 |
+
| para_crawl_en_da | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 4617796 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
90 |
+
| para_crawl_en_de | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 31041474 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
91 |
+
| para_crawl_en_el | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 3799096 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
92 |
+
| para_crawl_en_es (MemoryError) | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | MemoryError | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
93 |
+
| para_crawl_en_et | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 1625870 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
94 |
+
| para_crawl_en_fi | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 4071888 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
95 |
+
| para_crawl_en_fr (MemoryError) | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | MemoryError | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
96 |
+
| para_crawl_en_ga | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 686474 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
97 |
+
| para_crawl_en_hr | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 1911081 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
98 |
+
| para_crawl_en_hu | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 3292718 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
99 |
+
| para_crawl_en_it | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 22718884 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
100 |
+
| para_crawl_en_lt | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 1554000 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
101 |
+
| para_crawl_en_lv | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 1059209 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
102 |
+
| para_crawl_en_mt | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 379616 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
103 |
+
| para_crawl_en_pl | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 6537110 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
104 |
+
| para_crawl_en_pt | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 15186124 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
105 |
+
| para_crawl_en_ro | [ParaCrawl](https://opus.nlpl.eu/ParaCrawl/corpus/version/ParaCrawl); [ParaCrawl](https://aclanthology.org/2020.acl-main.417.pdf) | TRAIN: 3580912 | 欧洲官方语言的网络规模并行语料库。 | [para_crawl](https://huggingface.co/datasets/para_crawl) |
|
106 |
+
|
107 |
|
108 |
|
109 |
### 参考来源
|
data/para_crawl_en_bg.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c109bf7b905f430233f8038fe1ca006f66033527a8b7c1001be96e671a0c638e
|
3 |
+
size 488593740
|
data/para_crawl_en_cs.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b8e8849dc243b163b01a96ceafc9c7d271f07ea9be9f7eed6c4f083a5dbb5fca
|
3 |
+
size 1028423849
|
data/para_crawl_en_da.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b291196df34491ade3212d5899cfc1d5b90e5b26ea548e11170c8156340b6350
|
3 |
+
size 921672376
|
data/para_crawl_en_de.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:443fcd45e0fcd216f19372c08a7965aec08c3ba3061edaca0e6aeed78b7facde
|
3 |
+
size 6174854971
|
data/para_crawl_en_el.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:88d8db935b1088940e81d079c6b447a581afa3c4877a6756a9d86e2b0d236785
|
3 |
+
size 949899855
|
data/para_crawl_en_es.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:50c05dda5ae094fb7ffe829c3b035ba42ced5ebe43a8d150e25647baedb4979c
|
3 |
+
size 8125092148
|
data/para_crawl_en_et.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1e0fc5a1074456d55fae1fa8942bad1d347ad44314997938ad3ea51759803ff
|
3 |
+
size 314654700
|
data/para_crawl_en_fi.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0b3797f6e391ad19ba7faef910ab8f2ffc9fe03d2a3820277e8a53a55e7ec976
|
3 |
+
size 802164519
|
data/para_crawl_en_fr.jsonl
ADDED
File without changes
|
data/para_crawl_en_ga.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:253967043892e55ff4afb1fb10665b64dd3defa2149ee357e05358107184470a
|
3 |
+
size 152261650
|
data/para_crawl_en_hr.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c36e7cbf09b429cedbef16c68a3e47c50c8abdf22be7e6ea58e6ebb17a71cf0b
|
3 |
+
size 382384467
|
data/para_crawl_en_hu.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:52025e26e42a1430b362b6df8143905d34740623307f11d3c5adfdcf23285152
|
3 |
+
size 614589993
|
data/para_crawl_en_it.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae72cdd6a68623c189552f46fb71b676daed7cc2edb5157e979573185682b13b
|
3 |
+
size 4887378831
|
data/para_crawl_en_lt.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc2c6919af380d8c61b72d2f957420b3b719883604dcd19e25a295020de880a6
|
3 |
+
size 303016979
|
data/para_crawl_en_lv.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d53fcd39cb7135c6ab7c0f452a576c4917aab9c4bf1d88cd71ab1a05e0c01734
|
3 |
+
size 216578225
|
data/para_crawl_en_mt.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ad2a8e2de3a94a3bc8c63e14af6edf53c467711dbe39924c4930c06662e08d3f
|
3 |
+
size 79926847
|
data/para_crawl_en_nl.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ee3510dc2de4375c1f95c4a650958813cefc1e899ac1631cc4250aa287d2a6a3
|
3 |
+
size 2121286142
|
data/para_crawl_en_pl.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:edbf5552e0ba4ea8c22002a340c570c530bd94e0b2f07e8cb6f8b423f33f6fa7
|
3 |
+
size 1304234343
|
data/para_crawl_en_pt.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63d2f4ff183a05c7c8bdcaaa60195bf63ee7f9329a4e63e8338cbb6eba6f6961
|
3 |
+
size 3071571433
|
data/para_crawl_en_ro.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:972f5b540ae63617e635055215f6a6beb06df8485f98954d76a54773c5ea603e
|
3 |
+
size 756706879
|
examples/load_data/plan_1.py
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
#!/usr/bin/python3
|
2 |
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
|
3 |
import argparse
|
4 |
import json
|
5 |
import os
|
|
|
1 |
#!/usr/bin/python3
|
2 |
# -*- coding: utf-8 -*-
|
3 |
+
"""
|
4 |
+
训练模型后发现它对短句子的识别能力很差。
|
5 |
+
当句子长度足够的时候,它能够识别准确,并给出接近1.0 的概率值。
|
6 |
+
但对于短句子,识别结果让人难以接受。例如把“你好”识别成 de 德语。
|
7 |
+
"""
|
8 |
import argparse
|
9 |
import json
|
10 |
import os
|
examples/preprocess/preprocess_para_crawl.py
CHANGED
@@ -4,6 +4,7 @@ import argparse
|
|
4 |
from collections import defaultdict
|
5 |
import json
|
6 |
import os
|
|
|
7 |
import sys
|
8 |
|
9 |
pwd = os.path.abspath(os.path.dirname(__file__))
|
@@ -26,7 +27,7 @@ def get_args():
|
|
26 |
)
|
27 |
parser.add_argument(
|
28 |
"--output_file",
|
29 |
-
default=(project_path / "data/
|
30 |
type=str
|
31 |
)
|
32 |
|
@@ -38,8 +39,28 @@ def main():
|
|
38 |
args = get_args()
|
39 |
|
40 |
name_list = [
|
41 |
-
"enbg",
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
]
|
44 |
|
45 |
# TODO: 数据集太大,加载不完。
|
|
|
4 |
from collections import defaultdict
|
5 |
import json
|
6 |
import os
|
7 |
+
from pathlib import Path
|
8 |
import sys
|
9 |
|
10 |
pwd = os.path.abspath(os.path.dirname(__file__))
|
|
|
27 |
)
|
28 |
parser.add_argument(
|
29 |
"--output_file",
|
30 |
+
default=(project_path / "data/para_crawl_en_ro.jsonl"),
|
31 |
type=str
|
32 |
)
|
33 |
|
|
|
39 |
args = get_args()
|
40 |
|
41 |
name_list = [
|
42 |
+
# "enbg",
|
43 |
+
# "encs",
|
44 |
+
# "enda",
|
45 |
+
# "ende",
|
46 |
+
# "enel",
|
47 |
+
# "enes",
|
48 |
+
# "enet",
|
49 |
+
# "enfi",
|
50 |
+
# "enfr",
|
51 |
+
# "enga",
|
52 |
+
# "enhr",
|
53 |
+
# "enhu",
|
54 |
+
# "enit",
|
55 |
+
# "enlt",
|
56 |
+
# "enlv",
|
57 |
+
# "enmt",
|
58 |
+
# "ennl",
|
59 |
+
# "enpl",
|
60 |
+
# "enpt",
|
61 |
+
"enro",
|
62 |
+
# "ensk",
|
63 |
+
# "ensl", "ensv"
|
64 |
]
|
65 |
|
66 |
# TODO: 数据集太大,加载不完。
|
language_identification.py
CHANGED
@@ -30,7 +30,26 @@ _URLS = {
|
|
30 |
"nbnn": "data/nbnn.jsonl",
|
31 |
"nordic_langid": "data/nordic_langid.jsonl",
|
32 |
"open_subtitles": "data/open_subtitles.jsonl",
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
"para_pat": "data/para_pat.jsonl",
|
35 |
"php": "data/php.jsonl",
|
36 |
"scandi_langid": "data/scandi_langid.jsonl",
|
@@ -138,7 +157,26 @@ class LanguageIdentification(datasets.GeneratorBasedBuilder):
|
|
138 |
datasets.BuilderConfig(name="nbnn", version=VERSION, description="nbnn"),
|
139 |
datasets.BuilderConfig(name="nordic_langid", version=VERSION, description="nordic_langid"),
|
140 |
datasets.BuilderConfig(name="open_subtitles", version=VERSION, description="open_subtitles"),
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
datasets.BuilderConfig(name="para_pat", version=VERSION, description="para_pat"),
|
143 |
datasets.BuilderConfig(name="php", version=VERSION, description="php"),
|
144 |
datasets.BuilderConfig(name="scandi_langid", version=VERSION, description="scandi_langid"),
|
|
|
30 |
"nbnn": "data/nbnn.jsonl",
|
31 |
"nordic_langid": "data/nordic_langid.jsonl",
|
32 |
"open_subtitles": "data/open_subtitles.jsonl",
|
33 |
+
"para_crawl_en_bg": "data/para_crawl_en_bg.jsonl",
|
34 |
+
"para_crawl_en_cs": "data/para_crawl_en_cs.jsonl",
|
35 |
+
"para_crawl_en_da": "data/para_crawl_en_da.jsonl",
|
36 |
+
"para_crawl_en_de": "data/para_crawl_en_de.jsonl",
|
37 |
+
"para_crawl_en_el": "data/para_crawl_en_el.jsonl",
|
38 |
+
"para_crawl_en_es": "data/para_crawl_en_es.jsonl",
|
39 |
+
"para_crawl_en_et": "data/para_crawl_en_et.jsonl",
|
40 |
+
"para_crawl_en_fi": "data/para_crawl_en_fi.jsonl",
|
41 |
+
"para_crawl_en_fr": "data/para_crawl_en_fr.jsonl",
|
42 |
+
"para_crawl_en_ga": "data/para_crawl_en_ga.jsonl",
|
43 |
+
"para_crawl_en_hr": "data/para_crawl_en_hr.jsonl",
|
44 |
+
"para_crawl_en_hu": "data/para_crawl_en_hu.jsonl",
|
45 |
+
"para_crawl_en_it": "data/para_crawl_en_it.jsonl",
|
46 |
+
"para_crawl_en_lt": "data/para_crawl_en_lt.jsonl",
|
47 |
+
"para_crawl_en_lv": "data/para_crawl_en_lv.jsonl",
|
48 |
+
"para_crawl_en_mt": "data/para_crawl_en_mt.jsonl",
|
49 |
+
"para_crawl_en_nl": "data/para_crawl_en_nl.jsonl",
|
50 |
+
"para_crawl_en_pl": "data/para_crawl_en_pl.jsonl",
|
51 |
+
"para_crawl_en_pt": "data/para_crawl_en_pt.jsonl",
|
52 |
+
"para_crawl_en_ro": "data/para_crawl_en_ro.jsonl",
|
53 |
"para_pat": "data/para_pat.jsonl",
|
54 |
"php": "data/php.jsonl",
|
55 |
"scandi_langid": "data/scandi_langid.jsonl",
|
|
|
157 |
datasets.BuilderConfig(name="nbnn", version=VERSION, description="nbnn"),
|
158 |
datasets.BuilderConfig(name="nordic_langid", version=VERSION, description="nordic_langid"),
|
159 |
datasets.BuilderConfig(name="open_subtitles", version=VERSION, description="open_subtitles"),
|
160 |
+
datasets.BuilderConfig(name="para_crawl_en_bg", version=VERSION, description="para_crawl_en_bg"),
|
161 |
+
datasets.BuilderConfig(name="para_crawl_en_cs", version=VERSION, description="para_crawl_en_cs"),
|
162 |
+
datasets.BuilderConfig(name="para_crawl_en_da", version=VERSION, description="para_crawl_en_da"),
|
163 |
+
datasets.BuilderConfig(name="para_crawl_en_de", version=VERSION, description="para_crawl_en_de"),
|
164 |
+
datasets.BuilderConfig(name="para_crawl_en_el", version=VERSION, description="para_crawl_en_el"),
|
165 |
+
datasets.BuilderConfig(name="para_crawl_en_es", version=VERSION, description="para_crawl_en_es"),
|
166 |
+
datasets.BuilderConfig(name="para_crawl_en_et", version=VERSION, description="para_crawl_en_et"),
|
167 |
+
datasets.BuilderConfig(name="para_crawl_en_fi", version=VERSION, description="para_crawl_en_fi"),
|
168 |
+
datasets.BuilderConfig(name="para_crawl_en_fr", version=VERSION, description="para_crawl_en_fr"),
|
169 |
+
datasets.BuilderConfig(name="para_crawl_en_ga", version=VERSION, description="para_crawl_en_ga"),
|
170 |
+
datasets.BuilderConfig(name="para_crawl_en_hr", version=VERSION, description="para_crawl_en_hr"),
|
171 |
+
datasets.BuilderConfig(name="para_crawl_en_hu", version=VERSION, description="para_crawl_en_hu"),
|
172 |
+
datasets.BuilderConfig(name="para_crawl_en_it", version=VERSION, description="para_crawl_en_it"),
|
173 |
+
datasets.BuilderConfig(name="para_crawl_en_lt", version=VERSION, description="para_crawl_en_lt"),
|
174 |
+
datasets.BuilderConfig(name="para_crawl_en_lv", version=VERSION, description="para_crawl_en_lv"),
|
175 |
+
datasets.BuilderConfig(name="para_crawl_en_mt", version=VERSION, description="para_crawl_en_mt"),
|
176 |
+
datasets.BuilderConfig(name="para_crawl_en_nl", version=VERSION, description="para_crawl_en_nl"),
|
177 |
+
datasets.BuilderConfig(name="para_crawl_en_pl", version=VERSION, description="para_crawl_en_pl"),
|
178 |
+
datasets.BuilderConfig(name="para_crawl_en_pt", version=VERSION, description="para_crawl_en_pt"),
|
179 |
+
datasets.BuilderConfig(name="para_crawl_en_ro", version=VERSION, description="para_crawl_en_ro"),
|
180 |
datasets.BuilderConfig(name="para_pat", version=VERSION, description="para_pat"),
|
181 |
datasets.BuilderConfig(name="php", version=VERSION, description="php"),
|
182 |
datasets.BuilderConfig(name="scandi_langid", version=VERSION, description="scandi_langid"),
|
load_data.md
CHANGED
@@ -59,10 +59,74 @@
|
|
59 |
| zu | zulu, south africa | 10000 | autshumato |
|
60 |
|
61 |
|
62 |
-
|
63 |
-
```
|
64 |
-
|
|
|
|
|
|
|
65 |
|
|
|
|
|
|
|
66 |
|
67 |
```
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
| zu | zulu, south africa | 10000 | autshumato |
|
60 |
|
61 |
|
62 |
+
备注:
|
63 |
+
```text
|
64 |
+
问题1:
|
65 |
+
训练模型后发现它对短句子的识别能力很差。
|
66 |
+
当句子长度足够的时候,它能够识别准确,并给出接近1.0 的概率值。
|
67 |
+
但对于短句子,识别结果让人难以接受。例如把“你好”识别成 de 德语。
|
68 |
|
69 |
+
解答1:
|
70 |
+
(1)数据增强,将句子截短。
|
71 |
+
(2)我认为可考虑加大 dropout,狠狠的 dropout。
|
72 |
|
73 |
```
|
74 |
|
75 |
+
### 方案2
|
76 |
+
|
77 |
+
语种:
|
78 |
+
|
79 |
+
| 语种 | 语种全称 | 样本个数 | 数据来源 |
|
80 |
+
| :--- | :---: | :---: | :---: |
|
81 |
+
| ar | arabic | 100000 | iwslt2017 |
|
82 |
+
| bg | bulgarian | 100000 | xnli |
|
83 |
+
| bn | bengali | 36064 | open_subtitles |
|
84 |
+
| bs | bosnian | 10212 | open_subtitles |
|
85 |
+
| cs | czech | 100000 | emea |
|
86 |
+
| da | danish | 100000 | open_subtitles |
|
87 |
+
| de | german | 100000 | iwslt2017 |
|
88 |
+
| el | modern greek | 100000 | emea |
|
89 |
+
| en | english | 100000 | iwslt2017 |
|
90 |
+
| eo | esperanto | 94101 | tatoeba; open_subtitles |
|
91 |
+
| es | spanish | 100000 | xnli |
|
92 |
+
| et | estonian | 100000 | emea |
|
93 |
+
| fi | finnish | 100000 | ecb; kde4 |
|
94 |
+
| fo | faroese | 23807 | nordic_langid |
|
95 |
+
| fr | french | 100000 | iwslt2017 |
|
96 |
+
| ga | irish | 100000 | multi_para_crawl |
|
97 |
+
| gl | galician | 3096 | tatoeba |
|
98 |
+
| hi | hindi | 100000 | xnli |
|
99 |
+
| hi_en | hindi | 7180 | cmu_hinglish_dog |
|
100 |
+
| hr | croatian | 95844 | hrenwac_para |
|
101 |
+
| hu | hungarian | 3801 | europa_ecdc_tm; europa_eac_tm |
|
102 |
+
| hy | armenian | 660 | open_subtitles |
|
103 |
+
| id | indonesian | 23940 | id_panl_bppt |
|
104 |
+
| is | icelandic | 100000 | multi_para_crawl |
|
105 |
+
| it | italian | 100000 | iwslt2017 |
|
106 |
+
| ja | japanese | 100000 | iwslt2017 |
|
107 |
+
| ko | korean | 100000 | iwslt2017 |
|
108 |
+
| lt | lithuanian | 100000 | emea |
|
109 |
+
| lv | latvian | 100000 | multi_para_crawl |
|
110 |
+
| mr | marathi | 51807 | tatoeba |
|
111 |
+
| mt | maltese | 100000 | multi_para_crawl |
|
112 |
+
| nl | dutch | 100000 | kde4 |
|
113 |
+
| no | norwegian | 100000 | multi_para_crawl |
|
114 |
+
| pl | polish | - | ecb |
|
115 |
+
| pt | portuguese | 10000 | tatoeba |
|
116 |
+
| ro | romanian | 10000 | kde4 |
|
117 |
+
| ru | russian | 10000 | xnli |
|
118 |
+
| sk | slovak | 10000 | multi_para_crawl |
|
119 |
+
| sl | slovenian | 4589 | europa_ecdc_tm; europa_eac_tm |
|
120 |
+
| sw | swahili | 10000 | xnli |
|
121 |
+
| sv | swedish | 10000 | kde4 |
|
122 |
+
| th | thai | 10000 | xnli |
|
123 |
+
| tl | tagalog | 10000 | multi_para_crawl |
|
124 |
+
| tn | serpeti | 10000 | autshumato |
|
125 |
+
| tr | turkish | 10000 | xnli |
|
126 |
+
| ts | dzonga | 10000 | autshumato |
|
127 |
+
| ur | urdu | 10000 | xnli |
|
128 |
+
| vi | vietnamese | 10000 | xnli |
|
129 |
+
| yo | yoruba | 9970 | menyo20k_mt |
|
130 |
+
| zh | chinese | 10000 | xnli |
|
131 |
+
| zu | zulu, south africa | 10000 | autshumato |
|
132 |
+
|