Commit
•
0ac9659
1
Parent(s):
0548ccc
Update en and jp data URLs to 2021 version
Browse files
alt.py
CHANGED
@@ -27,8 +27,8 @@ The ALT project aims to advance the state-of-the-art Asian natural language proc
|
|
27 |
|
28 |
_URLs = {
|
29 |
"alt": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/ALT-Parallel-Corpus-20191206.zip",
|
30 |
-
"alt-en": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/English-ALT-
|
31 |
-
"alt-jp": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/Japanese-ALT-
|
32 |
"alt-my": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/my-alt-190530.zip",
|
33 |
"alt-my-transliteration": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/my-en-transliteration.zip",
|
34 |
"alt-my-west-transliteration": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/western-myanmar-transliteration.zip",
|
@@ -83,8 +83,8 @@ class Alt(datasets.GeneratorBasedBuilder):
|
|
83 |
AltParallelConfig(
|
84 |
languages=["bg", "en", "en_tok", "fil", "hi", "id", "ja", "khm", "lo", "ms", "my", "th", "vi", "zh"]
|
85 |
),
|
86 |
-
datasets.BuilderConfig(name="alt-en", version=datasets.Version("
|
87 |
-
datasets.BuilderConfig(name="alt-jp", version=datasets.Version("
|
88 |
datasets.BuilderConfig(name="alt-my", version=datasets.Version("1.0.0"), description="Myanmar ALT"),
|
89 |
datasets.BuilderConfig(name="alt-km", version=datasets.Version("1.0.0"), description="Khmer ALT"),
|
90 |
datasets.BuilderConfig(
|
@@ -253,7 +253,7 @@ class Alt(datasets.GeneratorBasedBuilder):
|
|
253 |
elif self.config.name == "alt-en":
|
254 |
data = {}
|
255 |
for fname in ["English-ALT-Draft.txt", "English-ALT-Reviewed.txt"]:
|
256 |
-
file_path = os.path.join(basepath, "English-ALT-
|
257 |
fin = open(file_path, encoding="utf-8")
|
258 |
for line in fin:
|
259 |
line = line.strip()
|
@@ -282,7 +282,7 @@ class Alt(datasets.GeneratorBasedBuilder):
|
|
282 |
elif self.config.name == "alt-jp":
|
283 |
data = {}
|
284 |
for fname in ["Japanese-ALT-Draft.txt", "Japanese-ALT-Reviewed.txt"]:
|
285 |
-
file_path = os.path.join(basepath, "Japanese-ALT-
|
286 |
fin = open(file_path, encoding="utf-8")
|
287 |
for line in fin:
|
288 |
line = line.strip()
|
@@ -316,7 +316,7 @@ class Alt(datasets.GeneratorBasedBuilder):
|
|
316 |
"jp_tokenized": "word-alignment/data_ja.ja-tok",
|
317 |
}
|
318 |
for k in keys:
|
319 |
-
file_path = os.path.join(basepath, "Japanese-ALT-
|
320 |
fin = open(file_path, encoding="utf-8")
|
321 |
for line in fin:
|
322 |
line = line.strip()
|
|
|
27 |
|
28 |
_URLs = {
|
29 |
"alt": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/ALT-Parallel-Corpus-20191206.zip",
|
30 |
+
"alt-en": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/English-ALT-20210218.zip",
|
31 |
+
"alt-jp": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/Japanese-ALT-20210218.zip",
|
32 |
"alt-my": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/my-alt-190530.zip",
|
33 |
"alt-my-transliteration": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/my-en-transliteration.zip",
|
34 |
"alt-my-west-transliteration": "https://www2.nict.go.jp/astrec-att/member/mutiyama/ALT/western-myanmar-transliteration.zip",
|
|
|
83 |
AltParallelConfig(
|
84 |
languages=["bg", "en", "en_tok", "fil", "hi", "id", "ja", "khm", "lo", "ms", "my", "th", "vi", "zh"]
|
85 |
),
|
86 |
+
datasets.BuilderConfig(name="alt-en", version=datasets.Version("2.0.0"), description="English ALT 2021 version"),
|
87 |
+
datasets.BuilderConfig(name="alt-jp", version=datasets.Version("2.0.0"), description="Japanese ALT 2021 version"),
|
88 |
datasets.BuilderConfig(name="alt-my", version=datasets.Version("1.0.0"), description="Myanmar ALT"),
|
89 |
datasets.BuilderConfig(name="alt-km", version=datasets.Version("1.0.0"), description="Khmer ALT"),
|
90 |
datasets.BuilderConfig(
|
|
|
253 |
elif self.config.name == "alt-en":
|
254 |
data = {}
|
255 |
for fname in ["English-ALT-Draft.txt", "English-ALT-Reviewed.txt"]:
|
256 |
+
file_path = os.path.join(basepath, "English-ALT-20210218", fname)
|
257 |
fin = open(file_path, encoding="utf-8")
|
258 |
for line in fin:
|
259 |
line = line.strip()
|
|
|
282 |
elif self.config.name == "alt-jp":
|
283 |
data = {}
|
284 |
for fname in ["Japanese-ALT-Draft.txt", "Japanese-ALT-Reviewed.txt"]:
|
285 |
+
file_path = os.path.join(basepath, "Japanese-ALT-20210218", fname)
|
286 |
fin = open(file_path, encoding="utf-8")
|
287 |
for line in fin:
|
288 |
line = line.strip()
|
|
|
316 |
"jp_tokenized": "word-alignment/data_ja.ja-tok",
|
317 |
}
|
318 |
for k in keys:
|
319 |
+
file_path = os.path.join(basepath, "Japanese-ALT-20210218", keys[k])
|
320 |
fin = open(file_path, encoding="utf-8")
|
321 |
for line in fin:
|
322 |
line = line.strip()
|