Skip to content

Commit

Permalink
enhance: 英語混輸僅在 4 碼以上生效
Browse files Browse the repository at this point in the history
Thanks to @pfeiwu
  • Loading branch information
ksqsf committed Oct 31, 2024
1 parent 005b506 commit 070075b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions moran.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ custom_phrase: # 自定義短語
initial_quality: 1000

english:
tag: english
dictionary: moran_english
prism: moran_english
enable_completion: true
Expand Down Expand Up @@ -323,6 +324,8 @@ recognizer:
# CAVEAT: 排除 ^; 避免 ;d 無法自動上屏
# CAVEAT: ^o 只保留 ^ou 和 ^o$,避免反查被干擾
has_emoji: '(^[a-np-z][a-z]*/?$)|(^o$)|(^ou[a-z/]*$)'
# 外語
english: '^[A-Za-z]{4}[A-Za-z]*'
# 引導外語
japanese_o: '^ojp[a-z]*$'

Expand Down
3 changes: 3 additions & 0 deletions moran_aux.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ fixed:
encode_commit_history: true

english:
tag: english
dictionary: moran_english
enable_user_dict: true
enable_completion: true
Expand Down Expand Up @@ -235,6 +236,8 @@ recognizer:
reverse_stroke: "^obh[a-z]*$"
reverse_cangjie5: "^ocj[a-z]*$"
reverse_zrlf: "^olf[a-z]*$"
# 外語
english: '^[A-Za-z]{4}[A-Za-z]*'

moran:
# 預取個數
Expand Down
4 changes: 3 additions & 1 deletion moran_sentence.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ custom_phrase: # 自定義短語
initial_quality: 10

english:
tag: english
dictionary: moran_english
enable_completion: true
enable_sentence: false
Expand Down Expand Up @@ -256,7 +257,8 @@ recognizer:
reverse_cangjie5: "^ocj[A-Za-z]*$"
reverse_zrlf: "^olf[A-Za-z]*$"
reverse_bopomofo: '^ovy[A-Za-z0-9,.;/\-]*$'
punct: '^/([0-9]0?|[A-Za-z]+)$'
# 外語
english: '^[A-Za-z]{4}[A-Za-z]*'

# 默認啓用語言模型
__include: moran:/octagram/enable_for_sentence

0 comments on commit 070075b

Please sign in to comment.