【问题标题】:How to add words in aspell dictionary?如何在 aspell 字典中添加单词?
【发布时间】:2015-08-17 16:49:57
【问题描述】:

我在我的应用程序中使用 aspell 进行拼写检查。我不知道如何在 aspell 中添加单词。有什么办法加词吗

【问题讨论】:

  • 这个问题绝对不是关于计算硬件和软件的一般问题。这是一个 LiveCode 编程问题,不应关闭。

标签: bash livecode aspell


【解决方案1】:

Songy 的示例 echo "*WORD\n#" | aspell -a 为我工作了一个词。我能够使用此命令添加包含单词列表的文本文件 (input.txt):

cat input.txt | while read word; do echo -e "*${word}\n#" | aspell -a; done

【讨论】:

    【解决方案2】:

    要添加新词newword,请执行以下操作:

    echo -e "*newword\n#" | aspell -a
    

    【讨论】:

      【解决方案3】:

      在列表中添加您输入的单词。如果单词前面有星号,则将其添加到当前字典中。如果有一行带有哈希值,则将新添加的单词保存到用户个人字典中,然后可以在整个系统中使用。

      echo "*WORD\n#" | aspell -a
      

      您可以通过多种方式将单词添加到您的字典中,您可以阅读它们here.

      【讨论】:

      • 在 LiveCode 中,应该是:get shell("echo" && quote & "*WORD\n#" & quote && "| aspell -a")
      • 它显示错误@(#) International Ispell Version 3.1.20(但实际上是 Aspell 0.60.7-20110707)错误:单词“WORD\n#”无效。字符 '\' (U+5C) 不能出现在单词中间。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-20
      • 1970-01-01
      • 2018-06-07
      • 1970-01-01
      • 2014-04-02
      相关资源
      最近更新 更多