examples/translate.rb in wwwjdic-15.0.0 vs examples/translate.rb in wwwjdic-16.0.0

- old
+ new

@@ -1,8 +1,12 @@ +# frozen_string_literal: true + #-- # wwwjdic +# rubocop:disable Style/AsciiComments # © 2014 Marco Bresciani +# rubocop:enable Style/AsciiComments # # This file is part of wwwjdic. # # wwwjdic is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -33,17 +37,20 @@ a_wwwjdic = WWWJDic.breener puts '------------------------------------------' puts i += 1 +# rubocop:disable Style/AsciiComments # Translate '翻訳' in English, with default options. +# rubocop:enable Style/AsciiComments # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> # <HTML> # <HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>WWWJDIC: Word Display</TITLE> # </HEAD><BODY> # <br>&nbsp;<br> # <pre> +# rubocop:disable Style/AsciiComments # 翻訳(P);飜訳 [ほんやく] /(n,vs) (1) translation/(n,vs) (2) deciphering/decoding/(n) (3) {biol} translation/(P)/ # 翻訳アセンブラ指示文 [ほんやくアセンブラしじぶん] /(n) {comp} assembler directive/ # 翻訳コンパイラ指示文 [ほんやくコンパイラしじぶん] /(n) {comp} compiler directive/ # 翻訳ソフトウェア [ほんやくソフトウェア] /(n) {comp} (automatic) translation software/ # 翻訳テーブル [ほんやくテーブル] /(n) {comp} translation table/ @@ -57,11 +64,13 @@ # 翻訳学 [ほんやくがく] /(n) translation studies/ # 翻訳権 [ほんやくけん] /(n) translation rights (to a book)/ # 翻訳研究 [ほんやくけんきゅう] /(n) translation studies/ # 翻訳元言語 [ほんやくもとげんご] /(n) language being translated from/source language/ # 翻訳後修飾 [ほんやくごしゅうしょく] /(n) {biol} post-translational modification/PTM/ +# rubocop:disable Layout/LineLength # 翻訳語 [ほんやくご] /(n) (1) term used in translation/translation equivalent/(n) (2) word borrowed and translated from another language/ +# rubocop:enable Layout/LineLength # 翻訳指示文 [ほんやくしじぶん] /(n) {comp} compiler directing statement/ # 翻訳時 [ほんやくじ] /(n) {comp} translation time/compile time/ # 翻訳時間 [ほんやくじかん] /(n) {comp} translation time/ # 翻訳者 [ほんやくしゃ] /(n) translator/ # 翻訳借用 [ほんやくしゃくよう] /(n) loan translation/calque/ @@ -70,10 +79,11 @@ # 翻訳単位のプログラム [ほんやくたんいのプログラム] /(n) {comp} separately compiled program/ # 翻訳調 [ほんやくちょう] /(n) translationese/translatese/translatorese/ # 翻訳文 [ほんやくぶん] /(n) translation/piece of translated writing/translated sentence/ # 翻訳用計算機 [ほんやくようけいさんき] /(n) {comp} source-computer/ # 翻訳用計算機記述項 [ほんやくようけいさんききじゅつこう] /(n) {comp} source computer entry/ +# rubocop:enable Style/AsciiComments # </pre> # </BODY> # </HTML> puts '==========================================' puts "TRANSLATE #{i}: Translate '翻訳' in English, with default options [...]." @@ -88,10 +98,11 @@ # <HTML> # <HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>WWWJDIC: Word Display</TITLE> # </HEAD><BODY> # <br>&nbsp;<br> # <pre> +# rubocop:disable Style/AsciiComments # 伝言 [でんごん] /(n,vs) verbal message/word (from someone)/(P)/ # 伝言 [つてこと] /(n) (1) (See 伝言・でんごん) verbal message/word (from someone)/(n) (2) rumour/rumor/ # 一議 [いちぎ] /(n) word (opinion, objection)/ # 言の葉 [ことのは;ことのえ] /(n) (1) (arch) word/(n) (2) (See 和歌) waka (classic Japanese poem, esp. a tanka)/ # ワード /(n) (1) word/(n) (2) {comp} word/(n) (3) {comp} Word/Microsoft Word/(P)/ @@ -99,11 +110,14 @@ # 単語 [たんご] /(n,adj-no) {ling} word/vocabulary/(usually) single-character word/(P)/ # 訪れ [おとずれ] /(n) (1) visit/call/(n) (2) arrival (e.g. of spring)/advent/coming/appearance/(n) (3) news/tidings/word/(P)/ # 音沙汰;音さた [おとさた] /(n) news (from someone)/word/contact/ # 言 [げん(P);こと] /(n) word/remark/statement/(P)/ # 知らせ(P);報せ [しらせ] /(n) (1) (See お知らせ) news/word/tidings/notice/notification/information/(n) (2) omen/(P)/ +# rubocop:disable Layout/LineLength # 言葉(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)/ +# rubocop:enable Layout/LineLength +# rubocop:enable Style/AsciiComments # </pre> # </BODY> # </HTML> puts '==========================================' puts "TRANSLATE #{i}: Translate the word 'word' [...]." @@ -118,45 +132,53 @@ # <HTML> # <HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>WWWJDIC: Word Display</TITLE> # </HEAD><BODY> # <br>&nbsp;<br> # <pre> +# rubocop:disable Style/AsciiComments # 語学 [ごがく] /(n) (1) Sprachwissenschaft/Linguistik/(2) Fremdsprachenstudium/(3) Fremdsprache/Sprache (als Fach)/ # # 辞令 [じれい] /(n) (1) Ernennungsurkunde/Entlassungsurkunde/(2) Redensart/Redeweise/Ausdrucksweise/Sprache/ # # 言語 [ごんご] /(n) Worte/Sprache/ # # ランゲージ /(n) Sprache/ # # 辞命 [じめい] /(n) Redensart/Redeweise/Ausdrucksweise/Sprache/ # +# rubocop:disable Layout/LineLength # 話 [わ] /(n,wordcomponent) (1) Erzählung/Geschichte/(2) Zählwort für Kapitel, Erzählungen, Episoden usw./Reden/Gespräch/Erzählung/Geschichte/Sprache/ +# rubocop:enable Layout/LineLength # # …語 […ご] /(suf) (1) Wort/(2) Vokabel/(3) …isch/…-Sprache/ # # 言詞 [げんし] /(n) Sprache/ # # 語 [ご] /(n) (1) Wort/(2) Sprache/ # # 言辞 [げんじ] /(n) Worte/Rede/Sprache/ # +# rubocop:disable Layout/LineLength # 言葉;ことば;コトバ;辞;詞 [コトバ] /(n) (1) Sprache/(2) Muttersprache/(3) Wort/(4) Dialekt/Mundart/(5) Ausdruck/Sprechweise/Diktion/Wortlaut/Wortwahl/ # # 言語 [げんご] /(n) (1) Sprache/(2) Sprechen/Worte/(3) Langue (im Gegensatz zu Parole bei F. de Saussure)/(4) Programmiersprache/ +# rubocop:enable Layout/LineLength # # 言 [こと] /(n) (1) Wort/(2) Sprache/(3) Ruf/(4) Waka/ # # 言葉遣い;言葉遣;言葉づかい;ことばづかい;辞遣い;辞遣 [ことばづかい] /(n) Sprache/Ausdrucksweise/Diktion/ # # 弁;瓣;辯 [べん] /(n) (1) Sprechen/Sprechweise/Sprache/Reden/(2) Dialekt/Mundart/Akzent/ # +# rubocop:disable Layout/LineLength # 口;くち;クチ [クチ] /(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/ +# rubocop:enable Layout/LineLength # # 用語 [ようご] /(n) (1) Fachausdruck/Fachwort/Terminus technicus/Terminologie/(2) Wortschatz/Sprache/Vokabular/ # # 言の葉 [ことのは] /(n) Sprache/Wort/ +# rubocop:enable Style/AsciiComments # # </pre> # </BODY> # </HTML> puts '==========================================' @@ -166,10 +188,14 @@ puts '------------------------------------------' puts i += 1 # Translate the word 'parola' with Italian dictionary, in JSON format. +# rubocop:disable Style/AsciiComments +# rubocop:disable Layout/LineLength # {"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)"]}]} +# rubocop:enable Layout/LineLength +# rubocop:enable Style/AsciiComments puts '==========================================' puts "TRANSLATE #{i}: Translate the word 'parola' with Italian dictionary in JSON format (...)." puts "a_wwwjdic.translate 'parola', dict: 'Japanese-Italian'" puts a_wwwjdic.json_translate 'parola', dict: 'Japanese-Italian' puts '------------------------------------------'