File size: 126,694 Bytes
78aa4ee |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 |
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "English2Tigrigna",
"provenance": [],
"collapsed_sections": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "code",
"metadata": {
"id": "BE3onLtiHvP5",
"colab_type": "code",
"outputId": "5e0a4bc0-b6a8-4225-da07-21371e9dd01d",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
}
},
"source": [
"from google.colab import drive\n",
"drive.mount('/content/drive')"
],
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
"text": [
"Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "iapTRdQLH2MO",
"colab_type": "code",
"colab": {}
},
"source": [
"# TODO: Set your source and target languages. Keep in mind, these traditionally use language codes as found here:\n",
"# These will also become the suffix's of all vocab and corpus files used throughout\n",
"import os\n",
"source_language = \"en\"\n",
"target_language = \"ti\"\n",
"tag = \"baseline\" # Give a unique name to your folder - this is to ensure you don't rewrite any models you've already submitted\n",
"\n",
"os.environ[\"src\"] = source_language # Sets them in bash as well, since we often use bash scripts\n",
"os.environ[\"tgt\"] = target_language\n",
"os.environ[\"tag\"] = tag\n",
"\n",
"# This will save it to a folder in our gdrive instead!\n",
"!mkdir -p \"/content/drive/My Drive/masakhane/$src-$tgt\"\n",
"os.environ[\"gdrive_path\"] = \"/content/drive/My Drive/masakhane/%s-%s\" % (source_language, target_language)"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "JI0nLF_Zt6Of",
"colab_type": "code",
"outputId": "11a31484-6c94-47df-d15e-0a035cae13d3",
"colab": {
"resources": {
"http://localhost:8080/nbextensions/google.colab/files.js": {
"data": "Ly8gQ29weXJpZ2h0IDIwMTcgR29vZ2xlIExMQwovLwovLyBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgIkxpY2Vuc2UiKTsKLy8geW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLgovLyBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQKLy8KLy8gICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjAKLy8KLy8gVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZQovLyBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLAovLyBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC4KLy8gU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAovLyBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KCi8qKgogKiBAZmlsZW92ZXJ2aWV3IEhlbHBlcnMgZm9yIGdvb2dsZS5jb2xhYiBQeXRob24gbW9kdWxlLgogKi8KKGZ1bmN0aW9uKHNjb3BlKSB7CmZ1bmN0aW9uIHNwYW4odGV4dCwgc3R5bGVBdHRyaWJ1dGVzID0ge30pIHsKICBjb25zdCBlbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc3BhbicpOwogIGVsZW1lbnQudGV4dENvbnRlbnQgPSB0ZXh0OwogIGZvciAoY29uc3Qga2V5IG9mIE9iamVjdC5rZXlzKHN0eWxlQXR0cmlidXRlcykpIHsKICAgIGVsZW1lbnQuc3R5bGVba2V5XSA9IHN0eWxlQXR0cmlidXRlc1trZXldOwogIH0KICByZXR1cm4gZWxlbWVudDsKfQoKLy8gTWF4IG51bWJlciBvZiBieXRlcyB3aGljaCB3aWxsIGJlIHVwbG9hZGVkIGF0IGEgdGltZS4KY29uc3QgTUFYX1BBWUxPQURfU0laRSA9IDEwMCAqIDEwMjQ7Ci8vIE1heCBhbW91bnQgb2YgdGltZSB0byBibG9jayB3YWl0aW5nIGZvciB0aGUgdXNlci4KY29uc3QgRklMRV9DSEFOR0VfVElNRU9VVF9NUyA9IDMwICogMTAwMDsKCmZ1bmN0aW9uIF91cGxvYWRGaWxlcyhpbnB1dElkLCBvdXRwdXRJZCkgewogIGNvbnN0IHN0ZXBzID0gdXBsb2FkRmlsZXNTdGVwKGlucHV0SWQsIG91dHB1dElkKTsKICBjb25zdCBvdXRwdXRFbGVtZW50ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQob3V0cHV0SWQpOwogIC8vIENhY2hlIHN0ZXBzIG9uIHRoZSBvdXRwdXRFbGVtZW50IHRvIG1ha2UgaXQgYXZhaWxhYmxlIGZvciB0aGUgbmV4dCBjYWxsCiAgLy8gdG8gdXBsb2FkRmlsZXNDb250aW51ZSBmcm9tIFB5dGhvbi4KICBvdXRwdXRFbGVtZW50LnN0ZXBzID0gc3RlcHM7CgogIHJldHVybiBfdXBsb2FkRmlsZXNDb250aW51ZShvdXRwdXRJZCk7Cn0KCi8vIFRoaXMgaXMgcm91Z2hseSBhbiBhc3luYyBnZW5lcmF0b3IgKG5vdCBzdXBwb3J0ZWQgaW4gdGhlIGJyb3dzZXIgeWV0KSwKLy8gd2hlcmUgdGhlcmUgYXJlIG11bHRpcGxlIGFzeW5jaHJvbm91cyBzdGVwcyBhbmQgdGhlIFB5dGhvbiBzaWRlIGlzIGdvaW5nCi8vIHRvIHBvbGwgZm9yIGNvbXBsZXRpb24gb2YgZWFjaCBzdGVwLgovLyBUaGlzIHVzZXMgYSBQcm9taXNlIHRvIGJsb2NrIHRoZSBweXRob24gc2lkZSBvbiBjb21wbGV0aW9uIG9mIGVhY2ggc3RlcCwKLy8gdGhlbiBwYXNzZXMgdGhlIHJlc3VsdCBvZiB0aGUgcHJldmlvdXMgc3RlcCBhcyB0aGUgaW5wdXQgdG8gdGhlIG5leHQgc3RlcC4KZnVuY3Rpb24gX3VwbG9hZEZpbGVzQ29udGludWUob3V0cHV0SWQpIHsKICBjb25zdCBvdXRwdXRFbGVtZW50ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQob3V0cHV0SWQpOwogIGNvbnN0IHN0ZXBzID0gb3V0cHV0RWxlbWVudC5zdGVwczsKCiAgY29uc3QgbmV4dCA9IHN0ZXBzLm5leHQob3V0cHV0RWxlbWVudC5sYXN0UHJvbWlzZVZhbHVlKTsKICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKG5leHQudmFsdWUucHJvbWlzZSkudGhlbigodmFsdWUpID0+IHsKICAgIC8vIENhY2hlIHRoZSBsYXN0IHByb21pc2UgdmFsdWUgdG8gbWFrZSBpdCBhdmFpbGFibGUgdG8gdGhlIG5leHQKICAgIC8vIHN0ZXAgb2YgdGhlIGdlbmVyYXRvci4KICAgIG91dHB1dEVsZW1lbnQubGFzdFByb21pc2VWYWx1ZSA9IHZhbHVlOwogICAgcmV0dXJuIG5leHQudmFsdWUucmVzcG9uc2U7CiAgfSk7Cn0KCi8qKgogKiBHZW5lcmF0b3IgZnVuY3Rpb24gd2hpY2ggaXMgY2FsbGVkIGJldHdlZW4gZWFjaCBhc3luYyBzdGVwIG9mIHRoZSB1cGxvYWQKICogcHJvY2Vzcy4KICogQHBhcmFtIHtzdHJpbmd9IGlucHV0SWQgRWxlbWVudCBJRCBvZiB0aGUgaW5wdXQgZmlsZSBwaWNrZXIgZWxlbWVudC4KICogQHBhcmFtIHtzdHJpbmd9IG91dHB1dElkIEVsZW1lbnQgSUQgb2YgdGhlIG91dHB1dCBkaXNwbGF5LgogKiBAcmV0dXJuIHshSXRlcmFibGU8IU9iamVjdD59IEl0ZXJhYmxlIG9mIG5leHQgc3RlcHMuCiAqLwpmdW5jdGlvbiogdXBsb2FkRmlsZXNTdGVwKGlucHV0SWQsIG91dHB1dElkKSB7CiAgY29uc3QgaW5wdXRFbGVtZW50ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoaW5wdXRJZCk7CiAgaW5wdXRFbGVtZW50LmRpc2FibGVkID0gZmFsc2U7CgogIGNvbnN0IG91dHB1dEVsZW1lbnQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChvdXRwdXRJZCk7CiAgb3V0cHV0RWxlbWVudC5pbm5lckhUTUwgPSAnJzsKCiAgY29uc3QgcGlja2VkUHJvbWlzZSA9IG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7CiAgICBpbnB1dEVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2hhbmdlJywgKGUpID0+IHsKICAgICAgcmVzb2x2ZShlLnRhcmdldC5maWxlcyk7CiAgICB9KTsKICB9KTsKCiAgY29uc3QgY2FuY2VsID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYnV0dG9uJyk7CiAgaW5wdXRFbGVtZW50LnBhcmVudEVsZW1lbnQuYXBwZW5kQ2hpbGQoY2FuY2VsKTsKICBjYW5jZWwudGV4dENvbnRlbnQgPSAnQ2FuY2VsIHVwbG9hZCc7CiAgY29uc3QgY2FuY2VsUHJvbWlzZSA9IG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7CiAgICBjYW5jZWwub25jbGljayA9ICgpID0+IHsKICAgICAgcmVzb2x2ZShudWxsKTsKICAgIH07CiAgfSk7CgogIC8vIENhbmNlbCB1cGxvYWQgaWYgdXNlciBoYXNuJ3QgcGlja2VkIGFueXRoaW5nIGluIHRpbWVvdXQuCiAgY29uc3QgdGltZW91dFByb21pc2UgPSBuZXcgUHJvbWlzZSgocmVzb2x2ZSkgPT4gewogICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgIHJlc29sdmUobnVsbCk7CiAgICB9LCBGSUxFX0NIQU5HRV9USU1FT1VUX01TKTsKICB9KTsKCiAgLy8gV2FpdCBmb3IgdGhlIHVzZXIgdG8gcGljayB0aGUgZmlsZXMuCiAgY29uc3QgZmlsZXMgPSB5aWVsZCB7CiAgICBwcm9taXNlOiBQcm9taXNlLnJhY2UoW3BpY2tlZFByb21pc2UsIHRpbWVvdXRQcm9taXNlLCBjYW5jZWxQcm9taXNlXSksCiAgICByZXNwb25zZTogewogICAgICBhY3Rpb246ICdzdGFydGluZycsCiAgICB9CiAgfTsKCiAgaWYgKCFmaWxlcykgewogICAgcmV0dXJuIHsKICAgICAgcmVzcG9uc2U6IHsKICAgICAgICBhY3Rpb246ICdjb21wbGV0ZScsCiAgICAgIH0KICAgIH07CiAgfQoKICBjYW5jZWwucmVtb3ZlKCk7CgogIC8vIERpc2FibGUgdGhlIGlucHV0IGVsZW1lbnQgc2luY2UgZnVydGhlciBwaWNrcyBhcmUgbm90IGFsbG93ZWQuCiAgaW5wdXRFbGVtZW50LmRpc2FibGVkID0gdHJ1ZTsKCiAgZm9yIChjb25zdCBmaWxlIG9mIGZpbGVzKSB7CiAgICBjb25zdCBsaSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2xpJyk7CiAgICBsaS5hcHBlbmQoc3BhbihmaWxlLm5hbWUsIHtmb250V2VpZ2h0OiAnYm9sZCd9KSk7CiAgICBsaS5hcHBlbmQoc3BhbigKICAgICAgICBgKCR7ZmlsZS50eXBlIHx8ICduL2EnfSkgLSAke2ZpbGUuc2l6ZX0gYnl0ZXMsIGAgKwogICAgICAgIGBsYXN0IG1vZGlmaWVkOiAkewogICAgICAgICAgICBmaWxlLmxhc3RNb2RpZmllZERhdGUgPyBmaWxlLmxhc3RNb2RpZmllZERhdGUudG9Mb2NhbGVEYXRlU3RyaW5nKCkgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbi9hJ30gLSBgKSk7CiAgICBjb25zdCBwZXJjZW50ID0gc3BhbignMCUgZG9uZScpOwogICAgbGkuYXBwZW5kQ2hpbGQocGVyY2VudCk7CgogICAgb3V0cHV0RWxlbWVudC5hcHBlbmRDaGlsZChsaSk7CgogICAgY29uc3QgZmlsZURhdGFQcm9taXNlID0gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHsKICAgICAgY29uc3QgcmVhZGVyID0gbmV3IEZpbGVSZWFkZXIoKTsKICAgICAgcmVhZGVyLm9ubG9hZCA9IChlKSA9PiB7CiAgICAgICAgcmVzb2x2ZShlLnRhcmdldC5yZXN1bHQpOwogICAgICB9OwogICAgICByZWFkZXIucmVhZEFzQXJyYXlCdWZmZXIoZmlsZSk7CiAgICB9KTsKICAgIC8vIFdhaXQgZm9yIHRoZSBkYXRhIHRvIGJlIHJlYWR5LgogICAgbGV0IGZpbGVEYXRhID0geWllbGQgewogICAgICBwcm9taXNlOiBmaWxlRGF0YVByb21pc2UsCiAgICAgIHJlc3BvbnNlOiB7CiAgICAgICAgYWN0aW9uOiAnY29udGludWUnLAogICAgICB9CiAgICB9OwoKICAgIC8vIFVzZSBhIGNodW5rZWQgc2VuZGluZyB0byBhdm9pZCBtZXNzYWdlIHNpemUgbGltaXRzLiBTZWUgYi82MjExNTY2MC4KICAgIGxldCBwb3NpdGlvbiA9IDA7CiAgICB3aGlsZSAocG9zaXRpb24gPCBmaWxlRGF0YS5ieXRlTGVuZ3RoKSB7CiAgICAgIGNvbnN0IGxlbmd0aCA9IE1hdGgubWluKGZpbGVEYXRhLmJ5dGVMZW5ndGggLSBwb3NpdGlvbiwgTUFYX1BBWUxPQURfU0laRSk7CiAgICAgIGNvbnN0IGNodW5rID0gbmV3IFVpbnQ4QXJyYXkoZmlsZURhdGEsIHBvc2l0aW9uLCBsZW5ndGgpOwogICAgICBwb3NpdGlvbiArPSBsZW5ndGg7CgogICAgICBjb25zdCBiYXNlNjQgPSBidG9hKFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkobnVsbCwgY2h1bmspKTsKICAgICAgeWllbGQgewogICAgICAgIHJlc3BvbnNlOiB7CiAgICAgICAgICBhY3Rpb246ICdhcHBlbmQnLAogICAgICAgICAgZmlsZTogZmlsZS5uYW1lLAogICAgICAgICAgZGF0YTogYmFzZTY0LAogICAgICAgIH0sCiAgICAgIH07CiAgICAgIHBlcmNlbnQudGV4dENvbnRlbnQgPQogICAgICAgICAgYCR7TWF0aC5yb3VuZCgocG9zaXRpb24gLyBmaWxlRGF0YS5ieXRlTGVuZ3RoKSAqIDEwMCl9JSBkb25lYDsKICAgIH0KICB9CgogIC8vIEFsbCBkb25lLgogIHlpZWxkIHsKICAgIHJlc3BvbnNlOiB7CiAgICAgIGFjdGlvbjogJ2NvbXBsZXRlJywKICAgIH0KICB9Owp9CgpzY29wZS5nb29nbGUgPSBzY29wZS5nb29nbGUgfHwge307CnNjb3BlLmdvb2dsZS5jb2xhYiA9IHNjb3BlLmdvb2dsZS5jb2xhYiB8fCB7fTsKc2NvcGUuZ29vZ2xlLmNvbGFiLl9maWxlcyA9IHsKICBfdXBsb2FkRmlsZXMsCiAgX3VwbG9hZEZpbGVzQ29udGludWUsCn07Cn0pKHNlbGYpOwo=",
"ok": true,
"headers": [
[
"content-type",
"application/javascript"
]
],
"status": 200,
"status_text": ""
}
},
"base_uri": "https://localhost:8080/",
"height": 74
}
},
"source": [
"from google.colab import files\n",
"uploaded = files.upload()"
],
"execution_count": 7,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
"\n",
" <input type=\"file\" id=\"files-5e4cdd80-c63a-4409-956b-78b79eca3da2\" name=\"files[]\" multiple disabled />\n",
" <output id=\"result-5e4cdd80-c63a-4409-956b-78b79eca3da2\">\n",
" Upload widget is only available when the cell has been executed in the\n",
" current browser session. Please rerun this cell to enable.\n",
" </output>\n",
" <script src=\"/nbextensions/google.colab/files.js\"></script> "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"Saving en_ti.csv to en_ti (2).csv\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab_type": "code",
"id": "3v_ndeVfPA3q",
"colab": {}
},
"source": [
"import pandas as pd\n",
"import io\n",
"data = pd.read_csv(io.BytesIO(uploaded['en_ti.csv']))\n",
"# Dataset is now stored in a Pandas Dataframe"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "gQF4yAXfuOSA",
"colab_type": "code",
"outputId": "a94612f9-c218-4ddf-c936-325baa87f418",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 204
}
},
"source": [
"data.head()"
],
"execution_count": 10,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>English</th>\n",
" <th>Tigrigna</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>17 When Aʹbram was 99 years old, Jehovah appe...</td>\n",
" <td>17 ኣብራም ወዲ 99 ዓመት ምስ ኰነ፡ የሆዋ ንኣብራም ተራእዮ፣ “ኣነ ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2 I will establish my covenant between me and...</td>\n",
" <td>2 ኣነ ድማ ኣብ መንጎይን ኣብ መንጎኻን ኪዳነይ ከቕውም እየ፣+ ኣዝየ፡...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3 At this Aʹbram fell facedown, and God conti...</td>\n",
" <td>3 ኣብራም ከኣ ብገጹ ተደፍአ፣ ኣምላኽ ድማ ከምዚ ኢሉ ተዛረቦ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4 “As for me, look! my covenant is with you,+...</td>\n",
" <td>4 “እንሆ፡ ኣነስ ኪዳነይ ምሳኻ እዩ፣+ ንስኻ ኸኣ ብርግጽ ኣቦ ብዙሓት...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5 Your name will no longer be Aʹbram;* your n...</td>\n",
" <td>5 ኣቦ ብዙሓት ኣህዛብ ስለ ዝገብረካ፡ ኣብርሃም* ደኣ እምበር፡ ደጊም ...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" English Tigrigna\n",
"0 17 When Aʹbram was 99 years old, Jehovah appe... 17 ኣብራም ወዲ 99 ዓመት ምስ ኰነ፡ የሆዋ ንኣብራም ተራእዮ፣ “ኣነ ...\n",
"1 2 I will establish my covenant between me and... 2 ኣነ ድማ ኣብ መንጎይን ኣብ መንጎኻን ኪዳነይ ከቕውም እየ፣+ ኣዝየ፡...\n",
"2 3 At this Aʹbram fell facedown, and God conti... 3 ኣብራም ከኣ ብገጹ ተደፍአ፣ ኣምላኽ ድማ ከምዚ ኢሉ ተዛረቦ፦\n",
"3 4 “As for me, look! my covenant is with you,+... 4 “እንሆ፡ ኣነስ ኪዳነይ ምሳኻ እዩ፣+ ንስኻ ኸኣ ብርግጽ ኣቦ ብዙሓት...\n",
"4 5 Your name will no longer be Aʹbram;* your n... 5 ኣቦ ብዙሓት ኣህዛብ ስለ ዝገብረካ፡ ኣብርሃም* ደኣ እምበር፡ ደጊም ..."
]
},
"metadata": {
"tags": []
},
"execution_count": 10
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "Bzs9F6kVuOYb",
"colab_type": "code",
"colab": {}
},
"source": [
"data = data.rename(columns={\"English\":\"source_sentence\", \"Tigrigna\":\"target_sentence\"})\n"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "5HPQuXBK6o8J",
"colab_type": "code",
"outputId": "27778738-69a8-40b9-8745-6d89798900d1",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 204
}
},
"source": [
"data.head()"
],
"execution_count": 12,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>source_sentence</th>\n",
" <th>target_sentence</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>17 When Aʹbram was 99 years old, Jehovah appe...</td>\n",
" <td>17 ኣብራም ወዲ 99 ዓመት ምስ ኰነ፡ የሆዋ ንኣብራም ተራእዮ፣ “ኣነ ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2 I will establish my covenant between me and...</td>\n",
" <td>2 ኣነ ድማ ኣብ መንጎይን ኣብ መንጎኻን ኪዳነይ ከቕውም እየ፣+ ኣዝየ፡...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3 At this Aʹbram fell facedown, and God conti...</td>\n",
" <td>3 ኣብራም ከኣ ብገጹ ተደፍአ፣ ኣምላኽ ድማ ከምዚ ኢሉ ተዛረቦ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4 “As for me, look! my covenant is with you,+...</td>\n",
" <td>4 “እንሆ፡ ኣነስ ኪዳነይ ምሳኻ እዩ፣+ ንስኻ ኸኣ ብርግጽ ኣቦ ብዙሓት...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5 Your name will no longer be Aʹbram;* your n...</td>\n",
" <td>5 ኣቦ ብዙሓት ኣህዛብ ስለ ዝገብረካ፡ ኣብርሃም* ደኣ እምበር፡ ደጊም ...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" source_sentence target_sentence\n",
"0 17 When Aʹbram was 99 years old, Jehovah appe... 17 ኣብራም ወዲ 99 ዓመት ምስ ኰነ፡ የሆዋ ንኣብራም ተራእዮ፣ “ኣነ ...\n",
"1 2 I will establish my covenant between me and... 2 ኣነ ድማ ኣብ መንጎይን ኣብ መንጎኻን ኪዳነይ ከቕውም እየ፣+ ኣዝየ፡...\n",
"2 3 At this Aʹbram fell facedown, and God conti... 3 ኣብራም ከኣ ብገጹ ተደፍአ፣ ኣምላኽ ድማ ከምዚ ኢሉ ተዛረቦ፦\n",
"3 4 “As for me, look! my covenant is with you,+... 4 “እንሆ፡ ኣነስ ኪዳነይ ምሳኻ እዩ፣+ ንስኻ ኸኣ ብርግጽ ኣቦ ብዙሓት...\n",
"4 5 Your name will no longer be Aʹbram;* your n... 5 ኣቦ ብዙሓት ኣህዛብ ስለ ዝገብረካ፡ ኣብርሃም* ደኣ እምበር፡ ደጊም ..."
]
},
"metadata": {
"tags": []
},
"execution_count": 12
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "KWs3fc6vN9ro",
"colab_type": "code",
"outputId": "899e1f7a-bfd9-47fb-ff57-f7458f26f32e",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 886
}
},
"source": [
"data[data.duplicated()]"
],
"execution_count": 13,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>source_sentence</th>\n",
" <th>target_sentence</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>3509</th>\n",
" <td>14 Jehovah continued to speak to Moses, saying:</td>\n",
" <td>14 የሆዋ ድማ ንሙሴ ኸምዚ ኢሉ ተዛረቦ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3642</th>\n",
" <td>9 Jehovah continued to speak to Moses, saying:</td>\n",
" <td>9 የሆዋ ድማ ንሙሴ ኸምዚ ኢሉ ተዛረቦ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10285</th>\n",
" <td>6 David then established garrisons in Syria o...</td>\n",
" <td>6 ዳዊት ድማ ኣብ ሶርያ ናይ ደማስቆ ዝዓረደ ሰራዊት ኣንበረ፣ ሶርያውያ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11619</th>\n",
" <td>4 He also kept sacrificing and making sacrifi...</td>\n",
" <td>4 ኣብ በረኽትን+ ኣብ ልዕሊ ዅርባታትን ኣብ ትሕቲ ዅሉ ልሙዕ ኦምን+ ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11859</th>\n",
" <td>4 “Your father made our yoke harsh.+ But if y...</td>\n",
" <td>4 “ኣቦኻ ኣርዑትና ኣበርቲዑልና።+ ግናኸ፡ ነቲ ብርቱዕ መግዛእቲ ኣቦኻ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11861</th>\n",
" <td>6 King Re·ho·boʹam then consulted with the ol...</td>\n",
" <td>6 ንጉስ ሮብዓም ከኣ ምስቶም ኣቦኡ ሰሎሞን ብህይወቱ ኸሎ ዜገልግልዎ ዝ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11863</th>\n",
" <td>8 However, he rejected the advice that the ol...</td>\n",
" <td>8 ንሱ ግና ነቲ እቶም ዓበይቲ ዝመኸርዎ ምኽሪ ሓዲጉስ፡ ምስቶም ምስኡ ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11864</th>\n",
" <td>9 He asked them: “What advice do you offer on...</td>\n",
" <td>9 ንዓታቶም ድማ፡ “ነዞም፡ ‘ነቲ ኣቦኻ ኣብ ልዕሌና ዘንበሮ ኣርዑት ኣ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11867</th>\n",
" <td>12 Jer·o·boʹam and all the people came to Re·...</td>\n",
" <td>12 ከምቲ ንጉስ፡ “ኣብ ሳልሰይቲ መዓልቲ ተመለሱኒ” ዝበሎም፡ የሮብዓም...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11872</th>\n",
" <td>17 But Re·ho·boʹam continued to reign over th...</td>\n",
" <td>17 ሮብዓም ግና ኣብ ልዕሊ እቶም ኣብ ከተማታት ይሁዳ ዚነብሩ ዝነበሩ ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16352</th>\n",
" <td>5 Be exalted above the heavens, O God;May yo...</td>\n",
" <td>5 ኦ ኣምላኽ፡ ኣብ ልዕሊ ሰማያት ልዕል በል፣ክብርኻ ኣብ ልዕሊ ዅላ ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18359</th>\n",
" <td>3 They said to him: “This is what Hez·e·kiʹah...</td>\n",
" <td>3 ንሳቶም ከኣ ከምዚ በልዎ፦ “ህዝቅያስ ከምዚ ይብል፦ ‘እዛ መዓልቲ እ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18361</th>\n",
" <td>5 So the servants of King Hez·e·kiʹah went in...</td>\n",
" <td>5 እቶም ገላዉ ንጉስ ህዝቅያስ ከኣ ናብ ኢሳይያስ ከዱ።+</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18366</th>\n",
" <td>10 “This is what you should say to King Hez·e...</td>\n",
" <td>10 “ንህዝቅያስ ንጉስ ይሁዳ ኸምዚ በልዎ፦ ‘እቲ እትእመኖ ኣምላኽካ፡ ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18367</th>\n",
" <td>11 Look! You have heard what the kings of As·...</td>\n",
" <td>11 እንሆ፡ ነገስታት ኣሶር ንዅለን ሃገራት ብምጥፋእ ዝገበርወን ሰሚዕካ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18370</th>\n",
" <td>14 Hez·e·kiʹah took the letters out of the ha...</td>\n",
" <td>14 ህዝቅያስ ድማ ነተን ደብዳበታት ካብ ኢድ እቶም ልኡኻት ተቐቢሉ ኣን...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21021</th>\n",
" <td>11 And the word of Jehovah again came to me, ...</td>\n",
" <td>11 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21459</th>\n",
" <td>2 Then the word of Jehovah came to me, saying:</td>\n",
" <td>2 ሽዑ፡ ከምዚ ዚብል ቃል የሆዋ መጸኒ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21635</th>\n",
" <td>18 And the word of Jehovah again came to me, ...</td>\n",
" <td>18 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21650</th>\n",
" <td>15 The word of Jehovah again came to me, saying:</td>\n",
" <td>15 ከምዚ ዚብል ቃል የሆዋ ኸም ብሓድሽ መጸኒ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21674</th>\n",
" <td>17 And the word of Jehovah again came to me, ...</td>\n",
" <td>17 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22998</th>\n",
" <td>8 The word of Jehovah again came to me, saying:</td>\n",
" <td>8 ከምዚ ዚብል ቃል የሆዋ ኸም ብሓድሽ መጸኒ፦</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24480</th>\n",
" <td>5 Others fell on rocky ground where there was...</td>\n",
" <td>5 ገሊኡ ኸኣ ብዙሕ ሓመድ ኣብ ዘይብሉ ኸውሒ ወደቐ፣ ዓሚቝ ሓመድ ስለ ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24481</th>\n",
" <td>6 But when the sun rose, they were scorched, ...</td>\n",
" <td>6 ጸሓይ ምስ በረቐት ግና ሓረረ፣ ሱር ስለ ዘይብሉ ድማ ነቐጸ።</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29205</th>\n",
" <td>2 May you have undeserved kindness and peace ...</td>\n",
" <td>2 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29360</th>\n",
" <td>2 May you have undeserved kindness and peace ...</td>\n",
" <td>2 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29917</th>\n",
" <td>3 May you have undeserved kindness and peace ...</td>\n",
" <td>3 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" source_sentence target_sentence\n",
"3509 14 Jehovah continued to speak to Moses, saying: 14 የሆዋ ድማ ንሙሴ ኸምዚ ኢሉ ተዛረቦ፦\n",
"3642 9 Jehovah continued to speak to Moses, saying: 9 የሆዋ ድማ ንሙሴ ኸምዚ ኢሉ ተዛረቦ፦\n",
"10285 6 David then established garrisons in Syria o... 6 ዳዊት ድማ ኣብ ሶርያ ናይ ደማስቆ ዝዓረደ ሰራዊት ኣንበረ፣ ሶርያውያ...\n",
"11619 4 He also kept sacrificing and making sacrifi... 4 ኣብ በረኽትን+ ኣብ ልዕሊ ዅርባታትን ኣብ ትሕቲ ዅሉ ልሙዕ ኦምን+ ...\n",
"11859 4 “Your father made our yoke harsh.+ But if y... 4 “ኣቦኻ ኣርዑትና ኣበርቲዑልና።+ ግናኸ፡ ነቲ ብርቱዕ መግዛእቲ ኣቦኻ...\n",
"11861 6 King Re·ho·boʹam then consulted with the ol... 6 ንጉስ ሮብዓም ከኣ ምስቶም ኣቦኡ ሰሎሞን ብህይወቱ ኸሎ ዜገልግልዎ ዝ...\n",
"11863 8 However, he rejected the advice that the ol... 8 ንሱ ግና ነቲ እቶም ዓበይቲ ዝመኸርዎ ምኽሪ ሓዲጉስ፡ ምስቶም ምስኡ ...\n",
"11864 9 He asked them: “What advice do you offer on... 9 ንዓታቶም ድማ፡ “ነዞም፡ ‘ነቲ ኣቦኻ ኣብ ልዕሌና ዘንበሮ ኣርዑት ኣ...\n",
"11867 12 Jer·o·boʹam and all the people came to Re·... 12 ከምቲ ንጉስ፡ “ኣብ ሳልሰይቲ መዓልቲ ተመለሱኒ” ዝበሎም፡ የሮብዓም...\n",
"11872 17 But Re·ho·boʹam continued to reign over th... 17 ሮብዓም ግና ኣብ ልዕሊ እቶም ኣብ ከተማታት ይሁዳ ዚነብሩ ዝነበሩ ...\n",
"16352 5 Be exalted above the heavens, O God;May yo... 5 ኦ ኣምላኽ፡ ኣብ ልዕሊ ሰማያት ልዕል በል፣ክብርኻ ኣብ ልዕሊ ዅላ ...\n",
"18359 3 They said to him: “This is what Hez·e·kiʹah... 3 ንሳቶም ከኣ ከምዚ በልዎ፦ “ህዝቅያስ ከምዚ ይብል፦ ‘እዛ መዓልቲ እ...\n",
"18361 5 So the servants of King Hez·e·kiʹah went in... 5 እቶም ገላዉ ንጉስ ህዝቅያስ ከኣ ናብ ኢሳይያስ ከዱ።+\n",
"18366 10 “This is what you should say to King Hez·e... 10 “ንህዝቅያስ ንጉስ ይሁዳ ኸምዚ በልዎ፦ ‘እቲ እትእመኖ ኣምላኽካ፡ ...\n",
"18367 11 Look! You have heard what the kings of As·... 11 እንሆ፡ ነገስታት ኣሶር ንዅለን ሃገራት ብምጥፋእ ዝገበርወን ሰሚዕካ...\n",
"18370 14 Hez·e·kiʹah took the letters out of the ha... 14 ህዝቅያስ ድማ ነተን ደብዳበታት ካብ ኢድ እቶም ልኡኻት ተቐቢሉ ኣን...\n",
"21021 11 And the word of Jehovah again came to me, ... 11 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦\n",
"21459 2 Then the word of Jehovah came to me, saying: 2 ሽዑ፡ ከምዚ ዚብል ቃል የሆዋ መጸኒ፦\n",
"21635 18 And the word of Jehovah again came to me, ... 18 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦\n",
"21650 15 The word of Jehovah again came to me, saying: 15 ከምዚ ዚብል ቃል የሆዋ ኸም ብሓድሽ መጸኒ፦\n",
"21674 17 And the word of Jehovah again came to me, ... 17 ከምዚ ዚብል ቃል የሆዋ ድማ ከም ብሓድሽ መጸኒ፦\n",
"22998 8 The word of Jehovah again came to me, saying: 8 ከምዚ ዚብል ቃል የሆዋ ኸም ብሓድሽ መጸኒ፦\n",
"24480 5 Others fell on rocky ground where there was... 5 ገሊኡ ኸኣ ብዙሕ ሓመድ ኣብ ዘይብሉ ኸውሒ ወደቐ፣ ዓሚቝ ሓመድ ስለ ...\n",
"24481 6 But when the sun rose, they were scorched, ... 6 ጸሓይ ምስ በረቐት ግና ሓረረ፣ ሱር ስለ ዘይብሉ ድማ ነቐጸ።\n",
"29205 2 May you have undeserved kindness and peace ... 2 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...\n",
"29360 2 May you have undeserved kindness and peace ... 2 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ...\n",
"29917 3 May you have undeserved kindness and peace ... 3 ካብ ኣቦና ኣምላኽን ካብ ጐይታና የሱስ ክርስቶስን ጸጋን ሰላምን ይኹ..."
]
},
"metadata": {
"tags": []
},
"execution_count": 13
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "wQh76ndELmrY",
"colab_type": "code",
"outputId": "8fa7b0b0-fbc1-44eb-f102-c7952bcdbf3d",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 51
}
},
"source": [
"print(\"Length of Data before Removing duplicate: \",len(data))\n",
"data = data.drop_duplicates()\n",
"print(\"Length of Data after Removing duplicate: \",len(data))"
],
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"text": [
"Length of Data before Removing duplicate: 31078\n",
"Length of Data after Removing duplicate: 31051\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ihDdYUR0ukwj",
"colab_type": "code",
"colab": {}
},
"source": [
"# Do the split between dev/test/train and create parallel corpora\n",
"num_dev_patterns = 1000\n",
"num_test_patterns = 1000\n",
"df = data\n",
"# Lower case the corpora\n",
"df[\"source_sentence\"] = df[\"source_sentence\"].str.lower()\n",
"df[\"target_sentence\"] = df[\"target_sentence\"].str.lower()\n",
"\n",
"\n",
"devtest = df.tail(num_dev_patterns + num_test_patterns)\n",
"test = devtest.tail(num_test_patterns)\n",
"dev = devtest.head(num_dev_patterns)\n",
"stripped = df.drop(df.tail(num_dev_patterns + num_test_patterns).index)\n",
"\n",
"stripped[[\"source_sentence\"]].to_csv(\"train.en\", index=False)\n",
"stripped[[\"target_sentence\"]].to_csv(\"train.ti\", index=False)\n",
"\n",
"dev[[\"source_sentence\"]].to_csv(\"dev.en\", index=False)\n",
"dev[[\"target_sentence\"]].to_csv(\"dev.ti\", index=False)\n",
"\n",
"test[[\"source_sentence\"]].to_csv(\"test.en\", index=False)\n",
"test[[\"target_sentence\"]].to_csv(\"test.ti\", index=False)"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "eeszbBPNukz5",
"colab_type": "code",
"outputId": "4fc9aff5-f305-4819-8d5d-99e932e15a4f",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
}
},
"source": [
"# Install JoeyNMT\n",
"! git clone https://github.com/joeynmt/joeynmt.git\n",
"! cd joeynmt; pip3 install ."
],
"execution_count": 16,
"outputs": [
{
"output_type": "stream",
"text": [
"fatal: destination path 'joeynmt' already exists and is not an empty directory.\n",
"Processing /content/joeynmt\n",
"Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (0.16.0)\n",
"Requirement already satisfied: pillow in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (4.3.0)\n",
"Requirement already satisfied: numpy<2.0,>=1.14.5 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.16.5)\n",
"Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (41.2.0)\n",
"Requirement already satisfied: torch>=1.1 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.2.0)\n",
"Requirement already satisfied: tensorflow>=1.14 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.15.0rc3)\n",
"Requirement already satisfied: torchtext in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (0.3.1)\n",
"Requirement already satisfied: sacrebleu>=1.3.6 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.4.2)\n",
"Requirement already satisfied: subword-nmt in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (0.3.6)\n",
"Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (3.0.3)\n",
"Requirement already satisfied: seaborn in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (0.9.0)\n",
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (5.1.2)\n",
"Requirement already satisfied: pylint in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (2.4.2)\n",
"Requirement already satisfied: six>=1.12 in /usr/local/lib/python3.6/dist-packages (from joeynmt==0.0.1) (1.12.0)\n",
"Requirement already satisfied: olefile in /usr/local/lib/python3.6/dist-packages (from pillow->joeynmt==0.0.1) (0.46)\n",
"Requirement already satisfied: gast==0.2.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.2.2)\n",
"Requirement already satisfied: absl-py>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.8.0)\n",
"Requirement already satisfied: google-pasta>=0.1.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.1.7)\n",
"Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.15.0)\n",
"Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.8.0)\n",
"Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.15.0)\n",
"Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.1.0)\n",
"Requirement already satisfied: wrapt>=1.11.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.11.2)\n",
"Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (3.1.0)\n",
"Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (0.33.6)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.0.8)\n",
"Requirement already satisfied: tensorflow-estimator==1.15.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.15.1)\n",
"Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (1.1.0)\n",
"Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow>=1.14->joeynmt==0.0.1) (3.7.1)\n",
"Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from torchtext->joeynmt==0.0.1) (4.28.1)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from torchtext->joeynmt==0.0.1) (2.21.0)\n",
"Requirement already satisfied: typing in /usr/local/lib/python3.6/dist-packages (from sacrebleu>=1.3.6->joeynmt==0.0.1) (3.7.4.1)\n",
"Requirement already satisfied: portalocker in /usr/local/lib/python3.6/dist-packages (from sacrebleu>=1.3.6->joeynmt==0.0.1) (1.5.1)\n",
"Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->joeynmt==0.0.1) (0.10.0)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->joeynmt==0.0.1) (1.1.0)\n",
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->joeynmt==0.0.1) (2.4.2)\n",
"Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->joeynmt==0.0.1) (2.5.3)\n",
"Requirement already satisfied: pandas>=0.15.2 in /usr/local/lib/python3.6/dist-packages (from seaborn->joeynmt==0.0.1) (0.24.2)\n",
"Requirement already satisfied: scipy>=0.14.0 in /usr/local/lib/python3.6/dist-packages (from seaborn->joeynmt==0.0.1) (1.3.1)\n",
"Requirement already satisfied: mccabe<0.7,>=0.6 in /usr/local/lib/python3.6/dist-packages (from pylint->joeynmt==0.0.1) (0.6.1)\n",
"Requirement already satisfied: astroid<2.4,>=2.3.0 in /usr/local/lib/python3.6/dist-packages (from pylint->joeynmt==0.0.1) (2.3.1)\n",
"Requirement already satisfied: isort<5,>=4.2.5 in /usr/local/lib/python3.6/dist-packages (from pylint->joeynmt==0.0.1) (4.3.21)\n",
"Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow>=1.14->joeynmt==0.0.1) (3.1.1)\n",
"Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow>=1.14->joeynmt==0.0.1) (0.16.0)\n",
"Requirement already satisfied: h5py in /usr/local/lib/python3.6/dist-packages (from keras-applications>=1.0.8->tensorflow>=1.14->joeynmt==0.0.1) (2.8.0)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext->joeynmt==0.0.1) (2019.9.11)\n",
"Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext->joeynmt==0.0.1) (3.0.4)\n",
"Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext->joeynmt==0.0.1) (1.24.3)\n",
"Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests->torchtext->joeynmt==0.0.1) (2.8)\n",
"Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/dist-packages (from pandas>=0.15.2->seaborn->joeynmt==0.0.1) (2018.9)\n",
"Requirement already satisfied: typed-ast<1.5,>=1.4.0; implementation_name == \"cpython\" and python_version < \"3.8\" in /usr/local/lib/python3.6/dist-packages (from astroid<2.4,>=2.3.0->pylint->joeynmt==0.0.1) (1.4.0)\n",
"Requirement already satisfied: lazy-object-proxy==1.4.* in /usr/local/lib/python3.6/dist-packages (from astroid<2.4,>=2.3.0->pylint->joeynmt==0.0.1) (1.4.2)\n",
"Building wheels for collected packages: joeynmt\n",
" Building wheel for joeynmt (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for joeynmt: filename=joeynmt-0.0.1-cp36-none-any.whl size=69430 sha256=f18c7a68e6d29b980a95ab8910305f43832d240435cf8c605f1bfcc3330e773b\n",
" Stored in directory: /tmp/pip-ephem-wheel-cache-xusokv4l/wheels/db/01/db/751cc9f3e7f6faec127c43644ba250a3ea7ad200594aeda70a\n",
"Successfully built joeynmt\n",
"Installing collected packages: joeynmt\n",
" Found existing installation: joeynmt 0.0.1\n",
" Uninstalling joeynmt-0.0.1:\n",
" Successfully uninstalled joeynmt-0.0.1\n",
"Successfully installed joeynmt-0.0.1\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "rDWEwGnAuk3M",
"colab_type": "code",
"outputId": "b48f3bf5-10f3-4b34-bdfa-ba9e048a8e36",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 479
}
},
"source": [
"# One of the huge boosts in NMT performance was to use a different method of tokenizing. \n",
"# Usually, NMT would tokenize by words. However, using a method called BPE gave amazing boosts to performance\n",
"\n",
"# Do subword NMT\n",
"! mkdir joeynmt/data/\n",
"! mkdir joeynmt/data/enti/\n",
"! export data_path=joeynmt/data/$src$tgt/\n",
"! subword-nmt learn-joint-bpe-and-vocab --input train.$src train.$tgt -s 4000 -o bpe.codes.4000 --write-vocabulary vocab.$src vocab.$tgt\n",
"\n",
"! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$src < train.$src > train.bpe.$src\n",
"! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$tgt < train.$tgt > train.bpe.$tgt\n",
"\n",
"! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$src < dev.$src > dev.bpe.$src\n",
"! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$tgt < dev.$tgt > dev.bpe.$tgt\n",
"! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$src < test.$src > test.bpe.$src\n",
"! subword-nmt apply-bpe -c bpe.codes.4000 --vocabulary vocab.$tgt < test.$tgt > test.bpe.$tgt\n",
"\n",
"# Create directory, move everyone we care about to the correct location\n",
"# Create the /data/enti/ folder explicityly\n",
"! cp train.* joeynmt/data/enti/ \n",
"! cp test.* joeynmt/data/enti/\n",
"! cp dev.* joeynmt/data/enti/\n",
"! cp bpe.codes.4000 $data_path\n",
"! ls $data_path\n",
"\n",
"# Create that vocab using build_vocab\n",
"! sudo chmod 777 joeynmt/scripts/build_vocab.py\n",
"! joeynmt/scripts/build_vocab.py joeynmt/data/$src$tgt/train.bpe.$src joeynmt/data/$src$tgt/train.bpe.$tgt --output_path joeynmt/data/$src$tgt/vocab.txt\n",
"\n",
"# Some output\n",
"! echo \"BPE Tigrigna Sentences\"\n",
"! tail -n 5 test.bpe.$tgt\n",
"! echo \"Combined BPE Vocab\"\n",
"! tail -n 10 joeynmt/data/enti/vocab.txt"
],
"execution_count": 17,
"outputs": [
{
"output_type": "stream",
"text": [
"mkdir: cannot create directory ‘joeynmt/data/’: File exists\n",
"mkdir: cannot create directory ‘joeynmt/data/enti/’: File exists\n",
"cp: missing destination file operand after 'bpe.codes.4000'\n",
"Try 'cp --help' for more information.\n",
" bpe.codes.4000 drive\t\t sample_data\t train.bpe.en vocab.ti\n",
" dev.bpe.en\t 'en_ti (1).csv' test.bpe.en\t train.bpe.ti\n",
" dev.bpe.ti\t 'en_ti (2).csv' test.bpe.ti\t train.en\n",
" dev.en\t\t en_ti.csv\t test.en\t train.ti\n",
" dev.ti\t\t joeynmt\t test.ti\t vocab.en\n",
"BPE Tigrigna Sentences\n",
"17 እቲ መንፈ@@ ስን እታ መር@@ ዓ@@ ት@@ ን፡+ “@@ ንዓ@@ !” ይብ@@ ሉ ኣለዉ። እቲ ዚ@@ ሰም@@ ዕ እውን፡ “@@ ንዓ@@ !” ይበል@@ ። ዝ@@ ጸም@@ አ ኸኣ ይ@@ ም@@ ጻእ@@ ፣+ ዝ@@ ደለ@@ የ እውን ማይ ህይወት ብ@@ ና@@ ጻ ይ@@ ውሰ@@ ድ@@ ።+ \n",
"18 “@@ ቃል ትን@@ ቢ@@ ት እዛ ጥ@@ ቕል@@ ል@@ ቲ መጽሓፍ እዚኣ ንዚ@@ ሰም@@ ዑ ዘ@@ በሉ እ@@ ምስክ@@ ረ@@ ሎም ኣለኹ@@ ፦ ሓደ እኳ ናብ@@ ዚ እንተ ወሲ@@ ኹ@@ ፡+ ኣምላኽ ኣብዛ ጥ@@ ቕል@@ ል@@ ቲ መጽሓፍ እዚኣ ተጻሒ@@ ፉ ዘሎ መዓ@@ ታት ኪ@@ ው@@ ስ@@ ኸ@@ ሉ እዩ፣+\n",
"19 ሓደ እኳ ኻብ ቃል እዚ ኣብዛ ጥ@@ ቕል@@ ል@@ ቲ መጽሓፍ ዘሎ ትን@@ ቢ@@ ት እዚ እንተ ኣ@@ ጕ@@ ዲ@@ ሉ፡ ኣምላኽ ካብ@@ ተን ኣብዛ ጥ@@ ቕል@@ ል@@ ቲ መጽሓፍ ተጻሒ@@ ፈ@@ ን ዘለ@@ ዋ ኣእዋም ህይወ@@ ትን+ ቅድ@@ ስቲ ኸተማ@@ ን+ ግ@@ ዲ@@ ኡ ኼ@@ ጕድ@@ ለ@@ ሉ እዩ። \n",
"20 “እቲ ነዚ ነገር እዚ ዚ@@ ምስክ@@ ር፡ ‘@@ እወ፡ ቀ@@ ልጢ@@ ፈ እ@@ መጽእ ኣለኹ@@ ’ ይብል ኣሎ@@ ።”+ “ኣ@@ ሜ@@ ን@@ ! ጐይታ@@ ና የ@@ ሱ@@ ስ፡ ንዓ@@ ።” \n",
"21 ጸ@@ ጋ ጐይታ@@ ና የሱስ ምስ ቅዱ@@ ሳት ይኹን።\n",
"Combined BPE Vocab\n",
"sac@@\n",
"ፉእ\n",
"pharʹa@@\n",
"syr@@\n",
"mediat@@\n",
"ቈ\n",
"ዜ\n",
"ጩ\n",
"ቊ\n",
"ቤ\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "eIRhhPqHIMpt",
"colab_type": "code",
"outputId": "f18ba96a-81a4-427a-ced0-33d0fdf99baa",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 68
}
},
"source": [
"\n",
"# Also move everything we care about to a mounted location in google drive (relevant if running in colab) at gdrive_path\n",
"! cp train.* \"$gdrive_path\"\n",
"! cp test.* \"$gdrive_path\"\n",
"! cp dev.* \"$gdrive_path\"\n",
"! cp bpe.codes.4000 \"$gdrive_path\"\n",
"! ls \"$gdrive_path\""
],
"execution_count": 18,
"outputs": [
{
"output_type": "stream",
"text": [
"bpe.codes.4000\tdev.en\t test.bpe.ti train.bpe.en\ttrain.ti\n",
"dev.bpe.en\tdev.ti\t test.en\t train.bpe.ti\n",
"dev.bpe.ti\ttest.bpe.en test.ti\t train.en\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "5qW0fXlfuk7Q",
"colab_type": "code",
"colab": {}
},
"source": [
"# This creates the config file for our JoeyNMT system. It might seem overwhelming so we've provided a couple of useful parameters you'll need to update\n",
"# (You can of course play with all the parameters if you'd like!)\n",
"name = '%s%s' % (source_language, target_language)\n",
"\n",
"config = \"\"\"\n",
"name: \"{name}_transformer\"\n",
"\n",
"data:\n",
" src: \"{source_language}\"\n",
" trg: \"{target_language}\"\n",
" train: \"data/{name}/train.bpe\"\n",
" dev: \"data/{name}/dev.bpe\"\n",
" test: \"data/{name}/test.bpe\"\n",
" level: \"bpe\"\n",
" lowercase: False\n",
" max_sent_length: 100\n",
" src_vocab: \"data/{name}/vocab.txt\"\n",
" trg_vocab: \"data/{name}/vocab.txt\"\n",
"\n",
"testing:\n",
" beam_size: 5\n",
" alpha: 1.0\n",
"\n",
"training:\n",
" #load_model: \"models/{name}_transformer/12000.ckpt\" # if given, load a pre-trained model from this checkpoint\n",
" random_seed: 42\n",
" optimizer: \"adam\"\n",
" normalization: \"tokens\"\n",
" adam_betas: [0.9, 0.999] \n",
" scheduling: \"noam\" # Try switching from plateau to Noam scheduling\n",
" learning_rate_factor: 0.5 # factor for Noam scheduler (used with Transformer)\n",
" learning_rate_warmup: 1000 # warmup steps for Noam scheduler (used with Transformer)\n",
" patience: 8\n",
" decrease_factor: 0.7\n",
" loss: \"crossentropy\"\n",
" learning_rate: 0.0002\n",
" learning_rate_min: 0.00000001\n",
" weight_decay: 0.0\n",
" label_smoothing: 0.1\n",
" batch_size: 4096\n",
" batch_type: \"token\"\n",
" eval_batch_size: 3600\n",
" eval_batch_type: \"token\"\n",
" batch_multiplier: 1\n",
" early_stopping_metric: \"ppl\"\n",
" epochs: 14 # TODO: Decrease for when playing around and checking of working. Around 30 is sufficient to check if its working at all\n",
" validation_freq: 400 # Decrease this for testing\n",
" logging_freq: 100\n",
" eval_metric: \"bleu\"\n",
" model_dir: \"models/{name}_transformer\"\n",
" overwrite: True\n",
" shuffle: True\n",
" use_cuda: True\n",
" max_output_length: 100\n",
" print_valid_sents: [0, 1, 2, 3]\n",
" keep_last_ckpts: 3\n",
"\n",
"model:\n",
" initializer: \"xavier\"\n",
" bias_initializer: \"zeros\"\n",
" init_gain: 1.0\n",
" embed_initializer: \"xavier\"\n",
" embed_init_gain: 1.0\n",
" tied_embeddings: True\n",
" tied_softmax: True\n",
" encoder:\n",
" type: \"transformer\"\n",
" num_layers: 6\n",
" num_heads: 8\n",
" embeddings:\n",
" embedding_dim: 512\n",
" scale: True\n",
" dropout: 0.\n",
" # typically ff_size = 4 x hidden_size\n",
" hidden_size: 512\n",
" ff_size: 2048\n",
" dropout: 0.3\n",
" decoder:\n",
" type: \"transformer\"\n",
" num_layers: 6\n",
" num_heads: 8\n",
" embeddings:\n",
" embedding_dim: 512\n",
" scale: True\n",
" dropout: 0.\n",
" # typically ff_size = 4 x hidden_size\n",
" hidden_size: 512\n",
" ff_size: 2048\n",
" dropout: 0.3\n",
"\"\"\".format(name=name, source_language=source_language, target_language=target_language)\n",
"with open(\"joeynmt/configs/transformer_{name}.yaml\".format(name=name),'w') as f:\n",
" f.write(config)"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "5dFwTRna7UXb",
"colab_type": "code",
"outputId": "6f04280c-c235-493b-b280-69ffd192fe21",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
}
},
"source": [
"!cd joeynmt; python3 -m joeynmt train configs/transformer_$src$tgt.yaml"
],
"execution_count": 32,
"outputs": [
{
"output_type": "stream",
"text": [
"2019-10-14 08:23:45,064 Hello! This is Joey-NMT.\n",
"2019-10-14 08:23:46,749 Total params: 46436864\n",
"2019-10-14 08:23:46,750 Trainable parameters: ['decoder.layer_norm.bias', 'decoder.layer_norm.weight', 'decoder.layers.0.dec_layer_norm.bias', 'decoder.layers.0.dec_layer_norm.weight', 'decoder.layers.0.feed_forward.layer_norm.bias', 'decoder.layers.0.feed_forward.layer_norm.weight', 'decoder.layers.0.feed_forward.pwff_layer.0.bias', 'decoder.layers.0.feed_forward.pwff_layer.0.weight', 'decoder.layers.0.feed_forward.pwff_layer.3.bias', 'decoder.layers.0.feed_forward.pwff_layer.3.weight', 'decoder.layers.0.src_trg_att.k_layer.bias', 'decoder.layers.0.src_trg_att.k_layer.weight', 'decoder.layers.0.src_trg_att.output_layer.bias', 'decoder.layers.0.src_trg_att.output_layer.weight', 'decoder.layers.0.src_trg_att.q_layer.bias', 'decoder.layers.0.src_trg_att.q_layer.weight', 'decoder.layers.0.src_trg_att.v_layer.bias', 'decoder.layers.0.src_trg_att.v_layer.weight', 'decoder.layers.0.trg_trg_att.k_layer.bias', 'decoder.layers.0.trg_trg_att.k_layer.weight', 'decoder.layers.0.trg_trg_att.output_layer.bias', 'decoder.layers.0.trg_trg_att.output_layer.weight', 'decoder.layers.0.trg_trg_att.q_layer.bias', 'decoder.layers.0.trg_trg_att.q_layer.weight', 'decoder.layers.0.trg_trg_att.v_layer.bias', 'decoder.layers.0.trg_trg_att.v_layer.weight', 'decoder.layers.0.x_layer_norm.bias', 'decoder.layers.0.x_layer_norm.weight', 'decoder.layers.1.dec_layer_norm.bias', 'decoder.layers.1.dec_layer_norm.weight', 'decoder.layers.1.feed_forward.layer_norm.bias', 'decoder.layers.1.feed_forward.layer_norm.weight', 'decoder.layers.1.feed_forward.pwff_layer.0.bias', 'decoder.layers.1.feed_forward.pwff_layer.0.weight', 'decoder.layers.1.feed_forward.pwff_layer.3.bias', 'decoder.layers.1.feed_forward.pwff_layer.3.weight', 'decoder.layers.1.src_trg_att.k_layer.bias', 'decoder.layers.1.src_trg_att.k_layer.weight', 'decoder.layers.1.src_trg_att.output_layer.bias', 'decoder.layers.1.src_trg_att.output_layer.weight', 'decoder.layers.1.src_trg_att.q_layer.bias', 'decoder.layers.1.src_trg_att.q_layer.weight', 'decoder.layers.1.src_trg_att.v_layer.bias', 'decoder.layers.1.src_trg_att.v_layer.weight', 'decoder.layers.1.trg_trg_att.k_layer.bias', 'decoder.layers.1.trg_trg_att.k_layer.weight', 'decoder.layers.1.trg_trg_att.output_layer.bias', 'decoder.layers.1.trg_trg_att.output_layer.weight', 'decoder.layers.1.trg_trg_att.q_layer.bias', 'decoder.layers.1.trg_trg_att.q_layer.weight', 'decoder.layers.1.trg_trg_att.v_layer.bias', 'decoder.layers.1.trg_trg_att.v_layer.weight', 'decoder.layers.1.x_layer_norm.bias', 'decoder.layers.1.x_layer_norm.weight', 'decoder.layers.2.dec_layer_norm.bias', 'decoder.layers.2.dec_layer_norm.weight', 'decoder.layers.2.feed_forward.layer_norm.bias', 'decoder.layers.2.feed_forward.layer_norm.weight', 'decoder.layers.2.feed_forward.pwff_layer.0.bias', 'decoder.layers.2.feed_forward.pwff_layer.0.weight', 'decoder.layers.2.feed_forward.pwff_layer.3.bias', 'decoder.layers.2.feed_forward.pwff_layer.3.weight', 'decoder.layers.2.src_trg_att.k_layer.bias', 'decoder.layers.2.src_trg_att.k_layer.weight', 'decoder.layers.2.src_trg_att.output_layer.bias', 'decoder.layers.2.src_trg_att.output_layer.weight', 'decoder.layers.2.src_trg_att.q_layer.bias', 'decoder.layers.2.src_trg_att.q_layer.weight', 'decoder.layers.2.src_trg_att.v_layer.bias', 'decoder.layers.2.src_trg_att.v_layer.weight', 'decoder.layers.2.trg_trg_att.k_layer.bias', 'decoder.layers.2.trg_trg_att.k_layer.weight', 'decoder.layers.2.trg_trg_att.output_layer.bias', 'decoder.layers.2.trg_trg_att.output_layer.weight', 'decoder.layers.2.trg_trg_att.q_layer.bias', 'decoder.layers.2.trg_trg_att.q_layer.weight', 'decoder.layers.2.trg_trg_att.v_layer.bias', 'decoder.layers.2.trg_trg_att.v_layer.weight', 'decoder.layers.2.x_layer_norm.bias', 'decoder.layers.2.x_layer_norm.weight', 'decoder.layers.3.dec_layer_norm.bias', 'decoder.layers.3.dec_layer_norm.weight', 'decoder.layers.3.feed_forward.layer_norm.bias', 'decoder.layers.3.feed_forward.layer_norm.weight', 'decoder.layers.3.feed_forward.pwff_layer.0.bias', 'decoder.layers.3.feed_forward.pwff_layer.0.weight', 'decoder.layers.3.feed_forward.pwff_layer.3.bias', 'decoder.layers.3.feed_forward.pwff_layer.3.weight', 'decoder.layers.3.src_trg_att.k_layer.bias', 'decoder.layers.3.src_trg_att.k_layer.weight', 'decoder.layers.3.src_trg_att.output_layer.bias', 'decoder.layers.3.src_trg_att.output_layer.weight', 'decoder.layers.3.src_trg_att.q_layer.bias', 'decoder.layers.3.src_trg_att.q_layer.weight', 'decoder.layers.3.src_trg_att.v_layer.bias', 'decoder.layers.3.src_trg_att.v_layer.weight', 'decoder.layers.3.trg_trg_att.k_layer.bias', 'decoder.layers.3.trg_trg_att.k_layer.weight', 'decoder.layers.3.trg_trg_att.output_layer.bias', 'decoder.layers.3.trg_trg_att.output_layer.weight', 'decoder.layers.3.trg_trg_att.q_layer.bias', 'decoder.layers.3.trg_trg_att.q_layer.weight', 'decoder.layers.3.trg_trg_att.v_layer.bias', 'decoder.layers.3.trg_trg_att.v_layer.weight', 'decoder.layers.3.x_layer_norm.bias', 'decoder.layers.3.x_layer_norm.weight', 'decoder.layers.4.dec_layer_norm.bias', 'decoder.layers.4.dec_layer_norm.weight', 'decoder.layers.4.feed_forward.layer_norm.bias', 'decoder.layers.4.feed_forward.layer_norm.weight', 'decoder.layers.4.feed_forward.pwff_layer.0.bias', 'decoder.layers.4.feed_forward.pwff_layer.0.weight', 'decoder.layers.4.feed_forward.pwff_layer.3.bias', 'decoder.layers.4.feed_forward.pwff_layer.3.weight', 'decoder.layers.4.src_trg_att.k_layer.bias', 'decoder.layers.4.src_trg_att.k_layer.weight', 'decoder.layers.4.src_trg_att.output_layer.bias', 'decoder.layers.4.src_trg_att.output_layer.weight', 'decoder.layers.4.src_trg_att.q_layer.bias', 'decoder.layers.4.src_trg_att.q_layer.weight', 'decoder.layers.4.src_trg_att.v_layer.bias', 'decoder.layers.4.src_trg_att.v_layer.weight', 'decoder.layers.4.trg_trg_att.k_layer.bias', 'decoder.layers.4.trg_trg_att.k_layer.weight', 'decoder.layers.4.trg_trg_att.output_layer.bias', 'decoder.layers.4.trg_trg_att.output_layer.weight', 'decoder.layers.4.trg_trg_att.q_layer.bias', 'decoder.layers.4.trg_trg_att.q_layer.weight', 'decoder.layers.4.trg_trg_att.v_layer.bias', 'decoder.layers.4.trg_trg_att.v_layer.weight', 'decoder.layers.4.x_layer_norm.bias', 'decoder.layers.4.x_layer_norm.weight', 'decoder.layers.5.dec_layer_norm.bias', 'decoder.layers.5.dec_layer_norm.weight', 'decoder.layers.5.feed_forward.layer_norm.bias', 'decoder.layers.5.feed_forward.layer_norm.weight', 'decoder.layers.5.feed_forward.pwff_layer.0.bias', 'decoder.layers.5.feed_forward.pwff_layer.0.weight', 'decoder.layers.5.feed_forward.pwff_layer.3.bias', 'decoder.layers.5.feed_forward.pwff_layer.3.weight', 'decoder.layers.5.src_trg_att.k_layer.bias', 'decoder.layers.5.src_trg_att.k_layer.weight', 'decoder.layers.5.src_trg_att.output_layer.bias', 'decoder.layers.5.src_trg_att.output_layer.weight', 'decoder.layers.5.src_trg_att.q_layer.bias', 'decoder.layers.5.src_trg_att.q_layer.weight', 'decoder.layers.5.src_trg_att.v_layer.bias', 'decoder.layers.5.src_trg_att.v_layer.weight', 'decoder.layers.5.trg_trg_att.k_layer.bias', 'decoder.layers.5.trg_trg_att.k_layer.weight', 'decoder.layers.5.trg_trg_att.output_layer.bias', 'decoder.layers.5.trg_trg_att.output_layer.weight', 'decoder.layers.5.trg_trg_att.q_layer.bias', 'decoder.layers.5.trg_trg_att.q_layer.weight', 'decoder.layers.5.trg_trg_att.v_layer.bias', 'decoder.layers.5.trg_trg_att.v_layer.weight', 'decoder.layers.5.x_layer_norm.bias', 'decoder.layers.5.x_layer_norm.weight', 'encoder.layer_norm.bias', 'encoder.layer_norm.weight', 'encoder.layers.0.feed_forward.layer_norm.bias', 'encoder.layers.0.feed_forward.layer_norm.weight', 'encoder.layers.0.feed_forward.pwff_layer.0.bias', 'encoder.layers.0.feed_forward.pwff_layer.0.weight', 'encoder.layers.0.feed_forward.pwff_layer.3.bias', 'encoder.layers.0.feed_forward.pwff_layer.3.weight', 'encoder.layers.0.layer_norm.bias', 'encoder.layers.0.layer_norm.weight', 'encoder.layers.0.src_src_att.k_layer.bias', 'encoder.layers.0.src_src_att.k_layer.weight', 'encoder.layers.0.src_src_att.output_layer.bias', 'encoder.layers.0.src_src_att.output_layer.weight', 'encoder.layers.0.src_src_att.q_layer.bias', 'encoder.layers.0.src_src_att.q_layer.weight', 'encoder.layers.0.src_src_att.v_layer.bias', 'encoder.layers.0.src_src_att.v_layer.weight', 'encoder.layers.1.feed_forward.layer_norm.bias', 'encoder.layers.1.feed_forward.layer_norm.weight', 'encoder.layers.1.feed_forward.pwff_layer.0.bias', 'encoder.layers.1.feed_forward.pwff_layer.0.weight', 'encoder.layers.1.feed_forward.pwff_layer.3.bias', 'encoder.layers.1.feed_forward.pwff_layer.3.weight', 'encoder.layers.1.layer_norm.bias', 'encoder.layers.1.layer_norm.weight', 'encoder.layers.1.src_src_att.k_layer.bias', 'encoder.layers.1.src_src_att.k_layer.weight', 'encoder.layers.1.src_src_att.output_layer.bias', 'encoder.layers.1.src_src_att.output_layer.weight', 'encoder.layers.1.src_src_att.q_layer.bias', 'encoder.layers.1.src_src_att.q_layer.weight', 'encoder.layers.1.src_src_att.v_layer.bias', 'encoder.layers.1.src_src_att.v_layer.weight', 'encoder.layers.2.feed_forward.layer_norm.bias', 'encoder.layers.2.feed_forward.layer_norm.weight', 'encoder.layers.2.feed_forward.pwff_layer.0.bias', 'encoder.layers.2.feed_forward.pwff_layer.0.weight', 'encoder.layers.2.feed_forward.pwff_layer.3.bias', 'encoder.layers.2.feed_forward.pwff_layer.3.weight', 'encoder.layers.2.layer_norm.bias', 'encoder.layers.2.layer_norm.weight', 'encoder.layers.2.src_src_att.k_layer.bias', 'encoder.layers.2.src_src_att.k_layer.weight', 'encoder.layers.2.src_src_att.output_layer.bias', 'encoder.layers.2.src_src_att.output_layer.weight', 'encoder.layers.2.src_src_att.q_layer.bias', 'encoder.layers.2.src_src_att.q_layer.weight', 'encoder.layers.2.src_src_att.v_layer.bias', 'encoder.layers.2.src_src_att.v_layer.weight', 'encoder.layers.3.feed_forward.layer_norm.bias', 'encoder.layers.3.feed_forward.layer_norm.weight', 'encoder.layers.3.feed_forward.pwff_layer.0.bias', 'encoder.layers.3.feed_forward.pwff_layer.0.weight', 'encoder.layers.3.feed_forward.pwff_layer.3.bias', 'encoder.layers.3.feed_forward.pwff_layer.3.weight', 'encoder.layers.3.layer_norm.bias', 'encoder.layers.3.layer_norm.weight', 'encoder.layers.3.src_src_att.k_layer.bias', 'encoder.layers.3.src_src_att.k_layer.weight', 'encoder.layers.3.src_src_att.output_layer.bias', 'encoder.layers.3.src_src_att.output_layer.weight', 'encoder.layers.3.src_src_att.q_layer.bias', 'encoder.layers.3.src_src_att.q_layer.weight', 'encoder.layers.3.src_src_att.v_layer.bias', 'encoder.layers.3.src_src_att.v_layer.weight', 'encoder.layers.4.feed_forward.layer_norm.bias', 'encoder.layers.4.feed_forward.layer_norm.weight', 'encoder.layers.4.feed_forward.pwff_layer.0.bias', 'encoder.layers.4.feed_forward.pwff_layer.0.weight', 'encoder.layers.4.feed_forward.pwff_layer.3.bias', 'encoder.layers.4.feed_forward.pwff_layer.3.weight', 'encoder.layers.4.layer_norm.bias', 'encoder.layers.4.layer_norm.weight', 'encoder.layers.4.src_src_att.k_layer.bias', 'encoder.layers.4.src_src_att.k_layer.weight', 'encoder.layers.4.src_src_att.output_layer.bias', 'encoder.layers.4.src_src_att.output_layer.weight', 'encoder.layers.4.src_src_att.q_layer.bias', 'encoder.layers.4.src_src_att.q_layer.weight', 'encoder.layers.4.src_src_att.v_layer.bias', 'encoder.layers.4.src_src_att.v_layer.weight', 'encoder.layers.5.feed_forward.layer_norm.bias', 'encoder.layers.5.feed_forward.layer_norm.weight', 'encoder.layers.5.feed_forward.pwff_layer.0.bias', 'encoder.layers.5.feed_forward.pwff_layer.0.weight', 'encoder.layers.5.feed_forward.pwff_layer.3.bias', 'encoder.layers.5.feed_forward.pwff_layer.3.weight', 'encoder.layers.5.layer_norm.bias', 'encoder.layers.5.layer_norm.weight', 'encoder.layers.5.src_src_att.k_layer.bias', 'encoder.layers.5.src_src_att.k_layer.weight', 'encoder.layers.5.src_src_att.output_layer.bias', 'encoder.layers.5.src_src_att.output_layer.weight', 'encoder.layers.5.src_src_att.q_layer.bias', 'encoder.layers.5.src_src_att.q_layer.weight', 'encoder.layers.5.src_src_att.v_layer.bias', 'encoder.layers.5.src_src_att.v_layer.weight', 'src_embed.lut.weight']\n",
"2019-10-14 08:23:49,356 cfg.name : enti_transformer\n",
"2019-10-14 08:23:49,357 cfg.data.src : en\n",
"2019-10-14 08:23:49,357 cfg.data.trg : ti\n",
"2019-10-14 08:23:49,357 cfg.data.train : data/enti/train.bpe\n",
"2019-10-14 08:23:49,357 cfg.data.dev : data/enti/dev.bpe\n",
"2019-10-14 08:23:49,357 cfg.data.test : data/enti/test.bpe\n",
"2019-10-14 08:23:49,357 cfg.data.level : bpe\n",
"2019-10-14 08:23:49,357 cfg.data.lowercase : False\n",
"2019-10-14 08:23:49,357 cfg.data.max_sent_length : 100\n",
"2019-10-14 08:23:49,357 cfg.data.src_vocab : data/enti/vocab.txt\n",
"2019-10-14 08:23:49,358 cfg.data.trg_vocab : data/enti/vocab.txt\n",
"2019-10-14 08:23:49,358 cfg.testing.beam_size : 5\n",
"2019-10-14 08:23:49,358 cfg.testing.alpha : 1.0\n",
"2019-10-14 08:23:49,358 cfg.training.random_seed : 42\n",
"2019-10-14 08:23:49,358 cfg.training.optimizer : adam\n",
"2019-10-14 08:23:49,358 cfg.training.normalization : tokens\n",
"2019-10-14 08:23:49,358 cfg.training.adam_betas : [0.9, 0.999]\n",
"2019-10-14 08:23:49,358 cfg.training.scheduling : noam\n",
"2019-10-14 08:23:49,358 cfg.training.learning_rate_factor : 0.5\n",
"2019-10-14 08:23:49,358 cfg.training.learning_rate_warmup : 1000\n",
"2019-10-14 08:23:49,359 cfg.training.patience : 8\n",
"2019-10-14 08:23:49,359 cfg.training.decrease_factor : 0.7\n",
"2019-10-14 08:23:49,359 cfg.training.loss : crossentropy\n",
"2019-10-14 08:23:49,359 cfg.training.learning_rate : 0.0002\n",
"2019-10-14 08:23:49,359 cfg.training.learning_rate_min : 1e-08\n",
"2019-10-14 08:23:49,359 cfg.training.weight_decay : 0.0\n",
"2019-10-14 08:23:49,359 cfg.training.label_smoothing : 0.1\n",
"2019-10-14 08:23:49,359 cfg.training.batch_size : 4096\n",
"2019-10-14 08:23:49,359 cfg.training.batch_type : token\n",
"2019-10-14 08:23:49,359 cfg.training.eval_batch_size : 3600\n",
"2019-10-14 08:23:49,360 cfg.training.eval_batch_type : token\n",
"2019-10-14 08:23:49,360 cfg.training.batch_multiplier : 1\n",
"2019-10-14 08:23:49,360 cfg.training.early_stopping_metric : ppl\n",
"2019-10-14 08:23:49,360 cfg.training.epochs : 14\n",
"2019-10-14 08:23:49,360 cfg.training.validation_freq : 400\n",
"2019-10-14 08:23:49,360 cfg.training.logging_freq : 100\n",
"2019-10-14 08:23:49,360 cfg.training.eval_metric : bleu\n",
"2019-10-14 08:23:49,360 cfg.training.model_dir : models/enti_transformer\n",
"2019-10-14 08:23:49,360 cfg.training.overwrite : True\n",
"2019-10-14 08:23:49,361 cfg.training.shuffle : True\n",
"2019-10-14 08:23:49,361 cfg.training.use_cuda : True\n",
"2019-10-14 08:23:49,361 cfg.training.max_output_length : 100\n",
"2019-10-14 08:23:49,361 cfg.training.print_valid_sents : [0, 1, 2, 3]\n",
"2019-10-14 08:23:49,361 cfg.training.keep_last_ckpts : 3\n",
"2019-10-14 08:23:49,361 cfg.model.initializer : xavier\n",
"2019-10-14 08:23:49,361 cfg.model.bias_initializer : zeros\n",
"2019-10-14 08:23:49,361 cfg.model.init_gain : 1.0\n",
"2019-10-14 08:23:49,361 cfg.model.embed_initializer : xavier\n",
"2019-10-14 08:23:49,361 cfg.model.embed_init_gain : 1.0\n",
"2019-10-14 08:23:49,362 cfg.model.tied_embeddings : True\n",
"2019-10-14 08:23:49,362 cfg.model.tied_softmax : True\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.type : transformer\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.num_layers : 6\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.num_heads : 8\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.embeddings.embedding_dim : 512\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.embeddings.scale : True\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.embeddings.dropout : 0.0\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.hidden_size : 512\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.ff_size : 2048\n",
"2019-10-14 08:23:49,362 cfg.model.encoder.dropout : 0.3\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.type : transformer\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.num_layers : 6\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.num_heads : 8\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.embeddings.embedding_dim : 512\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.embeddings.scale : True\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.embeddings.dropout : 0.0\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.hidden_size : 512\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.ff_size : 2048\n",
"2019-10-14 08:23:49,363 cfg.model.decoder.dropout : 0.3\n",
"2019-10-14 08:23:49,363 Data set sizes: \n",
"\ttrain 29019,\n",
"\tvalid 1001,\n",
"\ttest 1001\n",
"2019-10-14 08:23:49,364 First training example:\n",
"\t[SRC] s@@ our@@ ce@@ _@@ sen@@ ten@@ ce\n",
"\t[TRG] tar@@ ge@@ t@@ _@@ sen@@ ten@@ ce\n",
"2019-10-14 08:23:49,364 First 10 words (src): (0) <unk> (1) <pad> (2) <s> (3) </s> (4) the (5) and (6) of (7) to (8) ኣብ (9) ን@@\n",
"2019-10-14 08:23:49,364 First 10 words (trg): (0) <unk> (1) <pad> (2) <s> (3) </s> (4) the (5) and (6) of (7) to (8) ኣብ (9) ን@@\n",
"2019-10-14 08:23:49,364 Number of Src words (types): 4485\n",
"2019-10-14 08:23:49,365 Number of Trg words (types): 4485\n",
"2019-10-14 08:23:49,365 Model(\n",
"\tencoder=TransformerEncoder(num_layers=6, num_heads=8),\n",
"\tdecoder=TransformerDecoder(num_layers=6, num_heads=8),\n",
"\tsrc_embed=Embeddings(embedding_dim=512, vocab_size=4485),\n",
"\ttrg_embed=Embeddings(embedding_dim=512, vocab_size=4485))\n",
"2019-10-14 08:23:49,370 EPOCH 1\n",
"2019-10-14 08:25:06,118 Epoch 1 Step: 100 Batch Loss: 6.159533 Tokens per Sec: 3732, Lr: 0.000070\n",
"2019-10-14 08:26:23,458 Epoch 1 Step: 200 Batch Loss: 5.913614 Tokens per Sec: 7419, Lr: 0.000140\n",
"2019-10-14 08:27:40,396 Epoch 1 Step: 300 Batch Loss: 5.648499 Tokens per Sec: 11180, Lr: 0.000210\n",
"2019-10-14 08:28:21,864 Epoch 1: total training loss 2157.89\n",
"2019-10-14 08:28:21,865 EPOCH 2\n",
"2019-10-14 08:28:56,219 Epoch 2 Step: 400 Batch Loss: 5.438910 Tokens per Sec: 3732, Lr: 0.000280\n",
"2019-10-14 08:33:01,784 Hooray! New best validation result [ppl]!\n",
"2019-10-14 08:33:01,784 Saving new checkpoint.\n",
"2019-10-14 08:33:03,257 Example #0\n",
"2019-10-14 08:33:03,258 \tSource: source_sentence\n",
"2019-10-14 08:33:03,258 \tReference: target_sentence\n",
"2019-10-14 08:33:03,258 \tHypothesis: 9\n",
"2019-10-14 08:33:03,258 Example #1\n",
"2019-10-14 08:33:03,258 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 08:33:03,258 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 08:33:03,259 \tHypothesis: 9 እቲ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ\n",
"2019-10-14 08:33:03,259 Example #2\n",
"2019-10-14 08:33:03,259 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 08:33:03,259 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 08:33:03,259 \tHypothesis: 9 እቲ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ ኣብ\n",
"2019-10-14 08:33:03,259 Example #3\n",
"2019-10-14 08:33:03,259 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 08:33:03,259 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 08:33:03,259 \tHypothesis: 9 “““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““““@@\n",
"2019-10-14 08:33:03,260 Validation result at epoch 2, step 400: bleu: 0.00, loss: 183016.1094, ppl: 227.8050, duration: 247.0400s\n",
"2019-10-14 08:34:20,472 Epoch 2 Step: 500 Batch Loss: 4.910177 Tokens per Sec: 5355, Lr: 0.000349\n",
"2019-10-14 08:35:38,191 Epoch 2 Step: 600 Batch Loss: 5.056447 Tokens per Sec: 9060, Lr: 0.000419\n",
"2019-10-14 08:36:55,416 Epoch 2 Step: 700 Batch Loss: 4.794687 Tokens per Sec: 12860, Lr: 0.000489\n",
"2019-10-14 08:37:00,926 Epoch 2: total training loss 1809.58\n",
"2019-10-14 08:37:00,926 EPOCH 3\n",
"2019-10-14 08:38:12,279 Epoch 3 Step: 800 Batch Loss: 4.730673 Tokens per Sec: 3730, Lr: 0.000559\n",
"2019-10-14 08:42:16,893 Hooray! New best validation result [ppl]!\n",
"2019-10-14 08:42:16,893 Saving new checkpoint.\n",
"2019-10-14 08:42:18,489 Example #0\n",
"2019-10-14 08:42:18,490 \tSource: source_sentence\n",
"2019-10-14 08:42:18,490 \tReference: target_sentence\n",
"2019-10-14 08:42:18,490 \tHypothesis: 10 ንንቝራታ ድማ ንቝራይ፡+@@\n",
"2019-10-14 08:42:18,490 Example #1\n",
"2019-10-14 08:42:18,490 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 08:42:18,491 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 08:42:18,491 \tHypothesis: 10 ኦ የሆዋ፡ ኦ የሆዋ፡ ኦ የሆዋ፡ ኦ የሆዋ፡ ኦ የሆዋ፡ ንየሆዋ፡ ንየሆዋ፡ ንንንንንጊልያይ ንንንንዴታታታታታታታታታታም ከፈ።\n",
"2019-10-14 08:42:18,491 Example #2\n",
"2019-10-14 08:42:18,491 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 08:42:18,491 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 08:42:18,491 \tHypothesis: 10 ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ ኣብ ልዕሊ እቲ\n",
"2019-10-14 08:42:18,492 Example #3\n",
"2019-10-14 08:42:18,492 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 08:42:18,492 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 08:42:18,492 \tHypothesis: 10 ግናኸ፡ ንሓቂ ኣምላኽ ኣምላኽ ኣምላኽ ኣምላኽ ኣምላኽ ንኣምላኽ ንኣምላኽ ንኣምላኽ ንኣምላኽ ንንሓቂ ኣምላኽ ኣምላኽ ይፈ።+\n",
"2019-10-14 08:42:18,492 Validation result at epoch 3, step 800: bleu: 0.00, loss: 161773.6719, ppl: 121.3176, duration: 246.2125s\n",
"2019-10-14 08:43:35,099 Epoch 3 Step: 900 Batch Loss: 3.668467 Tokens per Sec: 7191, Lr: 0.000629\n",
"2019-10-14 08:44:52,535 Epoch 3 Step: 1000 Batch Loss: 4.109991 Tokens per Sec: 10852, Lr: 0.000699\n",
"2019-10-14 08:45:38,962 Epoch 3: total training loss 1559.18\n",
"2019-10-14 08:45:38,962 EPOCH 4\n",
"2019-10-14 08:46:10,055 Epoch 4 Step: 1100 Batch Loss: 3.997961 Tokens per Sec: 3734, Lr: 0.000666\n",
"2019-10-14 08:47:25,884 Epoch 4 Step: 1200 Batch Loss: 3.732101 Tokens per Sec: 5265, Lr: 0.000638\n",
"2019-10-14 08:51:30,309 Hooray! New best validation result [ppl]!\n",
"2019-10-14 08:51:30,309 Saving new checkpoint.\n",
"2019-10-14 08:51:32,031 Example #0\n",
"2019-10-14 08:51:32,032 \tSource: source_sentence\n",
"2019-10-14 08:51:32,032 \tReference: target_sentence\n",
"2019-10-14 08:51:32,032 \tHypothesis: 2 ንእስማዊ ንእስማዊ ንቋታት ይፈትልን\n",
"2019-10-14 08:51:32,032 Example #1\n",
"2019-10-14 08:51:32,032 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 08:51:32,032 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 08:51:32,032 \tHypothesis: 3 ንእስማማታታን-ማርያ፡ ንእስማማታን*+ እቲ ናይ ሓቂ ኣምላኽ ዝለኣኸኒ ዝሰምዓሉ ዝለኣኸኒ ዝሰምዐ ዘለኹ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ እዚ ዅሉ ዅሉ ዅሉ እዚ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ እዚ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ እዚ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ እዚ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ ዅሉ\n",
"2019-10-14 08:51:32,032 Example #2\n",
"2019-10-14 08:51:32,033 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 08:51:32,033 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 08:51:32,033 \tHypothesis: 3 ኣብ መንጎ እቶም ኣብ መንጎ እቶም ኣብ መንጎ ነገስታት ይሁዳ ዝነበሩ ዘክዐት ዘክሪ ዘርእሰይ ዘርእሰይ ኣብ መንጎ ኣህዛብ ኣብ መንጎ ኣህዛብ ኣብ መንጎ ጸላእተይ እተፈጸጸይ እተፈጸጸም እየ።+\n",
"2019-10-14 08:51:32,033 Example #3\n",
"2019-10-14 08:51:32,033 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 08:51:32,033 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 08:51:32,033 \tHypothesis: 8 ግናኸ፡ ኣምላኽ ካብ ኣሕዋቱ ምስ ረኣየ፡ ካብ ወዲ ሰብ ኣቦታቱ ንወዱ ኣእምሮ ኣሎ እሞ ንእስነቱ ኸም ዝረኣየ፡\n",
"2019-10-14 08:51:32,033 Validation result at epoch 4, step 1200: bleu: 0.00, loss: 139968.5938, ppl: 63.5385, duration: 246.1486s\n",
"2019-10-14 08:52:49,023 Epoch 4 Step: 1300 Batch Loss: 3.654617 Tokens per Sec: 8909, Lr: 0.000613\n",
"2019-10-14 08:54:05,614 Epoch 4 Step: 1400 Batch Loss: 3.651653 Tokens per Sec: 12698, Lr: 0.000591\n",
"2019-10-14 08:54:16,692 Epoch 4: total training loss 1331.35\n",
"2019-10-14 08:54:16,692 EPOCH 5\n",
"2019-10-14 08:55:22,134 Epoch 5 Step: 1500 Batch Loss: 3.398286 Tokens per Sec: 3735, Lr: 0.000571\n",
"2019-10-14 08:56:38,664 Epoch 5 Step: 1600 Batch Loss: 3.338879 Tokens per Sec: 6927, Lr: 0.000552\n",
"2019-10-14 09:00:42,734 Hooray! New best validation result [ppl]!\n",
"2019-10-14 09:00:42,734 Saving new checkpoint.\n",
"2019-10-14 09:00:44,312 Example #0\n",
"2019-10-14 09:00:44,313 \tSource: source_sentence\n",
"2019-10-14 09:00:44,313 \tReference: target_sentence\n",
"2019-10-14 09:00:44,313 \tHypothesis: 11 ንእስነቱ፡\n",
"2019-10-14 09:00:44,313 Example #1\n",
"2019-10-14 09:00:44,313 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 09:00:44,313 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 09:00:44,313 \tHypothesis: 17 እቲ ኻብ መጀመርታ ዝሰምዓኒ ዅሉ እቲ ናይ ሓቂ ኣምላኽ ዝዛረብኩ፡+ ኣብ እስራኤል እውን ተመላለሱ፣\n",
"2019-10-14 09:00:44,314 Example #2\n",
"2019-10-14 09:00:44,314 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 09:00:44,314 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 09:00:44,314 \tHypothesis: 17 ኣነ ኸኣ ብብዙሓት ኣህዛብ ኣብ ቅድሚ ኣዒንተይ ኣብ ቅድሚ ኣዒንተይ ኣብ ምድሪ ኸም ዝዀንኩ እፈልጥ እየ።+\n",
"2019-10-14 09:00:44,314 Example #3\n",
"2019-10-14 09:00:44,314 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 09:00:44,314 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 09:00:44,315 \tHypothesis: 17 ኣምላኽ ግና ካብ ወዲ ሰብ ካብ መጀመርታ ምስ ተሰሪበ ግና፡ ብጸጋይ ተመሲሩ ኣሎ።+\n",
"2019-10-14 09:00:44,315 Validation result at epoch 5, step 1600: bleu: 0.39, loss: 126149.8125, ppl: 42.1723, duration: 245.6507s\n",
"2019-10-14 09:02:01,384 Epoch 5 Step: 1700 Batch Loss: 2.980851 Tokens per Sec: 10601, Lr: 0.000536\n",
"2019-10-14 09:02:53,599 Epoch 5: total training loss 1155.96\n",
"2019-10-14 09:02:53,599 EPOCH 6\n",
"2019-10-14 09:03:17,958 Epoch 6 Step: 1800 Batch Loss: 3.127846 Tokens per Sec: 3778, Lr: 0.000521\n",
"2019-10-14 09:04:34,270 Epoch 6 Step: 1900 Batch Loss: 3.005094 Tokens per Sec: 4936, Lr: 0.000507\n",
"2019-10-14 09:05:51,483 Epoch 6 Step: 2000 Batch Loss: 2.842878 Tokens per Sec: 8635, Lr: 0.000494\n",
"2019-10-14 09:09:55,625 Hooray! New best validation result [ppl]!\n",
"2019-10-14 09:09:55,625 Saving new checkpoint.\n",
"2019-10-14 09:09:57,259 Example #0\n",
"2019-10-14 09:09:57,260 \tSource: source_sentence\n",
"2019-10-14 09:09:57,260 \tReference: target_sentence\n",
"2019-10-14 09:09:57,260 \tHypothesis: 14 ኣብ ልዕሊ እቲ መኣዲ ዘሎ መዕቈብቲ ይመርሕ፣\n",
"2019-10-14 09:09:57,260 Example #1\n",
"2019-10-14 09:09:57,260 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 09:09:57,260 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 09:09:57,260 \tHypothesis: 13 እምበኣር፡ እቲ ኣብ ቅድሚ ኣምላኽ ዚሰምዕ ዝነበረ ዅሉ እቲ ኣብ ጉባኤ ኣምላኽ ዚፈርህን ዚገብሮ ዝነበረ ዅሉ እቲ ልዑል ኣምላኽ ዝረኣኽዎ ቓል ሰሚዕኩም ኣለኹ፣+\n",
"2019-10-14 09:09:57,261 Example #2\n",
"2019-10-14 09:09:57,261 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 09:09:57,261 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 09:09:57,261 \tHypothesis: 14 ኣነ ኸኣ ብሞት እተመላለሰ፡ ብብዙሓት ኣህዛብ እውን ብብዙሓት ኣህዛብ ብብዙሓት ኣህዛብ ብብዙሓት ኣህዛብ ብብዙሓት ኣህዛብ ተመላለሰ።+\n",
"2019-10-14 09:09:57,261 Example #3\n",
"2019-10-14 09:09:57,261 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 09:09:57,261 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 09:09:57,262 \tHypothesis: 15 ግናኸ፡ ኣምላኽ ካብ ኣቦ፡ ካብ ኣቦ፡ ካብ ጸጋ ጸሊአ፣+\n",
"2019-10-14 09:09:57,262 Validation result at epoch 6, step 2000: bleu: 0.77, loss: 117405.4062, ppl: 32.5375, duration: 245.7781s\n",
"2019-10-14 09:11:13,651 Epoch 6 Step: 2100 Batch Loss: 3.094540 Tokens per Sec: 12467, Lr: 0.000482\n",
"2019-10-14 09:11:30,059 Epoch 6: total training loss 1047.26\n",
"2019-10-14 09:11:30,059 EPOCH 7\n",
"2019-10-14 09:12:30,083 Epoch 7 Step: 2200 Batch Loss: 2.779240 Tokens per Sec: 3753, Lr: 0.000471\n",
"2019-10-14 09:13:46,654 Epoch 7 Step: 2300 Batch Loss: 2.685841 Tokens per Sec: 6669, Lr: 0.000461\n",
"2019-10-14 09:15:03,444 Epoch 7 Step: 2400 Batch Loss: 2.575554 Tokens per Sec: 10374, Lr: 0.000451\n",
"2019-10-14 09:19:07,614 Hooray! New best validation result [ppl]!\n",
"2019-10-14 09:19:07,615 Saving new checkpoint.\n",
"2019-10-14 09:19:09,250 Example #0\n",
"2019-10-14 09:19:09,251 \tSource: source_sentence\n",
"2019-10-14 09:19:09,251 \tReference: target_sentence\n",
"2019-10-14 09:19:09,251 \tHypothesis: 21 ስለዚ፡ ንሰንከርቲ፡\n",
"2019-10-14 09:19:09,251 Example #1\n",
"2019-10-14 09:19:09,252 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 09:19:09,252 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 09:19:09,252 \tHypothesis: 13 ብዛዕባ እቲ ጉባኤ ኣብ የሩሳሌም ዚቕመጥ ዝነበረ ቓል ኣምላኽ ከም ዝሰምዕዎ ምስ ሰማዕኩ፡ ነቲ ጉባኤ ኣምላኽ ዚፈርህዎ ስርዓት ኪነግረኩም ኢሉ ኸም ዝሰምዕዎ ትፈልጡ ኢኹም።+\n",
"2019-10-14 09:19:09,252 Example #2\n",
"2019-10-14 09:19:09,252 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 09:19:09,252 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 09:19:09,253 \tHypothesis: 14 ኣብ ሰማርያ ኸኣ ብብዙሕ ኣህዛብ ብብዙሕ ኣህዛብ ብብዙሕ ኣህዛብ ተመላለሰ፣ ኣነ ኸኣ ካብ ምድሪ ኣቦታተይ ዘውጽኣኒ እዩ።+\n",
"2019-10-14 09:19:09,253 Example #3\n",
"2019-10-14 09:19:09,253 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 09:19:09,253 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 09:19:09,253 \tHypothesis: 15 እቲ ኣምላኽ ካብ ኣቦታተይ ዘውጽኣኒ ኣምላኽ ምስ ረኣየ፡ ብጸጋ ጸኒዑ ተመላለሰኒ።+\n",
"2019-10-14 09:19:09,253 Validation result at epoch 7, step 2400: bleu: 1.04, loss: 111665.2969, ppl: 27.4436, duration: 245.8089s\n",
"2019-10-14 09:20:07,061 Epoch 7: total training loss 954.59\n",
"2019-10-14 09:20:07,061 EPOCH 8\n",
"2019-10-14 09:20:25,077 Epoch 8 Step: 2500 Batch Loss: 2.945509 Tokens per Sec: 3740, Lr: 0.000442\n",
"2019-10-14 09:21:41,497 Epoch 8 Step: 2600 Batch Loss: 1.804559 Tokens per Sec: 4612, Lr: 0.000433\n",
"2019-10-14 09:22:58,325 Epoch 8 Step: 2700 Batch Loss: 2.855116 Tokens per Sec: 8337, Lr: 0.000425\n",
"2019-10-14 09:24:15,242 Epoch 8 Step: 2800 Batch Loss: 2.348850 Tokens per Sec: 12048, Lr: 0.000418\n",
"2019-10-14 09:28:19,491 Hooray! New best validation result [ppl]!\n",
"2019-10-14 09:28:19,491 Saving new checkpoint.\n",
"2019-10-14 09:28:21,023 Example #0\n",
"2019-10-14 09:28:21,024 \tSource: source_sentence\n",
"2019-10-14 09:28:21,024 \tReference: target_sentence\n",
"2019-10-14 09:28:21,024 \tHypothesis: 21 ኣብ ራብዐይቲ መዓልቲ፡ ቅርጽ፡\n",
"2019-10-14 09:28:21,024 Example #1\n",
"2019-10-14 09:28:21,024 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 09:28:21,024 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 09:28:21,024 \tHypothesis: 13 ብዛዕባ እቲ ኣብ ቅድሚ ኣምላኽ ዚቕመጥ ዝነበረ ቓል ከም ዝሰምዖ ምስ ሰማዕካ፡ እቲ ናይ ሓቂ ኣምላኽ ከም ዝቘረጸ ሰሚዕካ ኣለኹ፣\n",
"2019-10-14 09:28:21,025 Example #2\n",
"2019-10-14 09:28:21,025 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 09:28:21,025 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 09:28:21,025 \tHypothesis: 14 ካብ ኣህዛብ ከኣ ብዙሕ መሬት ከም ዝረኸሰ ኽፍኣት ከለኹ፡ ካብ ኣህዛብ ከም ዝምብዛሕትኦም ኣብ ቅድሚ ኣዒንተይ ተራእየ።+\n",
"2019-10-14 09:28:21,025 Example #3\n",
"2019-10-14 09:28:21,025 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 09:28:21,025 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 09:28:21,026 \tHypothesis: 15 እቲ ኣምላኽ ካብ ኣዲኡ ምስ ኣደ ግና፡ ብጸጋ ጸኒዑኒ ጸሊሙኒ እዩ፣+\n",
"2019-10-14 09:28:21,026 Validation result at epoch 8, step 2800: bleu: 1.35, loss: 108688.3906, ppl: 25.1243, duration: 245.7829s\n",
"2019-10-14 09:28:44,067 Epoch 8: total training loss 881.33\n",
"2019-10-14 09:28:44,067 EPOCH 9\n",
"2019-10-14 09:29:38,009 Epoch 9 Step: 2900 Batch Loss: 1.543829 Tokens per Sec: 3725, Lr: 0.000410\n",
"2019-10-14 09:30:54,689 Epoch 9 Step: 3000 Batch Loss: 2.273299 Tokens per Sec: 6357, Lr: 0.000403\n",
"2019-10-14 09:32:11,763 Epoch 9 Step: 3100 Batch Loss: 2.011267 Tokens per Sec: 10073, Lr: 0.000397\n",
"2019-10-14 09:33:15,323 Epoch 9: total training loss 815.74\n",
"2019-10-14 09:33:15,323 EPOCH 10\n",
"2019-10-14 09:33:27,753 Epoch 10 Step: 3200 Batch Loss: 2.297024 Tokens per Sec: 3777, Lr: 0.000391\n",
"2019-10-14 09:37:31,865 Hooray! New best validation result [ppl]!\n",
"2019-10-14 09:37:31,865 Saving new checkpoint.\n",
"2019-10-14 09:37:33,355 Example #0\n",
"2019-10-14 09:37:33,356 \tSource: source_sentence\n",
"2019-10-14 09:37:33,356 \tReference: target_sentence\n",
"2019-10-14 09:37:33,356 \tHypothesis: 21 ኣብ መወዳእታ እቲ ቦታ ኸኣ መጠንቀቕታ ይኹነልኩ፣\n",
"2019-10-14 09:37:33,356 Example #1\n",
"2019-10-14 09:37:33,356 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 09:37:33,356 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 09:37:33,356 \tHypothesis: 13 ብዛዕባ እቲ ኣምላኽ ንሲዶናውያን ዘሕጥኣሉ ግዜ ኣብ ቅድመይ ከም ዘሕጥኣኩም ሰሚዕኩም ኣለኹ፣+\n",
"2019-10-14 09:37:33,356 Example #2\n",
"2019-10-14 09:37:33,357 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 09:37:33,357 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 09:37:33,357 \tHypothesis: 14 ኣብ ይሁዳ ድማ ከም ዘስተንክዎም ኣህዛብ ስለ ዝፈለጥክዋ፡ ኣብ ይሁዳ እውን ብዙሕ ስለ ዝጸንሐ፡ ኣብ ይሁዳ ተኣምራትን ኣዝዩ ዓብዪ እዩ።+\n",
"2019-10-14 09:37:33,357 Example #3\n",
"2019-10-14 09:37:33,357 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 09:37:33,357 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 09:37:33,357 \tHypothesis: 15 ግናኸ፡ ኣምላኽ ካብ ኣደይ ምስ ጠመተ፡ ብጸጋ ጸኒሑ፡ ብጸጋ እውን ጸኒሑ፡+ ብጸጋ ጸኒሑኒ እውን ተጸሊሙኒ ነይሩኒ።+\n",
"2019-10-14 09:37:33,357 Validation result at epoch 10, step 3200: bleu: 1.47, loss: 105395.8672, ppl: 22.7867, duration: 245.6044s\n",
"2019-10-14 09:38:49,512 Epoch 10 Step: 3300 Batch Loss: 2.357734 Tokens per Sec: 4368, Lr: 0.000385\n",
"2019-10-14 09:40:06,645 Epoch 10 Step: 3400 Batch Loss: 2.163139 Tokens per Sec: 8054, Lr: 0.000379\n",
"2019-10-14 09:41:23,740 Epoch 10 Step: 3500 Batch Loss: 2.291968 Tokens per Sec: 11795, Lr: 0.000374\n",
"2019-10-14 09:41:51,872 Epoch 10: total training loss 763.60\n",
"2019-10-14 09:41:51,872 EPOCH 11\n",
"2019-10-14 09:42:39,245 Epoch 11 Step: 3600 Batch Loss: 2.102899 Tokens per Sec: 3727, Lr: 0.000368\n",
"2019-10-14 09:46:43,305 Hooray! New best validation result [ppl]!\n",
"2019-10-14 09:46:43,306 Saving new checkpoint.\n",
"2019-10-14 09:46:44,887 Example #0\n",
"2019-10-14 09:46:44,888 \tSource: source_sentence\n",
"2019-10-14 09:46:44,888 \tReference: target_sentence\n",
"2019-10-14 09:46:44,888 \tHypothesis: 21 ኣብ መወዳእታ እቲ መሬት ከኣ፡\n",
"2019-10-14 09:46:44,888 Example #1\n",
"2019-10-14 09:46:44,888 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 09:46:44,888 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 09:46:44,888 \tHypothesis: 13 ብዛዕባ እቲ ኣምላኽ ዘዳለወሉ ግዜ፡ ኣብ ቅድሚ እቲ ጉባኤ ኣምላኽ ዘዳለወሉ ጽሑፍ ምእንቲ ኺፍጸም ሰሚዕኩም ኣለኹ፣+\n",
"2019-10-14 09:46:44,888 Example #2\n",
"2019-10-14 09:46:44,889 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 09:46:44,889 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 09:46:44,889 \tHypothesis: 14 ኣነ ድማ ካብ ኣህዛብ ከም ዘማተ፡ ኣብ ቅድሚ ኣዒንተይ ብዙሕ መድሓኒ ነይሩ፣ ከመይሲ፡ ኣነ ኣቦታተይ ኣቦይ ኣቦይ እየ።+\n",
"2019-10-14 09:46:44,889 Example #3\n",
"2019-10-14 09:46:44,889 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 09:46:44,889 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 09:46:44,889 \tHypothesis: 15 ግናኸ፡ እቲ ኻብ ኣዋልድ ዘፍቅረኒ ኣምላኽ ምስ ተጸዓኒ፡ ብጸጋ ጸኒሑ፡+\n",
"2019-10-14 09:46:44,889 Validation result at epoch 11, step 3600: bleu: 1.91, loss: 103506.2734, ppl: 21.5446, duration: 245.6436s\n",
"2019-10-14 09:48:01,302 Epoch 11 Step: 3700 Batch Loss: 1.711409 Tokens per Sec: 6044, Lr: 0.000363\n",
"2019-10-14 09:49:17,660 Epoch 11 Step: 3800 Batch Loss: 2.023492 Tokens per Sec: 9801, Lr: 0.000358\n",
"2019-10-14 09:50:28,407 Epoch 11: total training loss 717.82\n",
"2019-10-14 09:50:28,407 EPOCH 12\n",
"2019-10-14 09:50:34,734 Epoch 12 Step: 3900 Batch Loss: 1.765519 Tokens per Sec: 3738, Lr: 0.000354\n",
"2019-10-14 09:51:51,742 Epoch 12 Step: 4000 Batch Loss: 2.033462 Tokens per Sec: 4051, Lr: 0.000349\n",
"2019-10-14 09:55:55,897 Hooray! New best validation result [ppl]!\n",
"2019-10-14 09:55:55,898 Saving new checkpoint.\n",
"2019-10-14 09:55:57,410 Example #0\n",
"2019-10-14 09:55:57,411 \tSource: source_sentence\n",
"2019-10-14 09:55:57,411 \tReference: target_sentence\n",
"2019-10-14 09:55:57,411 \tHypothesis: 21 ኣብ ራብዓይ ከኣ፡\n",
"2019-10-14 09:55:57,411 Example #1\n",
"2019-10-14 09:55:57,412 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 09:55:57,412 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 09:55:57,412 \tHypothesis: 13 ብዛዕባ እዚ ምስ ሰማዕካ፡ ኣብ ቂሳይም+ ናይ ኣምላኽ ራእይ ከም ዘጕረምረምክዎ ትሓስቡ ኣለኹ፣+\n",
"2019-10-14 09:55:57,412 Example #2\n",
"2019-10-14 09:55:57,412 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 09:55:57,412 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 09:55:57,412 \tHypothesis: 14 ኣብ ይሁዳ ኸኣ ብዙሓት ኣህዛብ ከም ዘጥረኹሉ እዋን፡ ኣብ ይሁዳ እውን ከም ዘጥረኹሉ እዋን፡ ኣብ ይሁዳ እውን ብዙሕ መዓልትታት ኰይነ።+\n",
"2019-10-14 09:55:57,413 Example #3\n",
"2019-10-14 09:55:57,413 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 09:55:57,413 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 09:55:57,413 \tHypothesis: 15 እቲ ኻብ ኣዋልድ ዘፍቀርኒ ኣምላኽ ምስ ኣተወ ግና፡ ብጸጋ ጸኒሑ፡+ ብጸጋ እውን ብጽቡቕ እተተሓጸበ ፍቕሪ ተጸብየ፣+\n",
"2019-10-14 09:55:57,413 Validation result at epoch 12, step 4000: bleu: 2.39, loss: 101183.3203, ppl: 20.1102, duration: 245.6711s\n",
"2019-10-14 09:57:13,844 Epoch 12 Step: 4100 Batch Loss: 1.669955 Tokens per Sec: 7811, Lr: 0.000345\n",
"2019-10-14 09:58:30,400 Epoch 12 Step: 4200 Batch Loss: 1.671719 Tokens per Sec: 11544, Lr: 0.000341\n",
"2019-10-14 09:59:05,190 Epoch 12: total training loss 675.16\n",
"2019-10-14 09:59:05,190 EPOCH 13\n",
"2019-10-14 09:59:46,496 Epoch 13 Step: 4300 Batch Loss: 2.024124 Tokens per Sec: 3698, Lr: 0.000337\n",
"2019-10-14 10:01:03,035 Epoch 13 Step: 4400 Batch Loss: 1.760886 Tokens per Sec: 5728, Lr: 0.000333\n",
"2019-10-14 10:05:07,181 Hooray! New best validation result [ppl]!\n",
"2019-10-14 10:05:07,182 Saving new checkpoint.\n",
"2019-10-14 10:05:08,793 Example #0\n",
"2019-10-14 10:05:08,793 \tSource: source_sentence\n",
"2019-10-14 10:05:08,793 \tReference: target_sentence\n",
"2019-10-14 10:05:08,793 \tHypothesis: 21 ኣብ ልዕሊኡ ኸኣ መጋረጃ ምስክር፡\n",
"2019-10-14 10:05:08,793 Example #1\n",
"2019-10-14 10:05:08,794 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 10:05:08,794 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 10:05:08,794 \tHypothesis: 13 ብዛዕባ እቲ ኣብ ይሁዳ ዘንብረሉ ጽዩፋት ጽሑፍ* ዝሰማዕክዎ ምስ ሰማዕኩ፡ ነቲ ጉባኤ ኣምላኽ ዘዳለኹ ኣብ ቅድመይ ተነስዐ፣+\n",
"2019-10-14 10:05:08,794 Example #2\n",
"2019-10-14 10:05:08,795 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 10:05:08,795 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 10:05:08,795 \tHypothesis: 14 ኣብ ይሁዳ ድማ ካብ ኣህዛብ ከም ዘስተንክየኒ መሲልጶስታ፡ ኣብ እስራኤል እውን ከም ዘስተንክር ኰይነ ተኣምራትን ኰይነ ነይረ።+\n",
"2019-10-14 10:05:08,795 Example #3\n",
"2019-10-14 10:05:08,795 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 10:05:08,795 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 10:05:08,796 \tHypothesis: 15 እቲ ኻብ ኣዋልድ ዘፍቅረኒ ኣምላኽ ግና ካብ ማሕጸን ካብ ማሕጸን ምስ ተጸመ፡ ብጸጋ ጸኒዑ እውን እተዋህበኒ ኣምላኽ፡+\n",
"2019-10-14 10:05:08,796 Validation result at epoch 13, step 4400: bleu: 2.61, loss: 100581.0547, ppl: 19.7541, duration: 245.7603s\n",
"2019-10-14 10:06:25,677 Epoch 13 Step: 4500 Batch Loss: 1.769073 Tokens per Sec: 9437, Lr: 0.000329\n",
"2019-10-14 10:07:42,333 Epoch 13 Step: 4600 Batch Loss: 1.806818 Tokens per Sec: 13207, Lr: 0.000326\n",
"2019-10-14 10:07:42,335 Epoch 13: total training loss 637.38\n",
"2019-10-14 10:07:42,336 EPOCH 14\n",
"2019-10-14 10:08:59,576 Epoch 14 Step: 4700 Batch Loss: 1.820173 Tokens per Sec: 3750, Lr: 0.000322\n",
"2019-10-14 10:10:16,355 Epoch 14 Step: 4800 Batch Loss: 1.656994 Tokens per Sec: 7522, Lr: 0.000319\n",
"2019-10-14 10:14:20,685 Hooray! New best validation result [ppl]!\n",
"2019-10-14 10:14:20,685 Saving new checkpoint.\n",
"2019-10-14 10:14:22,363 Example #0\n",
"2019-10-14 10:14:22,363 \tSource: source_sentence\n",
"2019-10-14 10:14:22,363 \tReference: target_sentence\n",
"2019-10-14 10:14:22,363 \tHypothesis: 21 ኣብ ልዕሊ እቲ ሽመት፡\n",
"2019-10-14 10:14:22,364 Example #1\n",
"2019-10-14 10:14:22,364 \tSource: \"13 of course, you heard about my conduct formerly in juʹda·ism,+ that i kept intensely* persecuting the congregation of god and devastating it;+\"\n",
"2019-10-14 10:14:22,364 \tReference: 13 መሸም፡ ቀደም ሰዓቢ ኣይሁድነት ኣብ ዝነበርኩሉ እዋን፡+ ንጉባኤ ኣምላኽ ኣመና ኸም ዝሰጐጕክዋን ከም ዘዕኖኽዋን ሰሚዕኩም ኣለኹም።+\n",
"2019-10-14 10:14:22,364 \tHypothesis: 13 ብዛዕባ እቲ ኣነ ዝገብሮ ዘለኹ መከራ እቲ ኣምላኽ ንምስዓብ ዝቘረጸሉ ጽኑዕ ዝሰማዕክዎ ቓላተይ ሰሚዕካ ኣለኹ፣+\n",
"2019-10-14 10:14:22,364 Example #2\n",
"2019-10-14 10:14:22,365 \tSource: \"14 and i was making greater progress in juʹda·ism than many of my own age in my nation, as i was far more zealous for the traditions of my fathers.+\"\n",
"2019-10-14 10:14:22,365 \tReference: 14 ንስርዓት ኣቦታተይ ዝያዳ ቕንኣት ስለ ዝነበረኒ፡ ብኣይሁድነት ካብ ብዙሓት መሳቶይ ዝዀኑ ደቂ ዓደይ ዝያዳ ዕቤት እገብር ነይረ።+\n",
"2019-10-14 10:14:22,365 \tHypothesis: 14 ኣብ ይሁዳ ኸኣ ካብ መንጎ ብዙሓት ኣቦታተይ ተሪፈን ብትምኒት ተሃንጥየ።+\n",
"2019-10-14 10:14:22,365 Example #3\n",
"2019-10-14 10:14:22,366 \tSource: \"15 but when god, who separated me from my mother’s womb and called me through his undeserved kindness,+ thought good\"\n",
"2019-10-14 10:14:22,366 \tReference: 15 እቲ ኻብ ከርሲ ኣደይ ዝፈለየንን ብጸጋኡ+ ዝጸውዓንን ኣምላኽ ግና፡\n",
"2019-10-14 10:14:22,366 \tHypothesis: 15 ግናኸ፡ እቲ ኻብ ኣዋልድ ኣደይ ዚኸይድ ኣምላኽ ምስ ረኣኽዎ፡ ብጸጋ ጸኒሑ፡+ ብጸጋ እውን ተሓጒሱ እዩ፣+\n",
"2019-10-14 10:14:22,366 Validation result at epoch 14, step 4800: bleu: 2.64, loss: 99502.6484, ppl: 19.1322, duration: 246.0104s\n",
"2019-10-14 10:15:39,615 Epoch 14 Step: 4900 Batch Loss: 1.698706 Tokens per Sec: 11211, Lr: 0.000316\n",
"2019-10-14 10:16:18,665 Epoch 14: total training loss 599.97\n",
"2019-10-14 10:16:18,665 Training ended after 14 epochs.\n",
"2019-10-14 10:16:18,665 Best validation result at step 4800: 19.13 ppl.\n",
"2019-10-14 10:19:07,052 dev bleu: 2.95 [Beam search decoding with beam size = 5 and alpha = 1.0]\n",
"2019-10-14 10:19:07,053 Translations saved to: models/enti_transformer/00004800.hyps.dev\n",
"2019-10-14 10:22:44,676 test bleu: 4.02 [Beam search decoding with beam size = 5 and alpha = 1.0]\n",
"2019-10-14 10:22:44,677 Translations saved to: models/enti_transformer/00004800.hyps.test\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "En4yLGA0uObA",
"colab_type": "code",
"outputId": "eb92ee2b-629c-4693-cceb-7630ba4b5cf4",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 221
}
},
"source": [
"! cat joeynmt/models/enti_transformer/validations.txt"
],
"execution_count": 33,
"outputs": [
{
"output_type": "stream",
"text": [
"Steps: 400\tLoss: 183016.10938\tPPL: 227.80504\tbleu: 0.00000\tLR: 0.00027951\t*\n",
"Steps: 800\tLoss: 161773.67188\tPPL: 121.31764\tbleu: 0.00000\tLR: 0.00055902\t*\n",
"Steps: 1200\tLoss: 139968.59375\tPPL: 63.53851\tbleu: 0.00000\tLR: 0.00063789\t*\n",
"Steps: 1600\tLoss: 126149.81250\tPPL: 42.17230\tbleu: 0.39455\tLR: 0.00055243\t*\n",
"Steps: 2000\tLoss: 117405.40625\tPPL: 32.53750\tbleu: 0.77353\tLR: 0.00049411\t*\n",
"Steps: 2400\tLoss: 111665.29688\tPPL: 27.44364\tbleu: 1.04448\tLR: 0.00045105\t*\n",
"Steps: 2800\tLoss: 108688.39062\tPPL: 25.12430\tbleu: 1.35411\tLR: 0.00041760\t*\n",
"Steps: 3200\tLoss: 105395.86719\tPPL: 22.78666\tbleu: 1.46641\tLR: 0.00039063\t*\n",
"Steps: 3600\tLoss: 103506.27344\tPPL: 21.54465\tbleu: 1.90781\tLR: 0.00036828\t*\n",
"Steps: 4000\tLoss: 101183.32031\tPPL: 20.11017\tbleu: 2.39346\tLR: 0.00034939\t*\n",
"Steps: 4400\tLoss: 100581.05469\tPPL: 19.75411\tbleu: 2.60668\tLR: 0.00033313\t*\n",
"Steps: 4800\tLoss: 99502.64844\tPPL: 19.13224\tbleu: 2.64119\tLR: 0.00031894\t*\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "NBr1wm9Dl2K9",
"colab_type": "code",
"outputId": "8f0ed972-590a-4000-818a-e2dbb4d8f05b",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 51
}
},
"source": [
"# Copy the created models from the notebook storage to google drive for persistant storage \n",
"!mkdir \"$gdrive_path/models/\"\n",
"!cp -r joeynmt/models/* \"$gdrive_path/models/${src}${tgt}_transformer/\""
],
"execution_count": 34,
"outputs": [
{
"output_type": "stream",
"text": [
"mkdir: cannot create directory ‘/content/drive/My Drive/masakhane/en-ti/models/’: No such file or directory\n",
"cp: cannot create directory '/content/drive/My Drive/masakhane/en-ti/models/enti_transformer/': No such file or directory\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "2JJpKgsrJC1o",
"colab_type": "code",
"outputId": "34b33bdf-9984-46f5-b439-78ca5a160a58",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
}
},
"source": [
"! cat \"$gdrive_path/models/${src}${tgt}_transformer/validations.txt\""
],
"execution_count": 35,
"outputs": [
{
"output_type": "stream",
"text": [
"cat: '/content/drive/My Drive/masakhane/en-ti/models/enti_transformer/validations.txt': No such file or directory\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "YhisG8H_vGyI",
"colab_type": "code",
"outputId": "e1c00545-1089-458e-b833-330368daedd8",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 51
}
},
"source": [
"! cd joeynmt; python3 -m joeynmt test models/enti_transformer/config.yaml\n"
],
"execution_count": 36,
"outputs": [
{
"output_type": "stream",
"text": [
"2019-10-14 10:25:52,015 - dev bleu: 2.95 [Beam search decoding with beam size = 5 and alpha = 1.0]\n",
"2019-10-14 10:29:29,611 - test bleu: 4.02 [Beam search decoding with beam size = 5 and alpha = 1.0]\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "WrCceV22I5PR",
"colab_type": "code",
"colab": {}
},
"source": [
""
],
"execution_count": 0,
"outputs": []
}
]
} |