apertium / apertium-python

now you can even use apertium from python
GNU General Public License v3.0
31 stars 27 forks source link

Wrap deformatters/formatters #51

Open sushain97 opened 5 years ago

sushain97 commented 5 years ago
singh-lokendra commented 5 years ago

from irc

[17:42:10] <spectie>     <escape-chars regexp='[][\\/@&lt;&gt;^${}]'/>
[17:42:14] <sushain> is there even generated C++?
[17:43:12] <spectie> yes
[17:43:16] <spectie> but i wouldn't try converting it
[17:43:19] <spectie> ~/source/apertium/trunk/apertium/apertium/apertium_destxt.cc
[17:43:28] <sushain> heh okay
[17:43:36] <spectie> it's >2000 lines of code
[17:43:43] <sushain> :(
[17:43:47] <spectie> which you could probably replace with 10 lines of python
[17:43:54] <spectie> (because it does things in a very specific way
[17:44:00] <spectie> using a very specific lexical analyser
[18:38:12] <spectie> you need to replace those characters with \<char>
[18:38:16] <spectie> e.g. $ -> \$
[18:38:19] <spectie> [ -> \[
[18:38:23] <spectie> ^ -> \^
[18:38:24] <spectie> etc.