Lines Matching refs:pos
471 for (PoolPosType pos = 0; pos < dmi_pool_used_; pos++) {
472 debug_print_dmi(pos, 1);
480 size_t MatrixSearch::delsearch(size_t pos, bool is_pos_in_splid,
485 size_t reset_pos = pos;
488 if (pys_decoded_len_ <= pos) {
489 del_in_pys(pos, 1);
506 if (is_pos_in_splid && spl_id_num_ <= pos)
515 if (fixed_lmas_ > 0 && pos < spl_start_[lma_start_[fixed_lmas_]])
518 del_in_pys(pos, 1);
521 if (pos == spl_start_[lma_start_[fixed_lmas_]]) {
535 del_py_len = spl_start_[pos + 1] - spl_start_[pos];
537 del_in_pys(spl_start_[pos], del_py_len);
539 if (pos >= lma_start_[fixed_lmas_]) {
541 reset_pos = spl_start_[pos + 1] - del_py_len;
546 merge_fixed_lmas(pos);
662 for (uint16 pos = lma_fr; pos < lma_to; pos++) {
663 LemmaIdType lma_id = lma_id_[pos];
667 uint16 lma_len = lma_start_[pos + 1] - lma_start_[pos];
668 utf16_strncpy(spl_ids + spl_id_fr, spl_id_ + lma_start_[pos], lma_len);
714 uint16 pos = 0;
716 while (pos < fixed_lmas_) {
717 if (lma_start_[pos + 1] - lma_start_[lma_id_from] >
720 mtrx_nd_pool_[matrix_[spl_start_[lma_start_[pos]]]
727 add_lma_to_userdict(lma_id_from, pos, score_to_add);
729 lma_id_from = pos;
736 if (0 == fixed_lmas_no1_[pos]) {
739 pos++;
743 if (lma_start_[pos] - lma_start_[lma_id_from] > 1) {
745 mtrx_nd_pool_[matrix_[spl_start_[lma_start_[pos]]]
752 add_lma_to_userdict(lma_id_from, pos, score_to_add);
782 for (size_t pos = fixed_lmas_; pos < lma_id_num_; pos++) {
783 fixed_lmas_no1_[pos] = 1;
945 bool MatrixSearch::is_split_at(uint16 pos) {
946 return !spl_parser_->is_valid_to_parse(pys_[pos - 1]);
1205 for (size_t pos = del_spl_pos; pos <= spl_id_num_; pos++) {
1206 spl_start_[pos] = spl_start_[pos + 1] - del_py_len;
1207 if (pos == spl_id_num_)
1209 spl_id_[pos] = spl_id_[pos + 1];
1231 for (uint16 pos = bp; pos <= fixed_lmas_; pos++) {
1232 c_phrase_.sublma_start[sub_num + pos - bp] = lma_start_[pos];
1233 if (lma_start_[pos] > del_spl_pos) {
1234 c_phrase_.sublma_start[sub_num + pos - bp] -= 1;
1237 if (pos == fixed_lmas_)
1244 lma_len = get_lemma_str(lma_id_[pos], lma_str, kMaxRowNum - phrase_len);
1245 assert(lma_len == lma_start_[pos + 1] - lma_start_[pos]);
1252 for (uint16 pos = 0; pos <= c_phrase_.sublma_num; pos++) {
1253 if (c_phrase_.sublma_start[pos] > del_spl_pos) {
1254 c_phrase_.sublma_start[pos] -= 1;
1271 for (uint16 pos = 0;
1272 pos < c_phrase_.sublma_start[c_phrase_.sublma_num] - del_spl_pos;
1273 pos++) {
1274 chn_str[pos] = chn_str[pos + 1];
1283 for (uint16 pos = 1; pos <= c_phrase_.sublma_num; pos++) {
1284 if (c_phrase_.sublma_start[pos - 1] ==
1285 c_phrase_.sublma_start[pos]) {
1289 c_phrase_.sublma_start[pos - 1] =
1290 c_phrase_.sublma_start[pos];
1344 for (size_t pos = fixed_hzs_;
1345 pos < fixed_hzs_ + (spl_id_num_ - fixed_hzs_ + 1) / 2; pos++) {
1346 if (spl_id_num_ + fixed_hzs_ - pos != pos + 1) {
1347 spl_start_[pos + 1] ^= spl_start_[spl_id_num_ - pos + fixed_hzs_];
1348 spl_start_[spl_id_num_ - pos + fixed_hzs_] ^= spl_start_[pos + 1];
1349 spl_start_[pos + 1] ^= spl_start_[spl_id_num_ - pos + fixed_hzs_];
1351 spl_id_[pos] ^= spl_id_[spl_id_num_ + fixed_hzs_ - pos - 1];
1352 spl_id_[spl_id_num_ + fixed_hzs_- pos - 1] ^= spl_id_[pos];
1353 spl_id_[pos] ^= spl_id_[spl_id_num_ + fixed_hzs_- pos - 1];
1358 for (size_t pos = fixed_lmas_;
1359 pos < fixed_lmas_ + (lma_id_num_ - fixed_lmas_ + 1) / 2; pos++) {
1360 assert(lma_id_num_ + fixed_lmas_ - pos - 1 >= pos);
1362 if (lma_id_num_ + fixed_lmas_ - pos > pos + 1) {
1363 lma_start_[pos + 1] ^= lma_start_[lma_id_num_ - pos + fixed_lmas_];
1364 lma_start_[lma_id_num_ - pos + fixed_lmas_] ^= lma_start_[pos + 1];
1365 lma_start_[pos + 1] ^= lma_start_[lma_id_num_ - pos + fixed_lmas_];
1367 lma_id_[pos] ^= lma_id_[lma_id_num_ - 1 - pos + fixed_lmas_];
1368 lma_id_[lma_id_num_ - 1 - pos + fixed_lmas_] ^= lma_id_[pos];
1369 lma_id_[pos] ^= lma_id_[lma_id_num_ - 1 - pos + fixed_lmas_];
1373 for (size_t pos = fixed_lmas_ + 1; pos <= lma_id_num_; pos++) {
1374 if (pos < lma_id_num_)
1375 lma_start_[pos] = lma_start_[pos - 1] +
1376 (lma_start_[pos] - lma_start_[pos + 1]);
1378 lma_start_[pos] = lma_start_[pos - 1] + lma_start_[pos] -
1384 for (size_t pos = spl_id_num_; pos > 0; pos--) {
1385 if (NULL != matrix_[spl_start_[pos]].mtrx_nd_fixed) {
1386 fixed_hzs_ = pos;
1504 uint16 pos = dep->splids_extended;
1506 if (pos >= c_phrase_.length)
1509 uint16 splid = dep->splids[pos];
1510 if (splid == c_phrase_.spl_ids[pos]) {
1525 if (pos == c_phrase_.length - 1) {
1552 for (size_t pos = 0; pos < lpi_num; pos++) {
1553 float score = mtrx_nd->score + lpi_items[pos].psb;
1554 if (pos > 0 && score - PRUMING_SCORE > mtrx_nd_res_min->score)
1570 mtrx_nd_res->id = lpi_items[pos].id;
1709 for (size_t pos = 0; pos < lpsi_num; pos++) {
1710 lpsis[pos].lpi = lma_buf[pos];
1711 get_lemma_str(lma_buf[pos].id, lpsis[pos].str, kMaxLemmaSize + 1);
1717 for (size_t pos = 0; pos < lpsi_num; pos++) {
1718 if (pos > 0 && utf16_strcmp(lpsis[pos].str, lpsis[pos - 1].str) == 0) {
1719 if (lpsis[pos].lpi.psb < lpsis[pos - 1].lpi.psb) {
1721 lma_buf[remain_num - 1] = lpsis[pos].lpi;
1725 if (NULL != pfullsent && utf16_strcmp(lpsis[pos].str, pfullsent) == 0)
1728 lma_buf[remain_num] = lpsis[pos].lpi;
1739 for (size_t pos = 0; pos < num; pos++) {
1741 get_lemma_str(lma_buf[pos].id, hanzis, 2);
1742 lma_buf[pos].hanzi = hanzis[0];
1748 for (size_t pos = 0; pos < num; pos++) {
1749 if (pos > 0 && lma_buf[pos].hanzi == lma_buf[pos - 1].hanzi) {
1752 lma_buf[pos].hanzi == pfullsent[0])
1755 if (lma_buf[pos].psb < lma_buf[pos - 1].psb) {
1757 assert(lma_buf[remain_num - 1].hanzi == lma_buf[pos].hanzi);
1758 lma_buf[remain_num - 1] = lma_buf[pos];
1764 lma_buf[pos].hanzi == pfullsent[0])
1767 lma_buf[remain_num] = lma_buf[pos];
1834 for (uint16 pos = 0; pos < c_phrase_.length; pos++) {
1835 splids[pos] = c_phrase_.spl_ids[pos];
1836 if (spl_trie_->is_half_id(splids[pos])) {