eiwa 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e88ea7a5b39e145c4e5115b1e1f0505fcb1f9dd63f1f68c54de89903dabaef67
4
- data.tar.gz: 2da703a8cd7daa9c4ade8a5d9090f814bfc8adcdd62fd3dcb381b3aba2bc089c
3
+ metadata.gz: c5888e4802408cc8efdb55ddadfb560ec38d10971fee95b20dd53af2f31f487c
4
+ data.tar.gz: 93b7101b430ee123a905065f87e5d8ba336e1a18f145c7801daeb2b9b9a5ba72
5
5
  SHA512:
6
- metadata.gz: 561cfcb808e8cfa05f225c92edfa861eea3b3173141ba133ff00c988b0071c9f162ed0ccd321532b7de36bf5797f6b0b00c408cd919d8657e844612c2c5450cf
7
- data.tar.gz: a85484fe894a30e3c6f094332a1ae143cb0af95aec164d470aaf87c9614e86dd9e61fd6b8ed986767afd863afb07f830eaf9160deeca6e76b5edc03240c20232
6
+ metadata.gz: 64faccd9958b9c359fcd7a7ff40de013bd1060bbf9a59735be4d52c824dd3e6e77abbb81ab42ae037b9175990dd15baa33722503b47d8aaebbb037a8a303f965
7
+ data.tar.gz: 209efe931acfa8563ea1819f4e9b5a7d07a996d1545458b139de14f82971b27f47e0da726ed5151b3922aa05f6c5809bd3196269e0f6d254cb87e801c81ffe6e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eiwa (0.0.1)
4
+ eiwa (0.0.2)
5
5
  nokogiri
6
6
 
7
7
  GEM
@@ -13,7 +13,7 @@ GEM
13
13
  method_source (0.9.2)
14
14
  mini_portile2 (2.4.0)
15
15
  minitest (5.11.3)
16
- nokogiri (1.10.4)
16
+ nokogiri (1.10.9)
17
17
  mini_portile2 (~> 2.4.0)
18
18
  parallel (1.17.0)
19
19
  parser (2.6.4.1)
@@ -22,7 +22,7 @@ GEM
22
22
  coderay (~> 1.1.0)
23
23
  method_source (~> 0.9.0)
24
24
  rainbow (3.0.0)
25
- rake (10.5.0)
25
+ rake (13.0.1)
26
26
  rubocop (0.72.0)
27
27
  jaro_winkler (~> 1.5.1)
28
28
  parallel (~> 1.10)
@@ -46,7 +46,7 @@ DEPENDENCIES
46
46
  eiwa!
47
47
  minitest (~> 5.0)
48
48
  pry
49
- rake (~> 10.0)
49
+ rake (~> 13.0)
50
50
  standard
51
51
 
52
52
  BUNDLED WITH
data/README.md CHANGED
@@ -74,4 +74,6 @@ entries = Eiwa.parse_file("path/to/some.xml", type: :jmdict_e)
74
74
  Note that for the abridged Japanese-English dictionary, this will consume about
75
75
  500MB of RAM.
76
76
 
77
+ ### The entry object model
77
78
 
79
+ I haven't documented the [Entry](https://github.com/searls/eiwa/blob/master/lib/eiwa/tag/entry.rb) type or its child types yet, but they should be pretty easy to piece together by inspecting the output and [checking the source listings](https://github.com/searls/eiwa/blob/master/lib/eiwa/tag).
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_dependency "nokogiri"
23
23
  spec.add_development_dependency "bundler", "~> 1.17"
24
- spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rake", "~> 13.0"
25
25
  spec.add_development_dependency "minitest", "~> 5.0"
26
26
  spec.add_development_dependency "standard"
27
27
  spec.add_development_dependency "pry"
@@ -26,7 +26,7 @@ module Eiwa
26
26
  "xref" => Tag::CrossReference,
27
27
  "ant" => Tag::Antonym,
28
28
  "lsource" => Tag::SourceLanguage,
29
- "gloss" => Tag::Definition,
29
+ "gloss" => Tag::Definition
30
30
  }
31
31
 
32
32
  class JmdictDoc < Nokogiri::XML::SAX::Document
@@ -1,39 +1,57 @@
1
1
  module Eiwa
2
2
  JMDICT_ENTITIES = {
3
+ "Buddh" => "Buddhist term",
3
4
  "MA" => "martial arts term",
5
+ "Shinto" => "Shinto term",
4
6
  "X" => "rude or X-rated term (not displayed in educational software)",
5
7
  "abbr" => "abbreviation",
8
+ "adj-f" => "noun or verb acting prenominally",
6
9
  "adj-i" => "adjective (keiyoushi)",
7
10
  "adj-ix" => "adjective (keiyoushi) - yoi/ii class",
11
+ "adj-kari" => "`kari' adjective (archaic)",
12
+ "adj-ku" => "`ku' adjective (archaic)",
8
13
  "adj-na" => "adjectival nouns or quasi-adjectives (keiyodoshi)",
14
+ "adj-nari" => "archaic/formal form of na-adjective",
9
15
  "adj-no" => "nouns which may take the genitive case particle `no'",
10
16
  "adj-pn" => "pre-noun adjectival (rentaishi)",
17
+ "adj-shiku" => "`shiku' adjective (archaic)",
11
18
  "adj-t" => "`taru' adjective",
12
- "adj-f" => "noun or verb acting prenominally",
13
19
  "adv" => "adverb (fukushi)",
14
20
  "adv-to" => "adverb taking the `to' particle",
21
+ "anat" => "anatomical term",
15
22
  "arch" => "archaism",
23
+ "archit" => "architecture term",
24
+ "astron" => "astronomy, etc. term",
16
25
  "ateji" => "ateji (phonetic) reading",
17
26
  "aux" => "auxiliary",
18
- "aux-v" => "auxiliary verb",
19
27
  "aux-adj" => "auxiliary adjective",
20
- "Buddh" => "Buddhist term",
28
+ "aux-v" => "auxiliary verb",
29
+ "baseb" => "baseball term",
30
+ "biol" => "biology term",
31
+ "bot" => "botany term",
32
+ "bus" => "business term",
21
33
  "chem" => "chemistry term",
22
34
  "chn" => "children's language",
23
35
  "col" => "colloquialism",
24
36
  "comp" => "computer terminology",
25
37
  "conj" => "conjunction",
38
+ "cop" => "copula",
26
39
  "cop-da" => "copula",
27
40
  "ctr" => "counter",
28
41
  "derog" => "derogatory",
29
42
  "eK" => "exclusively kanji",
43
+ "econ" => "economics term",
30
44
  "ek" => "exclusively kana",
45
+ "engr" => "engineering term",
31
46
  "exp" => "expressions (phrases, clauses, etc.)",
32
47
  "fam" => "familiar language",
33
48
  "fem" => "female term or language",
49
+ "finc" => "finance term",
34
50
  "food" => "food term",
51
+ "geol" => "geology, etc. term",
35
52
  "geom" => "geometry term",
36
53
  "gikun" => "gikun (meaning as reading) or jukujikun (special kanji reading)",
54
+ "hob" => "Hokkaido-ben",
37
55
  "hon" => "honorific or respectful (sonkeigo) language",
38
56
  "hum" => "humble (kenjougo) language",
39
57
  "iK" => "word containing irregular kanji usage",
@@ -42,45 +60,93 @@ module Eiwa
42
60
  "int" => "interjection (kandoushi)",
43
61
  "io" => "irregular okurigana usage",
44
62
  "iv" => "irregular verb",
63
+ "joc" => "jocular, humorous term",
64
+ "ksb" => "Kansai-ben",
65
+ "ktb" => "Kantou-ben",
66
+ "kyb" => "Kyoto-ben",
67
+ "kyu" => "Kyuushuu-ben",
68
+ "law" => "law, etc. term",
45
69
  "ling" => "linguistics terminology",
46
70
  "m-sl" => "manga slang",
71
+ "mahj" => "mahjong term",
47
72
  "male" => "male term or language",
48
73
  "male-sl" => "male slang",
49
74
  "math" => "mathematics",
75
+ "med" => "medicine, etc. term",
50
76
  "mil" => "military",
77
+ "music" => "music term",
51
78
  "n" => "noun (common) (futsuumeishi)",
52
79
  "n-adv" => "adverbial noun (fukushitekimeishi)",
53
- "n-suf" => "noun, used as a suffix",
80
+ "n-pr" => "proper noun",
54
81
  "n-pref" => "noun, used as a prefix",
82
+ "n-suf" => "noun, used as a suffix",
55
83
  "n-t" => "noun (temporal) (jisoumeishi)",
84
+ "nab" => "Nagano-ben",
56
85
  "num" => "numeric",
57
86
  "oK" => "word containing out-dated kanji",
58
87
  "obs" => "obsolete term",
59
88
  "obsc" => "obscure term",
60
- "ok" => "out-dated or obsolete kana usage",
61
89
  "oik" => "old or irregular kana form",
90
+ "ok" => "out-dated or obsolete kana usage",
62
91
  "on-mim" => "onomatopoeic or mimetic word",
92
+ "osb" => "Osaka-ben",
93
+ "physics" => "physics terminology",
63
94
  "pn" => "pronoun",
64
95
  "poet" => "poetical term",
65
96
  "pol" => "polite (teineigo) language",
66
97
  "pref" => "prefix",
67
98
  "proverb" => "proverb",
68
99
  "prt" => "particle",
69
- "physics" => "physics terminology",
70
100
  "quote" => "quotation",
71
101
  "rare" => "rare",
102
+ "rkb" => "Ryuukyuu-ben",
72
103
  "sens" => "sensitive",
104
+ "shogi" => "shogi term",
73
105
  "sl" => "slang",
106
+ "sports" => "sports term",
74
107
  "suf" => "suffix",
108
+ "sumo" => "sumo term",
109
+ "thb" => "Touhoku-ben",
110
+ "tsb" => "Tosa-ben",
111
+ "tsug" => "Tsugaru-ben",
75
112
  "uK" => "word usually written using kanji alone",
76
113
  "uk" => "word usually written using kana alone",
77
114
  "unc" => "unclassified",
78
- "yoji" => "yojijukugo",
115
+ "v-unspec" => "verb unspecified",
79
116
  "v1" => "Ichidan verb",
80
117
  "v1-s" => "Ichidan verb - kureru special class",
81
118
  "v2a-s" => "Nidan verb with 'u' ending (archaic)",
119
+ "v2b-k" => "Nidan verb (upper class) with `bu' ending (archaic)",
120
+ "v2b-s" => "Nidan verb (lower class) with `bu' ending (archaic)",
121
+ "v2d-k" => "Nidan verb (upper class) with `dzu' ending (archaic)",
122
+ "v2d-s" => "Nidan verb (lower class) with `dzu' ending (archaic)",
123
+ "v2g-k" => "Nidan verb (upper class) with `gu' ending (archaic)",
124
+ "v2g-s" => "Nidan verb (lower class) with `gu' ending (archaic)",
125
+ "v2h-k" => "Nidan verb (upper class) with `hu/fu' ending (archaic)",
126
+ "v2h-s" => "Nidan verb (lower class) with `hu/fu' ending (archaic)",
127
+ "v2k-k" => "Nidan verb (upper class) with `ku' ending (archaic)",
128
+ "v2k-s" => "Nidan verb (lower class) with `ku' ending (archaic)",
129
+ "v2m-k" => "Nidan verb (upper class) with `mu' ending (archaic)",
130
+ "v2m-s" => "Nidan verb (lower class) with `mu' ending (archaic)",
131
+ "v2n-s" => "Nidan verb (lower class) with `nu' ending (archaic)",
132
+ "v2r-k" => "Nidan verb (upper class) with `ru' ending (archaic)",
133
+ "v2r-s" => "Nidan verb (lower class) with `ru' ending (archaic)",
134
+ "v2s-s" => "Nidan verb (lower class) with `su' ending (archaic)",
135
+ "v2t-k" => "Nidan verb (upper class) with `tsu' ending (archaic)",
136
+ "v2t-s" => "Nidan verb (lower class) with `tsu' ending (archaic)",
137
+ "v2w-s" => "Nidan verb (lower class) with `u' ending and `we' conjugation (archaic)",
138
+ "v2y-k" => "Nidan verb (upper class) with `yu' ending (archaic)",
139
+ "v2y-s" => "Nidan verb (lower class) with `yu' ending (archaic)",
140
+ "v2z-s" => "Nidan verb (lower class) with `zu' ending (archaic)",
141
+ "v4b" => "Yodan verb with `bu' ending (archaic)",
142
+ "v4g" => "Yodan verb with `gu' ending (archaic)",
82
143
  "v4h" => "Yodan verb with `hu/fu' ending (archaic)",
144
+ "v4k" => "Yodan verb with `ku' ending (archaic)",
145
+ "v4m" => "Yodan verb with `mu' ending (archaic)",
146
+ "v4n" => "Yodan verb with `nu' ending (archaic)",
83
147
  "v4r" => "Yodan verb with `ru' ending (archaic)",
148
+ "v4s" => "Yodan verb with `su' ending (archaic)",
149
+ "v4t" => "Yodan verb with `tsu' ending (archaic)",
84
150
  "v5aru" => "Godan verb - -aru special class",
85
151
  "v5b" => "Godan verb with `bu' ending",
86
152
  "v5g" => "Godan verb with `gu' ending",
@@ -95,83 +161,18 @@ module Eiwa
95
161
  "v5u" => "Godan verb with `u' ending",
96
162
  "v5u-s" => "Godan verb with `u' ending (special class)",
97
163
  "v5uru" => "Godan verb - Uru old class verb (old form of Eru)",
98
- "vz" => "Ichidan verb - zuru verb (alternative form of -jiru verbs)",
99
164
  "vi" => "intransitive verb",
100
165
  "vk" => "Kuru verb - special class",
101
166
  "vn" => "irregular nu verb",
102
167
  "vr" => "irregular ru verb, plain form ends with -ri",
103
168
  "vs" => "noun or participle which takes the aux. verb suru",
104
169
  "vs-c" => "su verb - precursor to the modern suru",
105
- "vs-s" => "suru verb - special class",
106
170
  "vs-i" => "suru verb - included",
107
- "kyb" => "Kyoto-ben",
108
- "osb" => "Osaka-ben",
109
- "ksb" => "Kansai-ben",
110
- "ktb" => "Kantou-ben",
111
- "tsb" => "Tosa-ben",
112
- "thb" => "Touhoku-ben",
113
- "tsug" => "Tsugaru-ben",
114
- "kyu" => "Kyuushuu-ben",
115
- "rkb" => "Ryuukyuu-ben",
116
- "nab" => "Nagano-ben",
117
- "hob" => "Hokkaido-ben",
171
+ "vs-s" => "suru verb - special class",
118
172
  "vt" => "transitive verb",
119
173
  "vulg" => "vulgar expression or word",
120
- "adj-kari" => "`kari' adjective (archaic)",
121
- "adj-ku" => "`ku' adjective (archaic)",
122
- "adj-shiku" => "`shiku' adjective (archaic)",
123
- "adj-nari" => "archaic/formal form of na-adjective",
124
- "n-pr" => "proper noun",
125
- "v-unspec" => "verb unspecified",
126
- "v4k" => "Yodan verb with `ku' ending (archaic)",
127
- "v4g" => "Yodan verb with `gu' ending (archaic)",
128
- "v4s" => "Yodan verb with `su' ending (archaic)",
129
- "v4t" => "Yodan verb with `tsu' ending (archaic)",
130
- "v4n" => "Yodan verb with `nu' ending (archaic)",
131
- "v4b" => "Yodan verb with `bu' ending (archaic)",
132
- "v4m" => "Yodan verb with `mu' ending (archaic)",
133
- "v2k-k" => "Nidan verb (upper class) with `ku' ending (archaic)",
134
- "v2g-k" => "Nidan verb (upper class) with `gu' ending (archaic)",
135
- "v2t-k" => "Nidan verb (upper class) with `tsu' ending (archaic)",
136
- "v2d-k" => "Nidan verb (upper class) with `dzu' ending (archaic)",
137
- "v2h-k" => "Nidan verb (upper class) with `hu/fu' ending (archaic)",
138
- "v2b-k" => "Nidan verb (upper class) with `bu' ending (archaic)",
139
- "v2m-k" => "Nidan verb (upper class) with `mu' ending (archaic)",
140
- "v2y-k" => "Nidan verb (upper class) with `yu' ending (archaic)",
141
- "v2r-k" => "Nidan verb (upper class) with `ru' ending (archaic)",
142
- "v2k-s" => "Nidan verb (lower class) with `ku' ending (archaic)",
143
- "v2g-s" => "Nidan verb (lower class) with `gu' ending (archaic)",
144
- "v2s-s" => "Nidan verb (lower class) with `su' ending (archaic)",
145
- "v2z-s" => "Nidan verb (lower class) with `zu' ending (archaic)",
146
- "v2t-s" => "Nidan verb (lower class) with `tsu' ending (archaic)",
147
- "v2d-s" => "Nidan verb (lower class) with `dzu' ending (archaic)",
148
- "v2n-s" => "Nidan verb (lower class) with `nu' ending (archaic)",
149
- "v2h-s" => "Nidan verb (lower class) with `hu/fu' ending (archaic)",
150
- "v2b-s" => "Nidan verb (lower class) with `bu' ending (archaic)",
151
- "v2m-s" => "Nidan verb (lower class) with `mu' ending (archaic)",
152
- "v2y-s" => "Nidan verb (lower class) with `yu' ending (archaic)",
153
- "v2r-s" => "Nidan verb (lower class) with `ru' ending (archaic)",
154
- "v2w-s" => "Nidan verb (lower class) with `u' ending and `we' conjugation (archaic)",
155
- "archit" => "architecture term",
156
- "astron" => "astronomy, etc. term",
157
- "baseb" => "baseball term",
158
- "biol" => "biology term",
159
- "bot" => "botany term",
160
- "bus" => "business term",
161
- "econ" => "economics term",
162
- "engr" => "engineering term",
163
- "finc" => "finance term",
164
- "geol" => "geology, etc. term",
165
- "law" => "law, etc. term",
166
- "mahj" => "mahjong term",
167
- "med" => "medicine, etc. term",
168
- "music" => "music term",
169
- "Shinto" => "Shinto term",
170
- "shogi" => "shogi term",
171
- "sports" => "sports term",
172
- "sumo" => "sumo term",
173
- "zool" => "zoology term",
174
- "joc" => "jocular, humorous term",
175
- "anat" => "anatomical term",
174
+ "vz" => "Ichidan verb - zuru verb (alternative form of -jiru verbs)",
175
+ "yoji" => "yojijukugo",
176
+ "zool" => "zoology term"
176
177
  }
177
178
  end
@@ -1,3 +1,3 @@
1
1
  module Eiwa
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eiwa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-28 00:00:00.000000000 Z
11
+ date: 2020-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement