constant.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. package chinese
  2. var (
  3. hk2s = `{
  4. "name": "Traditional Chinese (Hong Kong standard) to Simplified Chinese",
  5. "segmentation": {
  6. "type": "mmseg",
  7. "dict": {
  8. "type": "txt",
  9. "file": "TSPhrases.txt"
  10. }
  11. },
  12. "conversion_chain": [{
  13. "dict": {
  14. "type": "group",
  15. "dicts": [{
  16. "type": "txt",
  17. "file": "HKVariantsRevPhrases.txt"
  18. }, {
  19. "type": "txt",
  20. "file": "HKVariantsRev.txt"
  21. }]
  22. }
  23. }, {
  24. "dict": {
  25. "type": "group",
  26. "dicts": [{
  27. "type": "txt",
  28. "file": "TSPhrases.txt"
  29. }, {
  30. "type": "txt",
  31. "file": "TSCharacters.txt"
  32. }]
  33. }
  34. }]
  35. }
  36. `
  37. s2hk = `{
  38. "name": "Simplified Chinese to Traditional Chinese (Hong Kong standard)",
  39. "segmentation": {
  40. "type": "mmseg",
  41. "dict": {
  42. "type": "txt",
  43. "file": "STPhrases.txt"
  44. }
  45. },
  46. "conversion_chain": [{
  47. "dict": {
  48. "type": "group",
  49. "dicts": [{
  50. "type": "txt",
  51. "file": "STPhrases.txt"
  52. }, {
  53. "type": "txt",
  54. "file": "STCharacters.txt"
  55. }]
  56. }
  57. }, {
  58. "dict": {
  59. "type": "group",
  60. "dicts": [{
  61. "type": "txt",
  62. "file": "HKVariantsPhrases.txt"
  63. }, {
  64. "type": "txt",
  65. "file": "HKVariants.txt"
  66. }]
  67. }
  68. }]
  69. }
  70. `
  71. s2t = `{
  72. "name": "Simplified Chinese to Traditional Chinese",
  73. "segmentation": {
  74. "type": "mmseg",
  75. "dict": {
  76. "type": "txt",
  77. "file": "STPhrases.txt"
  78. }
  79. },
  80. "conversion_chain": [{
  81. "dict": {
  82. "type": "group",
  83. "dicts": [{
  84. "type": "txt",
  85. "file": "STPhrases.txt"
  86. }, {
  87. "type": "txt",
  88. "file": "STCharacters.txt"
  89. }]
  90. }
  91. }]
  92. }
  93. `
  94. s2tw = `{
  95. "name": "Simplified Chinese to Traditional Chinese (Taiwan standard)",
  96. "segmentation": {
  97. "type": "mmseg",
  98. "dict": {
  99. "type": "txt",
  100. "file": "STPhrases.txt"
  101. }
  102. },
  103. "conversion_chain": [{
  104. "dict": {
  105. "type": "group",
  106. "dicts": [{
  107. "type": "txt",
  108. "file": "STPhrases.txt"
  109. }, {
  110. "type": "txt",
  111. "file": "STCharacters.txt"
  112. }]
  113. }
  114. }, {
  115. "dict": {
  116. "type": "txt",
  117. "file": "TWVariants.txt"
  118. }
  119. }]
  120. }
  121. `
  122. s2twp = `{
  123. "name": "Simplified Chinese to Traditional Chinese (Taiwan standard, with phrases)",
  124. "segmentation": {
  125. "type": "mmseg",
  126. "dict": {
  127. "type": "txt",
  128. "file": "STPhrases.txt"
  129. }
  130. },
  131. "conversion_chain": [{
  132. "dict": {
  133. "type": "group",
  134. "dicts": [{
  135. "type": "txt",
  136. "file": "STPhrases.txt"
  137. }, {
  138. "type": "txt",
  139. "file": "STCharacters.txt"
  140. }]
  141. }
  142. }, {
  143. "dict": {
  144. "type": "txt",
  145. "file": "TWPhrases.txt"
  146. }
  147. }, {
  148. "dict": {
  149. "type": "txt",
  150. "file": "TWVariants.txt"
  151. }
  152. }]
  153. }
  154. `
  155. t2hk = `{
  156. "name": "Traditional Chinese to Traditional Chinese (Hong Kong standard)",
  157. "segmentation": {
  158. "type": "mmseg",
  159. "dict": {
  160. "type": "txt",
  161. "file": "HKVariants.txt"
  162. }
  163. },
  164. "conversion_chain": [{
  165. "dict": {
  166. "type": "txt",
  167. "file": "HKVariants.txt"
  168. }
  169. }]
  170. }
  171. `
  172. t2s = `{
  173. "name": "Traditional Chinese to Simplified Chinese",
  174. "segmentation": {
  175. "type": "mmseg",
  176. "dict": {
  177. "type": "txt",
  178. "file": "TSPhrases.txt"
  179. }
  180. },
  181. "conversion_chain": [{
  182. "dict": {
  183. "type": "group",
  184. "dicts": [{
  185. "type": "txt",
  186. "file": "TSPhrases.txt"
  187. }, {
  188. "type": "txt",
  189. "file": "TSCharacters.txt"
  190. }]
  191. }
  192. }]
  193. }
  194. `
  195. t2tw = `{
  196. "name": "Traditional Chinese to Traditional Chinese (Taiwan standard)",
  197. "segmentation": {
  198. "type": "mmseg",
  199. "dict": {
  200. "type": "txt",
  201. "file": "TWVariants.txt"
  202. }
  203. },
  204. "conversion_chain": [{
  205. "dict": {
  206. "type": "txt",
  207. "file": "TWVariants.txt"
  208. }
  209. }]
  210. }
  211. `
  212. tw2s = `{
  213. "name": "Traditional Chinese (Taiwan standard) to Simplified Chinese",
  214. "segmentation": {
  215. "type": "mmseg",
  216. "dict": {
  217. "type": "txt",
  218. "file": "TSPhrases.txt"
  219. }
  220. },
  221. "conversion_chain": [{
  222. "dict": {
  223. "type": "group",
  224. "dicts": [{
  225. "type": "txt",
  226. "file": "TWVariantsRevPhrases.txt"
  227. }, {
  228. "type": "txt",
  229. "file": "TWVariantsRev.txt"
  230. }]
  231. }
  232. }, {
  233. "dict": {
  234. "type": "group",
  235. "dicts": [{
  236. "type": "txt",
  237. "file": "TSPhrases.txt"
  238. }, {
  239. "type": "txt",
  240. "file": "TSCharacters.txt"
  241. }]
  242. }
  243. }]
  244. }
  245. `
  246. tw2sp = `{
  247. "name": "Traditional Chinese (Taiwan standard) to Simplified Chinese (with phrases)",
  248. "segmentation": {
  249. "type": "mmseg",
  250. "dict": {
  251. "type": "txt",
  252. "file": "TSPhrases.txt"
  253. }
  254. },
  255. "conversion_chain": [{
  256. "dict": {
  257. "type": "group",
  258. "dicts": [{
  259. "type": "txt",
  260. "file": "TWVariantsRevPhrases.txt"
  261. }, {
  262. "type": "txt",
  263. "file": "TWVariantsRev.txt"
  264. }]
  265. }
  266. }, {
  267. "dict": {
  268. "type": "txt",
  269. "file": "TWPhrasesRev.txt"
  270. }
  271. }, {
  272. "dict": {
  273. "type": "group",
  274. "dicts": [{
  275. "type": "txt",
  276. "file": "TSPhrases.txt"
  277. }, {
  278. "type": "txt",
  279. "file": "TSCharacters.txt"
  280. }]
  281. }
  282. }]
  283. }
  284. `
  285. )