wwwjdic 14.0.0 → 15.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +19 -0
  3. data/Gemfile +5 -1
  4. data/README.md +461 -192
  5. data/Rakefile +7 -2
  6. data/copyright.md +17 -29
  7. data/examples/basics.rb +51 -45
  8. data/examples/translate.rb +135 -86
  9. data/examples/uri.rb +34 -78
  10. data/html/CHANGELOG.html +48 -31
  11. data/html/COPYING_md.html +31 -35
  12. data/html/Gemfile.html +28 -32
  13. data/html/Object.html +71 -71
  14. data/html/README_md.html +326 -159
  15. data/html/Rakefile.html +29 -33
  16. data/html/WWWJDic.html +137 -98
  17. data/html/WWWJDic/ParsableDuckType.html +55 -55
  18. data/html/WWWJDic/Parser.html +88 -88
  19. data/html/WWWJDic/Parsers.html +33 -33
  20. data/html/WWWJDic/Parsers/Dict.html +71 -73
  21. data/html/WWWJDic/Parsers/Display.html +66 -66
  22. data/html/WWWJDic/Parsers/Key.html +67 -67
  23. data/html/WWWJDic/Parsers/Search.html +59 -58
  24. data/html/WWWJDic/Parsers/Server.html +66 -66
  25. data/html/WWWJDic/Splitter.html +173 -172
  26. data/html/WWWJDic/Utils.html +34 -34
  27. data/html/WWWJDic/Utils/Downloader.html +33 -33
  28. data/html/WWWJDic/Utils/Downloader/Downloader.html +91 -89
  29. data/html/WWWJDic/Utils/Raisers.html +95 -95
  30. data/html/WWWJDic/WWWJDic.html +343 -345
  31. data/html/copyright_md.html +37 -51
  32. data/html/created.rid +55 -57
  33. data/html/index.html +334 -164
  34. data/html/js/darkfish.js +84 -84
  35. data/html/js/navigation.js.gz +0 -0
  36. data/html/js/search.js +110 -110
  37. data/html/js/search_index.js +1 -1
  38. data/html/js/search_index.js.gz +0 -0
  39. data/html/js/searcher.js +229 -229
  40. data/html/js/searcher.js.gz +0 -0
  41. data/html/table_of_contents.html +44 -75
  42. data/lib/wwwjdic.rb +7 -11
  43. data/lib/wwwjdic/application.rb +13 -7
  44. data/lib/wwwjdic/constants.rb +16 -8
  45. data/lib/wwwjdic/locales/de.yml +5 -4
  46. data/lib/wwwjdic/locales/en.yml +5 -4
  47. data/lib/wwwjdic/locales/es.yml +5 -4
  48. data/lib/wwwjdic/locales/fr.yml +6 -4
  49. data/lib/wwwjdic/locales/hu.yml +6 -4
  50. data/lib/wwwjdic/locales/it.yml +6 -4
  51. data/lib/wwwjdic/locales/ja.yml +8 -4
  52. data/lib/wwwjdic/locales/nl.yml +5 -4
  53. data/lib/wwwjdic/locales/ru.yml +5 -4
  54. data/lib/wwwjdic/locales/sl.yml +5 -4
  55. data/lib/wwwjdic/locales/sv.yml +5 -4
  56. data/lib/wwwjdic/parser.rb +8 -4
  57. data/lib/wwwjdic/parsers/dict.rb +9 -7
  58. data/lib/wwwjdic/parsers/display.rb +6 -2
  59. data/lib/wwwjdic/parsers/key.rb +8 -3
  60. data/lib/wwwjdic/parsers/search.rb +8 -3
  61. data/lib/wwwjdic/parsers/server.rb +6 -2
  62. data/lib/wwwjdic/utils/downloader.rb +21 -23
  63. data/lib/wwwjdic/utils/raisers.rb +7 -3
  64. data/lib/wwwjdic/utils/splitter.rb +20 -14
  65. data/lib/wwwjdic/version.rb +2 -6
  66. data/test/test_helper.rb +5 -1
  67. data/test/test_wwwjdic.rb +6 -2
  68. data/test/wwwjdic/locales/de.yml +7 -1
  69. data/test/wwwjdic/locales/en.yml +7 -1
  70. data/test/wwwjdic/locales/es.yml +7 -1
  71. data/test/wwwjdic/locales/fr.yml +7 -1
  72. data/test/wwwjdic/locales/hu.yml +7 -1
  73. data/test/wwwjdic/locales/it.yml +10 -3
  74. data/test/wwwjdic/locales/ja.yml +9 -2
  75. data/test/wwwjdic/locales/nl.yml +7 -1
  76. data/test/wwwjdic/locales/ru.yml +7 -1
  77. data/test/wwwjdic/locales/sl.yml +7 -1
  78. data/test/wwwjdic/locales/sv.yml +7 -1
  79. data/test/wwwjdic/locales/test_locales.rb +12 -9
  80. data/test/wwwjdic/parsers/test_dict.rb +6 -2
  81. data/test/wwwjdic/parsers/test_display.rb +6 -2
  82. data/test/wwwjdic/parsers/test_key.rb +6 -2
  83. data/test/wwwjdic/parsers/test_server.rb +6 -2
  84. data/test/wwwjdic/test_application.rb +12 -8
  85. data/test/wwwjdic/test_parsable_duck_type.rb +6 -2
  86. data/test/wwwjdic/utils/test_downloader.rb +5 -1
  87. data/test/wwwjdic/utils/test_raisers.rb +10 -6
  88. data/wwwjdic.gemspec +30 -14
  89. metadata +50 -22
  90. data/acknowledgements.md +0 -55
  91. data/authors.md +0 -67
  92. data/html/acknowledgements_md.html +0 -150
  93. data/html/authors_md.html +0 -182
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  # wwwjdic
2
- # Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
2
+ # © 2014 Marco Bresciani
3
3
  #
4
4
  # This file is part of wwwjdic.
5
5
  #
@@ -15,6 +15,11 @@
15
15
  #
16
16
  # You should have received a copy of the GNU General Public License
17
17
  # along with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
18
+ #
19
+ # SPDX-FileCopyrightText: 2014 Marco Bresciani
20
+ #
21
+ # SPDX-<span></span>License-Identifier: GPL-3.0-or-later
22
+ #++
18
23
 
19
24
  require 'rake'
20
25
  require 'rake/clean'
@@ -38,7 +43,7 @@ end
38
43
  desc "Build the RDoc gem documentation (task 'rake rdoc')"
39
44
  Rake::RDocTask.new do |rdoc|
40
45
  rdoc.rdoc_files.add wwwjdic.files
41
- rdoc.title = wwwjdic.name + ' ' + wwwjdic.version.to_s
46
+ rdoc.title = "#{wwwjdic.name} #{wwwjdic.version}"
42
47
  rdoc.main = 'README.md'
43
48
  rdoc.options += %w[-e UTF-8 --hyperlink-all --line-numbers]
44
49
  end
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  wwwjdic
3
3
 
4
- Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
4
+ © 2014 Marco Bresciani
5
5
 
6
6
  This file is part of wwwjdic.
7
7
 
@@ -17,14 +17,18 @@ more details.
17
17
 
18
18
  You should have received a copy of the GNU General Public License along
19
19
  with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
20
+
21
+ SPDX-FileCopyrightText: 2014 Marco Bresciani
22
+
23
+ SPDX-License-Identifier: FSFAP
20
24
  -->
21
25
 
22
26
  # Copyright Notes
23
- 2020-03-12 update.
27
+ 2020-11-10 update.
24
28
 
25
29
  wwwjdic
26
30
 
27
- Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
31
+ © 2014 Marco Bresciani
28
32
 
29
33
  This file is part of wwwjdic.
30
34
 
@@ -41,17 +45,17 @@ more details.
41
45
  You should have received a copy of the GNU General Public License along
42
46
  with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
43
47
 
44
- All project files, except for those listed in whole RDoc section below
45
- are released according to the above notice. The contributed code by
46
- Peter R. Marreck and Jon Maken are released according to their own
47
- licenses, specified inside the source code and checked being compatible
48
- with GNU GPLv3 license and the free software philosophy.
49
-
48
+ All project files, except for those listed in whole [RDoc](#rdoc)
49
+ section below, are released according to the above notice.
50
+ The contributed code by Peter R. Marreck and Jon Maken are released
51
+ according to their own licenses, specified inside the source code and
52
+ checked being compatible with GNU GPLv3 license and the free software
53
+ philosophy.
50
54
 
51
55
  ## RDoc
52
- Documents in the html directory are automatically generated by Ruby RDoc
53
- tool, with Markdown syntax. Automatically included files have the
54
- following licenses:
56
+ Ruby RDoc tool automatically generated documents in the `html` directory
57
+ using Markdown syntax.
58
+ Automatically included files have the following licenses:
55
59
 
56
60
  ### Darkfish (darkfish.js & rdoc.css)
57
61
  See http://www.ruby-doc.org/stdlib-2.0/libdoc/rdoc/rdoc/RDoc/Generator/Darkfish.html
@@ -315,22 +319,6 @@ set contents within a readme file or equivalent documentation for the
315
319
  software which includes the set or a subset of the icons contained
316
320
  within.
317
321
 
318
- ### jquery.js
319
- jQuery JavaScript Library v1.6.2
320
- http://jquery.com/
321
-
322
- Copyright 2011, John Resig
323
- Dual licensed under the MIT or GPL Version 2 licenses.
324
- http://jquery.org/license
325
-
326
- #### Sizzle.js
327
- Includes Sizzle.js
328
- http://sizzlejs.com/
329
-
330
- Copyright 2011, The Dojo Foundation
331
- Released under the MIT, BSD, and GPL Licenses.
332
- Date: Thu Jun 30 14:16:56 2011 -0400
333
-
334
322
  ### JsonIndex generator (navigation.js & search.js & search_index.js & searcher.js)
335
323
  See http://www.ruby-doc.org/stdlib-2.0/libdoc/rdoc/rdoc/RDoc/Generator/JsonIndex.html
336
324
 
@@ -359,7 +347,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
359
347
 
360
348
  wwwjdic
361
349
 
362
- Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
350
+ © 2014 Marco Bresciani
363
351
 
364
352
  This file is part of wwwjdic.
365
353
 
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # wwwjdic
3
- # Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
3
+ # © 2014 Marco Bresciani
4
4
  #
5
5
  # This file is part of wwwjdic.
6
6
  #
@@ -16,102 +16,108 @@
16
16
  #
17
17
  # You should have received a copy of the GNU General Public License
18
18
  # along with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
19
+ #
20
+ # SPDX-FileCopyrightText: 2014 Marco Bresciani
21
+ #
22
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
23
  #++
20
24
 
21
25
  require_relative '../lib/wwwjdic'
22
26
 
23
27
  i = 0
24
28
 
25
- # Creates the WWWJDic object
26
- puts '------------------------------------------'
27
- puts "Basics: '#{i}'. Creates the WWWJDic object."
29
+ # Create the WWWJDic object
30
+ puts '=========================================='
31
+ puts "BASICS #{i}: Create the WWWJDic object."
28
32
  puts 'irb(main):001:0> a_wwwjdic = WWWJDic::breener'
29
- a_wwwjdic = WWWJDic::breener
33
+ a_wwwjdic = WWWJDic.breener
34
+ puts '------------------------------------------'
30
35
  puts
31
36
  i += 1
32
37
 
33
- # Prints the (default) dictionary
34
- puts '------------------------------------------'
35
- puts "Basics: '#{i}'. Prints the (default) dictionary (0)."
38
+ # Print the (default) dictionary
39
+ # Jpn-Eng General (EDICT)
40
+ puts '=========================================='
41
+ puts "BASICS #{i}: Print the (default) dictionary [Jpn-Eng General (EDICT)]."
36
42
  puts 'irb(main):001:0> puts a_wwwjdic.dictionary'
37
43
  puts a_wwwjdic.dictionary
44
+ puts '------------------------------------------'
38
45
  puts
39
46
  i += 1
40
47
 
41
- # Prints the (default) server
42
- # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?)
43
- puts '------------------------------------------'
44
- puts "Basics: '#{i}'. Prints the (default) server (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?)."
48
+ # Print the (default) server URI.
49
+ # http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?
50
+ puts '=========================================='
51
+ puts "BASICS #{i}'. Print the (default) server URI [http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?]."
45
52
  puts 'irb(main):001:0> puts a_wwwjdic.server'
46
53
  puts a_wwwjdic.server
54
+ puts '------------------------------------------'
47
55
  puts
48
56
  i += 1
49
57
 
50
- # Prints the current (default) WWWJDic configuration URL.
51
- # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)
52
- puts '------------------------------------------'
53
- puts "Basics: '#{i}'. Prints the current (default) WWWJDic configuration URL (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)."
58
+ # Print the current (default) WWWJDic configuration URL.
59
+ # http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M
60
+ puts '=========================================='
61
+ puts "BASICS #{i}: Print the current (default) WWWJDic configuration URL [http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M]."
54
62
  puts 'irb(main):001:0> puts a_wwwjdic'
55
63
  puts a_wwwjdic
64
+ puts '------------------------------------------'
56
65
  puts
57
66
  i += 1
58
67
 
59
- # Changes the server value to Monash one.
60
- puts '------------------------------------------'
61
- puts "Basics: '#{i}'. Change the server value to Monash one."
68
+ # Change the server value to Monash University one.
69
+ puts '=========================================='
70
+ puts "BASICS #{i}: Change the server value to Monash University one."
62
71
  puts 'irb(main):001:0> a_wwwjdic.server = :monash'
63
72
  a_wwwjdic.server = :monash
73
+ puts '------------------------------------------'
64
74
  puts
65
75
  i += 1
66
76
 
67
- # Prints the (currently set) server
68
- # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?)
69
- puts '------------------------------------------'
70
- puts "Basics: '#{i}'. Prints the (currently set) server (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?)."
77
+ # Print the (currently set) server.
78
+ # http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?
79
+ puts '=========================================='
80
+ puts "BASICS #{i}: Print the (currently set) server [http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?]."
71
81
  puts 'irb(main):001:0> puts a_wwwjdic.server'
72
82
  puts a_wwwjdic.server
83
+ puts '------------------------------------------'
73
84
  puts
74
85
  i += 1
75
86
 
76
- # Prints the WWWJDic configuration URL with currently set configuration.
77
- # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
78
- puts '------------------------------------------'
79
- puts "Basics: '#{i}'. Prints the WWWJDic configuration URL with currently set configuration (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)."
87
+ # Print the WWWJDic configuration URL with currently set configuration.
88
+ # http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M
89
+ puts '=========================================='
90
+ puts "BASICS #{i}: Print the WWWJDic configuration URL with currently set configuration [http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M]."
80
91
  puts 'irb(main):001:0> puts a_wwwjdic'
81
92
  puts a_wwwjdic
93
+ puts '------------------------------------------'
82
94
  puts
83
95
  i += 1
84
96
 
85
- # Resets the configuration to default values.
97
+ # Reset the configuration to default values.
86
98
  # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
87
- puts '------------------------------------------'
88
- puts "Basics: '#{i}'. Resets the configuration to default values."
99
+ puts '=========================================='
100
+ puts "BASICS #{i}: Reset the configuration to default values."
89
101
  puts 'irb(main):001:0> a_wwwjdic.reset'
90
102
  a_wwwjdic.reset
91
- puts
92
- i += 1
93
-
94
- # Resets the configuration to default values.
95
- # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
96
103
  puts '------------------------------------------'
97
- puts "Basics: '#{i}'. Translate the word 'word'."
98
- puts "irb(main):001:0> a_wwwjdic.translate 'word'"
99
- puts a_wwwjdic.translate 'word'
100
104
  puts
101
105
  i += 1
102
106
 
103
- # Changes the dictionary value to Japanese-Italian one
104
- puts '------------------------------------------'
105
- puts "Basics: '#{i}'. Changes the language value to Japanese-Italian one."
107
+ # Change the language value to Japanese-Italian one.
108
+ puts '=========================================='
109
+ puts "BASICS #{i}: Change the language value to Japanese-Italian one."
106
110
  puts "irb(main):001:0> a_wwwjdic.dictionary = 'Japanese-Italian'"
107
111
  a_wwwjdic.dictionary = 'Japanese-Italian'
112
+ puts '------------------------------------------'
108
113
  puts
109
114
  i += 1
110
115
 
111
- # Prints the current WWWJDic configuration URL.
112
- # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OM)
113
- puts '------------------------------------------'
114
- puts "Basics: '#{i}'. Prints the current WWWJDic configuration URL (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OM)."
116
+ # Print the current WWWJDic configuration URL.
117
+ # http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OM
118
+ puts '=========================================='
119
+ puts "BASICS #{i}: Print the current WWWJDic configuration URL [http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OM]."
115
120
  puts 'irb(main):001:0> puts a_wwwjdic'
116
121
  puts a_wwwjdic
122
+ puts '------------------------------------------'
117
123
  puts
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # wwwjdic
3
- # Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
3
+ # © 2014 Marco Bresciani
4
4
  #
5
5
  # This file is part of wwwjdic.
6
6
  #
@@ -16,113 +16,162 @@
16
16
  #
17
17
  # You should have received a copy of the GNU General Public License
18
18
  # along with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
19
+ #
20
+ # SPDX-FileCopyrightText: 2014 Marco Bresciani
21
+ #
22
+ # SPDX-License-Identifier: GPL-3.0-or-later
19
23
  #++
20
24
 
21
25
  require_relative '../lib/wwwjdic'
22
26
 
23
27
  i = 0
24
28
 
25
- # Creates the WWWJDic object
29
+ # Create the WWWJDic object
30
+ puts '=========================================='
31
+ puts "TRANSLATE #{i}: Create the WWWJDic object."
32
+ puts 'a_wwwjdic = WWWJDic::breener'
33
+ a_wwwjdic = WWWJDic.breener
26
34
  puts '------------------------------------------'
27
- puts "Basics: '#{i}'. Creates the WWWJDic object."
28
- puts 'irb(main):001:0> a_wwwjdic = WWWJDic::breener'
29
- a_wwwjdic = WWWJDic::breener
30
35
  puts
31
36
  i += 1
32
37
 
33
- # Translate '翻訳' in English, with default options
34
- puts '------------------------------------------'
35
- puts "Basics: '#{i}'. Translate '翻訳' in English, with default options."
36
- puts "irb(main):001:0> a_wwwjdic.translate '翻訳'"
38
+ # Translate '翻訳' in English, with default options.
39
+ # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
40
+ # <HTML>
41
+ # <HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>WWWJDIC: Word Display</TITLE>
42
+ # </HEAD><BODY>
43
+ # <br>&nbsp;<br>
44
+ # <pre>
45
+ # 翻訳(P);飜訳 [ほんやく] /(n,vs) (1) translation/(n,vs) (2) deciphering/decoding/(n) (3) {biol} translation/(P)/
46
+ # 翻訳アセンブラ指示文 [ほんやくアセンブラしじぶん] /(n) {comp} assembler directive/
47
+ # 翻訳コンパイラ指示文 [ほんやくコンパイラしじぶん] /(n) {comp} compiler directive/
48
+ # 翻訳ソフトウェア [ほんやくソフトウェア] /(n) {comp} (automatic) translation software/
49
+ # 翻訳テーブル [ほんやくテーブル] /(n) {comp} translation table/
50
+ # 翻訳プログラム [ほんやくプログラム] /(n) {comp} translator/translation program/
51
+ # 翻訳プログラム指示文 [ほんやくプログラムしじぶん] /(n) {comp} translator directive/
52
+ # 翻訳メモリ [ほんやくメモリ] /(n) translation memory/
53
+ # 翻訳ルーチン [ほんやくルーチン] /(n) {comp} compiler/
54
+ # 翻訳家 [ほんやくか] /(n) translator/
55
+ # 翻訳会社 [ほんやくかいしゃ] /(n) translation agency/
56
+ # 翻訳解釈実行プログラム指示文 [ほんやくかいしゃくじっこうプログラムしじぶん] /(n) {comp} interpreter directive/
57
+ # 翻訳学 [ほんやくがく] /(n) translation studies/
58
+ # 翻訳権 [ほんやくけん] /(n) translation rights (to a book)/
59
+ # 翻訳研究 [ほんやくけんきゅう] /(n) translation studies/
60
+ # 翻訳元言語 [ほんやくもとげんご] /(n) language being translated from/source language/
61
+ # 翻訳後修飾 [ほんやくごしゅうしょく] /(n) {biol} post-translational modification/PTM/
62
+ # 翻訳語 [ほんやくご] /(n) (1) term used in translation/translation equivalent/(n) (2) word borrowed and translated from another language/
63
+ # 翻訳指示文 [ほんやくしじぶん] /(n) {comp} compiler directing statement/
64
+ # 翻訳時 [ほんやくじ] /(n) {comp} translation time/compile time/
65
+ # 翻訳時間 [ほんやくじかん] /(n) {comp} translation time/
66
+ # 翻訳者 [ほんやくしゃ] /(n) translator/
67
+ # 翻訳借用 [ほんやくしゃくよう] /(n) loan translation/calque/
68
+ # 翻訳書 [ほんやくしょ] /(n) translation/
69
+ # 翻訳先言語 [ほんやくさきげんご] /(n) language being translated to/target language/
70
+ # 翻訳単位のプログラム [ほんやくたんいのプログラム] /(n) {comp} separately compiled program/
71
+ # 翻訳調 [ほんやくちょう] /(n) translationese/translatese/translatorese/
72
+ # 翻訳文 [ほんやくぶん] /(n) translation/piece of translated writing/translated sentence/
73
+ # 翻訳用計算機 [ほんやくようけいさんき] /(n) {comp} source-computer/
74
+ # 翻訳用計算機記述項 [ほんやくようけいさんききじゅつこう] /(n) {comp} source computer entry/
75
+ # </pre>
76
+ # </BODY>
77
+ # </HTML>
78
+ puts '=========================================='
79
+ puts "TRANSLATE #{i}: Translate '翻訳' in English, with default options [...]."
80
+ puts "a_wwwjdic.translate '翻訳'"
37
81
  puts a_wwwjdic.translate '翻訳'
38
- puts
39
- i += 1
40
-
41
- # Computes the default raw URI to translate '翻訳' in English
42
- # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1ZUQ%E7%BF%BB%E8%A8%B3)
43
- puts '------------------------------------------'
44
- puts "Basics: '#{i}'. Computes the default raw URI to translate '翻訳' in English (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1ZUQ%E7%BF%BB%E8%A8%B3)."
45
- puts "irb(main):001:0> a_wwwjdic.raw_uri '翻訳'"
46
- puts a_wwwjdic.raw_uri '翻訳'
47
- puts
48
- i += 1
49
-
50
- # Computes the default JSON URI to translate '翻訳' in English
51
- # ({"翻訳":"http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1MUQ%E7%BF%BB%E8%A8%B3"})
52
- puts '------------------------------------------'
53
- puts "Basics: '#{i}'. Computes the default JSON URI to translate '翻訳' in English ({\"翻訳\":\"http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1MUQ%E7%BF%BB%E8%A8%B3\"})."
54
- puts "irb(main):001:0> a_wwwjdic.json_uri '翻訳'"
55
- puts a_wwwjdic.json_uri '翻訳'
56
- puts
57
- i += 1
58
-
59
- # Computes the default basic URI to translate '翻訳' in Italian
60
- # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OMUQ%E7%BF%BB%E8%A8%B3)
61
- puts '------------------------------------------'
62
- puts "Basics: '#{i}'. Computes the default basic URI to translate '翻訳' in Italian (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OMUQ%E7%BF%BB%E8%A8%B3)."
63
- puts "irb(main):001:0> a_wwwjdic.uri '翻訳', dict: 'Japanese-Italian'"
64
- puts a_wwwjdic.uri '翻訳', dict: 'Japanese-Italian'
65
- puts
66
- i += 1
67
-
68
- # Computes the default JSON URI to translate '翻訳' in German
69
- # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?GMUQ%E7%BF%BB%E8%A8%B3)
70
- puts '------------------------------------------'
71
- puts "Basics: '#{i}'. Computes the default basic URI to translate '翻訳' in German, through Monash university URI (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?GMUQ%E7%BF%BB%E8%A8%B3)."
72
- puts "irb(main):001:0> a_wwwjdic.uri '翻訳', dict: 'Japanese-German (WaDoku)', server: :monash"
73
- puts a_wwwjdic.uri '翻訳', dict: 'Japanese-German (WaDoku)', server: :monash
74
- puts
75
- i += 1
76
-
77
- # Prints the current (default) WWWJDic configuration URL.
78
- # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)
79
- puts '------------------------------------------'
80
- puts "Basics: '#{i}'. Prints the current (default) WWWJDic configuration URL (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)."
81
- puts 'irb(main):001:0> puts a_wwwjdic'
82
- puts a_wwwjdic
83
- puts
84
- i += 1
85
-
86
- # Change the server value to Monash one.
87
- # ()
88
- puts '------------------------------------------'
89
- puts "Basics: '#{i}'. Change the server value to Monash one."
90
- puts 'irb(main):001:0> a_wwwjdic.server = :monash'
91
- a_wwwjdic.server = :monash
92
- puts
93
- i += 1
94
-
95
- # Prints the (currently set) server
96
- # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?)
97
82
  puts '------------------------------------------'
98
- puts "Basics: '#{i}'. Prints the (currently set) server (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?)."
99
- puts 'irb(main):001:0> puts a_wwwjdic.server'
100
- puts a_wwwjdic.server
101
83
  puts
102
84
  i += 1
103
85
 
104
- # Prints the WWWJDic configuration URL with currently set configuration.
105
- # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
86
+ # Translate the word 'word'.
87
+ # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
88
+ # <HTML>
89
+ # <HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>WWWJDIC: Word Display</TITLE>
90
+ # </HEAD><BODY>
91
+ # <br>&nbsp;<br>
92
+ # <pre>
93
+ # 伝言 [でんごん] /(n,vs) verbal message/word (from someone)/(P)/
94
+ # 伝言 [つてこと] /(n) (1) (See 伝言・でんごん) verbal message/word (from someone)/(n) (2) rumour/rumor/
95
+ # 一議 [いちぎ] /(n) word (opinion, objection)/
96
+ # 言の葉 [ことのは;ことのえ] /(n) (1) (arch) word/(n) (2) (See 和歌) waka (classic Japanese poem, esp. a tanka)/
97
+ # ワード /(n) (1) word/(n) (2) {comp} word/(n) (3) {comp} Word/Microsoft Word/(P)/
98
+ # 語 [ご] /(n,n-suf) (1) language/(n,n-suf,ctr) (2) word/(P)/
99
+ # 単語 [たんご] /(n,adj-no) {ling} word/vocabulary/(usually) single-character word/(P)/
100
+ # 訪れ [おとずれ] /(n) (1) visit/call/(n) (2) arrival (e.g. of spring)/advent/coming/appearance/(n) (3) news/tidings/word/(P)/
101
+ # 音沙汰;音さた [おとさた] /(n) news (from someone)/word/contact/
102
+ # 言 [げん(P);こと] /(n) word/remark/statement/(P)/
103
+ # 知らせ(P);報せ [しらせ] /(n) (1) (See お知らせ) news/word/tidings/notice/notification/information/(n) (2) omen/(P)/
104
+ # 言葉(P);詞;辞 [ことば(P);けとば(言葉)(ok)] /(n) (1) (See 言語) language/dialect/(n) (2) (See 単語) word/words/phrase/term/expression/remark/(n) (3) speech/(manner of) speaking/(n) (4) learning to speak/language acquisition/(P)/
105
+ # </pre>
106
+ # </BODY>
107
+ # </HTML>
108
+ puts '=========================================='
109
+ puts "TRANSLATE #{i}: Translate the word 'word' [...]."
110
+ puts "a_wwwjdic.translate 'word'"
111
+ puts a_wwwjdic.translate 'word'
106
112
  puts '------------------------------------------'
107
- puts "Basics: '#{i}'. Prints the WWWJDic configuration URL with currently set configuration (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)."
108
- puts 'irb(main):001:0> puts a_wwwjdic'
109
- puts a_wwwjdic
110
113
  puts
111
114
  i += 1
112
115
 
113
- # Resets the configuration to default values.
114
- # (http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1M)
116
+ # Translate the word 'Sprache' with German dictionary.
117
+ # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
118
+ # <HTML>
119
+ # <HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>WWWJDIC: Word Display</TITLE>
120
+ # </HEAD><BODY>
121
+ # <br>&nbsp;<br>
122
+ # <pre>
123
+ # 語学 [ごがく] /(n) (1) Sprachwissenschaft/Linguistik/(2) Fremdsprachenstudium/(3) Fremdsprache/Sprache (als Fach)/
124
+ #
125
+ # 辞令 [じれい] /(n) (1) Ernennungsurkunde/Entlassungsurkunde/(2) Redensart/Redeweise/Ausdrucksweise/Sprache/
126
+ #
127
+ # 言語 [ごんご] /(n) Worte/Sprache/
128
+ #
129
+ # ランゲージ /(n) Sprache/
130
+ #
131
+ # 辞命 [じめい] /(n) Redensart/Redeweise/Ausdrucksweise/Sprache/
132
+ #
133
+ # 話 [わ] /(n,wordcomponent) (1) Erzählung/Geschichte/(2) Zählwort für Kapitel, Erzählungen, Episoden usw./Reden/Gespräch/Erzählung/Geschichte/Sprache/
134
+ #
135
+ # …語 […ご] /(suf) (1) Wort/(2) Vokabel/(3) …isch/…-Sprache/
136
+ #
137
+ # 言詞 [げんし] /(n) Sprache/
138
+ #
139
+ # 語 [ご] /(n) (1) Wort/(2) Sprache/
140
+ #
141
+ # 言辞 [げんじ] /(n) Worte/Rede/Sprache/
142
+ #
143
+ # 言葉;ことば;コトバ;辞;詞 [コトバ] /(n) (1) Sprache/(2) Muttersprache/(3) Wort/(4) Dialekt/Mundart/(5) Ausdruck/Sprechweise/Diktion/Wortlaut/Wortwahl/
144
+ #
145
+ # 言語 [げんご] /(n) (1) Sprache/(2) Sprechen/Worte/(3) Langue (im Gegensatz zu Parole bei F. de Saussure)/(4) Programmiersprache/
146
+ #
147
+ # 言 [こと] /(n) (1) Wort/(2) Sprache/(3) Ruf/(4) Waka/
148
+ #
149
+ # 言葉遣い;言葉遣;言葉づかい;ことばづかい;辞遣い;辞遣 [ことばづかい] /(n) Sprache/Ausdrucksweise/Diktion/
150
+ #
151
+ # 弁;瓣;辯 [べん] /(n) (1) Sprechen/Sprechweise/Sprache/Reden/(2) Dialekt/Mundart/Akzent/
152
+ #
153
+ # 口;くち;クチ [クチ] /(n) (1) Mund/Maul/Schnauze/(2) Sprache/Sprechen/(3) Mündlichkeit/(4) Gerücht/Gerede/(5) Sprechweise/(6) Essen und Trinken/(7) Genuss beim Essen/Geschmack/(8) Zahl der mit Nahrung zu versorgenden Münder/(9) Broterwerb/Beschäftigung/Stellung/(10) Öffnung/Loch/Schnabel/Mundstück/(11) Fassspund/Zapfen/Hahn/(12) Beginn/Anfang/(13) Sorte/(14) Gebiss/als Gebiss dienendes Seil/
154
+ #
155
+ # 用語 [ようご] /(n) (1) Fachausdruck/Fachwort/Terminus technicus/Terminologie/(2) Wortschatz/Sprache/Vokabular/
156
+ #
157
+ # 言の葉 [ことのは] /(n) Sprache/Wort/
158
+ #
159
+ # </pre>
160
+ # </BODY>
161
+ # </HTML>
162
+ puts '=========================================='
163
+ puts "TRANSLATE #{i}: Translate the word 'Sprache' with German dictionary [...]."
164
+ puts "a_wwwjdic.translate 'Sprache', dict: 'Japanese-German (WaDoku)'"
165
+ puts a_wwwjdic.translate 'Sprache', dict: 'Japanese-German (WaDoku)'
115
166
  puts '------------------------------------------'
116
- puts "Basics: '#{i}'. Resets the configuration to default values."
117
- puts 'irb(main):001:0> a_wwwjdic.reset'
118
- a_wwwjdic.reset
119
167
  puts
120
168
  i += 1
121
169
 
122
- # Prints the current (default) WWWJDic configuration URL.
123
- # (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)
170
+ # Translate the word 'parola' with Italian dictionary, in JSON format.
171
+ # {"parola":"http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?OZDQparola","title":"WWWJDIC: Word Display","translation":"単語 [たんご] /(n,adj-no) parola/vocabolo/parola di un singolo carattere/\n\n一言(P);ひと言 [ひとこと(P);いちげん(一言);いちごん(一言)] /(n,vs) singola parola/(singola) parola/una sola parola/\n\n言論 [げんろん] /(n) espressione/(libertà di) parola/discussione/\n\n発言 [はつげん] /(n,vs) parola/intrvento (in un discorso)/\n\n言葉(P);詞;辞 [ことば(P);けとば(言葉)(ok)] /(n) parola/termine/vocabolo/lessico/lingua/linguaggio/dialetto/discorso/conversazione/modo di parlare/\n\nワード /(n) parola/{inf.} Microsoft Word (abbr.)/(en: word)/","message":null,"lines":["単語 [たんご] /(n,adj-no) parola/vocabolo/parola di un singolo carattere/","一言(P);ひと言 [ひとこと(P);いちげん(一言);いちごん(一言)] /(n,vs) singola parola/(singola) parola/una sola parola/","言論 [げんろん] /(n) espressione/(libertà di) parola/discussione/","発言 [はつげん] /(n,vs) parola/intrvento (in un discorso)/","言葉(P);詞;辞 [ことば(P);けとば(言葉)(ok)] /(n) parola/termine/vocabolo/lessico/lingua/linguaggio/dialetto/discorso/conversazione/modo di parlare/","ワード /(n) parola/{inf.} Microsoft Word (abbr.)/(en: word)/"],"content":[{"word":"単語","kana":"たんご","text":"(n,adj-no) parola/vocabolo/parola di un singolo carattere","meanings":["(n,adj-no) parola","vocabolo","parola di un singolo carattere"]},{"word":"一言(P);ひと言","kana":"ひとこと(P);いちげん(一言);いちごん(一言)","text":"(n,vs) singola parola/(singola) parola/una sola parola","meanings":["(n,vs) singola parola","(singola) parola","una sola parola"]},{"word":"言論","kana":"げんろん","text":"(n) espressione/(libertà di) parola/discussione","meanings":["(n) espressione","(libertà di) parola","discussione"]},{"word":"発言","kana":"はつげん","text":"(n,vs) parola/intrvento (in un discorso)","meanings":["(n,vs) parola","intrvento (in un discorso)"]},{"word":"言葉(P);詞;辞","kana":"ことば(P);けとば(言葉)(ok)","text":"(n) parola/termine/vocabolo/lessico/lingua/linguaggio/dialetto/discorso/conversazione/modo di parlare","meanings":["(n) parola","termine","vocabolo","lessico","lingua","linguaggio","dialetto","discorso","conversazione","modo di parlare"]},{"kana":"ワード","word":"ワード","text":"(n) parola/{inf.} Microsoft Word (abbr.)/(en: word)","meanings":["(n) parola","{inf.} Microsoft Word (abbr.)","(en: word)"]}]}
172
+ puts '=========================================='
173
+ puts "TRANSLATE #{i}: Translate the word 'parola' with Italian dictionary in JSON format (...)."
174
+ puts "a_wwwjdic.translate 'parola', dict: 'Japanese-Italian'"
175
+ puts a_wwwjdic.json_translate 'parola', dict: 'Japanese-Italian'
124
176
  puts '------------------------------------------'
125
- puts "Basics: '#{i}'. Prints the current (default) WWWJDic configuration URL (http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?1M)."
126
- puts 'irb(main):001:0> puts a_wwwjdic'
127
- puts a_wwwjdic
128
177
  puts