Skip to content

Commit

Permalink
Merge branch 'main' of github.com:a-ejiri/open_jtalk into 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukumijima committed Aug 10, 2024
2 parents 213b605 + 5031ab0 commit c17ec80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/njd_set_accent_phrase/njd_set_accent_phrase.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ void njd_set_accent_phrase(NJD * njd)
/* Rule 03 */
if (strcmp(NJDNode_get_pos(node->prev), NJD_SET_ACCENT_PHRASE_KEIYOUSHI) == 0)
if (strcmp(NJDNode_get_pos(node), NJD_SET_ACCENT_PHRASE_MEISHI) == 0 ||
strcmp(NJDNode_get_pos(node), NJD_SET_ACCENT_PHRASE_DOUSHI) == 0
strcmp(NJDNode_get_pos(node), NJD_SET_ACCENT_PHRASE_DOUSHI) == 0 ||
strcmp(NJDNode_get_pos(node), NJD_SET_ACCENT_PHRASE_KEIYOUSHI) == 0
)
NJDNode_set_chain_flag(node, 0);

Expand Down Expand Up @@ -246,6 +247,7 @@ void njd_set_accent_phrase(NJD * njd)
if (strcmp(NJDNode_get_pos(node->prev), NJD_SET_ACCENT_PHRASE_JODOUSHI) == 0
|| strcmp(NJDNode_get_pos(node->prev), NJD_SET_ACCENT_PHRASE_RENTAISHI) == 0
|| strcmp(NJDNode_get_pos(node->prev), NJD_SET_ACCENT_PHRASE_JOSHI) == 0
|| strcmp(NJDNode_get_pos(node->prev), NJD_SET_ACCENT_PHRASE_KEIYOUSHI) == 0
|| strcmp(NJDNode_get_pos(node->prev), NJD_SET_ACCENT_PHRASE_DOUSHI) == 0 )
NJDNode_set_chain_flag(node, 1);
}
Expand All @@ -256,7 +258,7 @@ void njd_set_accent_phrase(NJD * njd)
/* Rule 21 */
if (strcmp(NJDNode_get_pos(node->prev), NJD_SET_ACCENT_PHRASE_MEISHI) == 0
&& (strcmp(NJDNode_get_pos_group1(node->prev), NJD_SET_ACCENT_PHRASE_HIJIRITSU) == 0 ||strcmp(NJDNode_get_pos_group1(node->prev), NJD_SET_ACCENT_PHRASE_DAIMEISHI) == 0)
&& (strcmp(NJDNode_get_pos(node), NJD_SET_ACCENT_PHRASE_MEISHI) == 0 && strcmp(NJDNode_get_pos(node), NJD_SET_ACCENT_PHRASE_IPPAN) == 0))
&& (strcmp(NJDNode_get_pos(node), NJD_SET_ACCENT_PHRASE_MEISHI) == 0 && (strcmp(NJDNode_get_pos_group1(node), NJD_SET_ACCENT_PHRASE_IPPAN) == 0 || strcmp(NJDNode_get_pos_group1(node), NJD_SET_ACCENT_PHRASE_SAHEN_SETSUZOKU) == 0)))
NJDNode_set_chain_flag(node, 0);

/* Rule 22 */
Expand Down
6 changes: 3 additions & 3 deletions src/njd_set_accent_phrase/njd_set_accent_phrase_rule_utf_8.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ NJD_SET_ACCENT_PHRASE_RULE_H_START;
/*
Rule 01 デフォルトはくっつける
Rule 02 「名詞」の連続はくっつける
Rule 03 「形容詞」の後に「名詞」or 「動詞」がきたら別のアクセント句に
Rule 03 「形容詞」の後に「名詞」or 「動詞」or 「形容詞」がきたら別のアクセント句に
Rule 04 「名詞,形容動詞語幹」の後に「名詞」がきたら別のアクセント句に←無効化
Rule 05 「動詞」の後に「形容詞」or「名詞」がきたら別のアクセント句に
Rule 06 「副詞」,「接続詞」,「連体詞」は単独のアクセント句に
Expand All @@ -70,9 +70,9 @@ NJD_SET_ACCENT_PHRASE_RULE_H_START;
Rule 16 「*,*,*,姓」の後の「*,*,*,名」は別のアクセント句に
Rule 17 「名詞」の後の「*,*,*,名」は別のアクセント句に
Rule 18 「*,接尾」は前にくっつける
Rule 19 「名詞,非自立」は「動詞」or「助動詞,体言接続」or 「助詞」or「連体詞」に接続する場合に前にくっつける
Rule 19 「名詞,非自立」は「動詞」or「助動詞,体言接続」or 「助詞」or「連体詞」or「形容詞」に接続する場合に前にくっつける
Rule 20 「固有名詞」は前とくっつけない
Rule 21 「名詞,非自立」or「名詞,代名詞」の後の「名詞,一般」は別のアクセント句に
Rule 21 「名詞,非自立」or「名詞,代名詞」の後の「名詞,一般」or 「名詞,サ変接続」は別のアクセント句に
Rule 22 「感動詞」は単独のアクセントに
*/

Expand Down

0 comments on commit c17ec80

Please sign in to comment.