diff --git a/lib/eiwa/jmdict/doc.rb b/lib/eiwa/jmdict/doc.rb index 8d2d415..6d55411 100644 --- a/lib/eiwa/jmdict/doc.rb +++ b/lib/eiwa/jmdict/doc.rb @@ -53,6 +53,10 @@ def characters(s) @current.add_characters(s) end + def reference(name, content) + @current.set_entity(name, content) + end + # def comment string # puts "comment #{string}" # end @@ -62,6 +66,7 @@ def characters(s) # end def error(msg) + # TODO: This logic can be removed once we pin to Nokogiri >= 1.17.0 if (matches = msg.match(/Entity '(\S+)' not defined/)) # See: http://github.com/sparklemotion/nokogiri/issues/1926 code = matches[1] diff --git a/lib/eiwa/jmdict/entities.rb b/lib/eiwa/jmdict/entities.rb index cf218d6..553e952 100644 --- a/lib/eiwa/jmdict/entities.rb +++ b/lib/eiwa/jmdict/entities.rb @@ -13,7 +13,7 @@ module Jmdict "adj-ku" => "`ku' adjective (archaic)", "adj-na" => "adjectival nouns or quasi-adjectives (keiyodoshi)", "adj-nari" => "archaic/formal form of na-adjective", - "adj-no" => "nouns which may take the genitive case particle `no'", + "adj-no" => "nouns which may take the genitive case particle 'no'", "adj-pn" => "pre-noun adjectival (rentaishi)", "adj-shiku" => "`shiku' adjective (archaic)", "adj-t" => "`taru' adjective", @@ -34,7 +34,7 @@ module Jmdict "chem" => "chemistry term", "chn" => "children's language", "col" => "colloquialism", - "comp" => "computer terminology", + "comp" => "computing", "conj" => "conjunction", "cop" => "copula", "cop-da" => "copula", @@ -101,6 +101,7 @@ module Jmdict "quote" => "quotation", "rare" => "rare", "rkb" => "Ryuukyuu-ben", + "rK" => "rarely used kanji form", "sens" => "sensitive", "shogi" => "shogi term", "sl" => "slang",