0

我有一个 natlink 设置,在 Dragon 13 上有蜻蜓和 aena。它在英语中运行良好,几乎适用于法语。尝试在语法中使用重音字母时遇到问题。

我收到此错误(natlink uniform6):

Traceback (most recent call last):
  File "C:\NatLink\NatLink\MacroSystem\core\natlinkmain.py", line 322, in loadFile
    imp.load_module(modName,fndFile,fndName,fndDesc)
  File "C:\NatLink\NatLink\MacroSystem\_hello_world_aenea_fra2.py", line 26
SyntaxError: Non-ASCII character '\xc3' in file C:\NatLink\NatLink\MacroSystem\_hello_world_aenea_fra2.py on line 26, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
root: Failed to load language-specific number module: global name 'GrammarError' is not defined

我还尝试在文件开头输入编码。但后来我得到另一个错误:

Traceback (most recent call last):
  File "C:\NatLink\NatLink\MacroSystem\core\natlinkmain.py", line 322, in loadFile
    imp.load_module(modName,fndFile,fndName,fndDesc)
  File "C:\NatLink\NatLink\MacroSystem\_hello_world_aenea_fra2.py", line 34, in <module>
    grammar.add_rule(TestRule())
  File "C:\Python27\lib\site-packages\dragonfly\grammar\rule_mapping.py", line 137, in __init__
    c = Compound(spec, elements=self._extras, value=value)
  File "C:\Python27\lib\site-packages\dragonfly\grammar\elements_compound.py", line 269, in __init__
    raise SyntaxError("Invalid compound spec: %r" % spec)
SyntaxError: Invalid compound spec: 'voici la t\xc3\xa9l\xc3\xa9'

我尝试使用 natlink 版本 4.1 tango to uniform6 我尝试了这些链接中给出的技巧:

https://gitter.im/synkarius/caster/archives/2016/09/14

https://github.com/t4ngo/dragonfly/issues/11

如果有人知道管道中每个软件的正确版本号组合以及正确的技巧以使其全部工作,请告诉我。

4

2 回答 2

0

好吧,cheep在我帖子的第二个链接上提出的补丁确实有效,我只是在应用时出错了。我刚刚在新的蜻蜓安装上重新应用了补丁,它工作了。

通过我所有的测试,我确认 natlink-4.1uniform-7 可以很好地处理口音并且罪魁祸首是蜻蜓。

于 2018-04-01T17:34:52.650 回答
0

这已通过Unicode/多语言支持在 Danesprite 的蜻蜓分支中对语法规范 #14 进行了修复,该分支集成了来自社区的修复。希望有朝一日 t4ngo/dragonfly 的上游会包含修复程序。

让我知道这可以解决您的问题。

于 2018-09-18T16:47:18.257 回答