Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spellcheck: 中文词语纠正需要空格分割 #123

Open
Dunky-Z opened this issue Dec 14, 2022 · 2 comments
Open

spellcheck: 中文词语纠正需要空格分割 #123

Dunky-Z opened this issue Dec 14, 2022 · 2 comments

Comments

@Dunky-Z
Copy link
Contributor

Dunky-Z commented Dec 14, 2022

Hi,遇到两个小问题。版本v2.5.4

  1. 如果想要将中文的词语纠正,文本里的词语只有在被空格分割的情况下才会被纠正
    rules:
      # Auto add spacing between CJK (Chinese, Japanese, Korean) and English words.
      # 0 - off, 1 - error, 2 - warning
      space-word: 1
      # Add space between some punctuations.
      space-punctuation: 1
      # Add space between brackets (), [] when near the CJK.
      space-bracket: 1
      # Convert to fullwidth.
      fullwidth: 1
      # To remove space near the fullwidth punctuations.
      no-space-fullwidth: 1
      # To remove space arouned the fullwidth quotes “”, ''.
      no-space-fullwidth-quote: 1
      # Fullwidth alphanumeric characters to halfwidth.
      halfwidth-word: 1
      # Fullwidth punctuations to halfwidth in english.
      halfwidth-punctuation: 1
      # Spellcheck
      spellcheck: 2
      
    spellcheck:
      mode: 1
      words:
        - 蛋炒饭 = 拉面
    
    # 如果这样无法纠正
    我爱吃蛋炒饭加火腿。
    # 这样才会被纠正
    - 我爱吃 蛋炒饭 加火腿。
    + 我爱吃 拉面 加火腿。
  2. 括号后的标点符号不会被纠正
    # 最后的括号是中文括号,加了英文句点,预期结果应该是句点被改为中文句号,但是没有被纠正
    我爱吃蛋炒饭加(火腿).
     # 英文情况一样,英文括号加中文句号,预期情况句号应该被纠正为句点
     I love (china)。
@huacnlee
Copy link
Owner

spellcheck 一直还处于实验阶段,目前还有不少问题待解决。

我最近再想想怎么解决这些问题。实际上 Spellcheck 哪里如果遇到重复的词语或连贯的处理起来会有问题的。

@Dunky-Z
Copy link
Contributor Author

Dunky-Z commented Dec 14, 2022

@huacnlee 嗯嗯,好的谢谢。辛苦了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants