Class: WenlinDbScanner::SpeechPart
- Inherits:
-
Struct
- Object
- Struct
- WenlinDbScanner::SpeechPart
- Defined in:
- lib/wenlin_db_scanner/speech_parts.rb
Overview
Wraps a record in the parts-of-speech database.
Instance Attribute Summary collapse
-
#abbrev ⇒ String
E.g., ‘v.’; used by entries in the other databases.
-
#description ⇒ String
English-language explanation of what the part of speech is.
-
#en ⇒ String
English name, e.g.
-
#pinyin ⇒ String
Chinese name, in pinyin, e.g.
-
#zh ⇒ String
Chinese name, in Hanzi, e.g.
Instance Method Summary collapse
Instance Attribute Details
#abbrev ⇒ String
Returns e.g., ‘v.’; used by entries in the other databases.
46 47 48 |
# File 'lib/wenlin_db_scanner/speech_parts.rb', line 46 def abbrev @abbrev end |
#description ⇒ String
Returns English-language explanation of what the part of speech is.
46 47 48 |
# File 'lib/wenlin_db_scanner/speech_parts.rb', line 46 def description @description end |
#en ⇒ String
Returns English name, e.g. ‘Verb’.
46 47 48 |
# File 'lib/wenlin_db_scanner/speech_parts.rb', line 46 def en @en end |
#pinyin ⇒ String
Returns Chinese name, in pinyin, e.g. ‘Dòngcí’.
46 47 48 |
# File 'lib/wenlin_db_scanner/speech_parts.rb', line 46 def @pinyin end |
#zh ⇒ String
Returns Chinese name, in Hanzi, e.g. ‘动词’.
46 47 48 |
# File 'lib/wenlin_db_scanner/speech_parts.rb', line 46 def zh @zh end |
Instance Method Details
#to_hash ⇒ Hash
63 64 65 |
# File 'lib/wenlin_db_scanner/speech_parts.rb', line 63 def to_hash Hash[each_pair.to_a] end |