| @@ 1489-1516 (lines=28) @@ | ||
| 1486 | ) |
|
| 1487 | loc_out.pop() |
|
| 1488 | ||
| 1489 | if ( |
|
| 1490 | i > 1 |
|
| 1491 | and j > 0 |
|
| 1492 | and s_mat[i - 2, j - 1] |
|
| 1493 | + _sig_exp( |
|
| 1494 | tar_feat_wt[j - 1], |
|
| 1495 | src_feat_wt[i - 2], |
|
| 1496 | src_feat_wt[i - 1], |
|
| 1497 | ) |
|
| 1498 | + score |
|
| 1499 | >= threshold |
|
| 1500 | ): |
|
| 1501 | loc_out = deepcopy(out) |
|
| 1502 | loc_out.append( |
|
| 1503 | (src_tok[i - 2] + src_tok[i - 1], tar_tok[j - 1],) |
|
| 1504 | ) |
|
| 1505 | _retrieve( |
|
| 1506 | i - 2, |
|
| 1507 | j - 1, |
|
| 1508 | score |
|
| 1509 | + _sig_exp( |
|
| 1510 | tar_feat_wt[j - 1], |
|
| 1511 | src_feat_wt[i - 2], |
|
| 1512 | src_feat_wt[i - 1], |
|
| 1513 | ), |
|
| 1514 | loc_out, |
|
| 1515 | ) |
|
| 1516 | loc_out.pop() |
|
| 1517 | ||
| 1518 | sg_max = 0.0 |
|
| 1519 | ||
| @@ 1448-1475 (lines=28) @@ | ||
| 1445 | ) |
|
| 1446 | loc_out.pop() |
|
| 1447 | ||
| 1448 | if ( |
|
| 1449 | i > 0 |
|
| 1450 | and j > 1 |
|
| 1451 | and s_mat[i - 1, j - 2] |
|
| 1452 | + _sig_exp( |
|
| 1453 | src_feat_wt[i - 1], |
|
| 1454 | tar_feat_wt[j - 2], |
|
| 1455 | tar_feat_wt[j - 1], |
|
| 1456 | ) |
|
| 1457 | + score |
|
| 1458 | >= threshold |
|
| 1459 | ): |
|
| 1460 | loc_out = deepcopy(out) |
|
| 1461 | loc_out.append( |
|
| 1462 | (src_tok[i - 1], tar_tok[j - 2] + tar_tok[j - 1],) |
|
| 1463 | ) |
|
| 1464 | _retrieve( |
|
| 1465 | i - 1, |
|
| 1466 | j - 2, |
|
| 1467 | score |
|
| 1468 | + _sig_exp( |
|
| 1469 | src_feat_wt[i - 1], |
|
| 1470 | tar_feat_wt[j - 2], |
|
| 1471 | tar_feat_wt[j - 1], |
|
| 1472 | ), |
|
| 1473 | loc_out, |
|
| 1474 | ) |
|
| 1475 | loc_out.pop() |
|
| 1476 | ||
| 1477 | if ( |
|
| 1478 | i > 0 |
|