Class: Kotoshu::Languages::Hebrew
- Inherits:
-
Kotoshu::Language::Base
- Object
- Kotoshu::Language::Base
- Kotoshu::Languages::Hebrew
- Defined in:
- lib/kotoshu/languages/he/language.rb
Overview
Hebrew language implementation.
Registers the Hebrew language with Kotoshu::Language::Registry under the
he and he-IL codes. Uses the Kotoshu::Language::Normalizer::Hebrew
normalizer (NFC + niqqud stripping + dagesh removal + maqaf
normalization) so that bare dictionary forms match against
user input that may include vowel points.
Defined Under Namespace
Classes: Tokenizer
Instance Attribute Summary
Attributes inherited from Kotoshu::Language::Base
#code, #name, #region, #variant
Instance Method Summary collapse
- #default_dictionary_paths ⇒ Object
- #description ⇒ Object
- #dictionary_class ⇒ Object
-
#initialize(code: "he", name: "Hebrew", variant: nil) ⇒ Hebrew
constructor
A new instance of Hebrew.
- #normalizer ⇒ Object
- #rtl? ⇒ Boolean
- #script_type ⇒ Object
- #tokenizer ⇒ Object
Methods inherited from Kotoshu::Language::Base
#base_code, #base_language?, #compatible_with?, #encoding, #full_name, #info, instance, #matches_code?, #normalize, #normalize_word, #region_code, register, registered_codes, #tokenize, #valid_word?
Constructor Details
#initialize(code: "he", name: "Hebrew", variant: nil) ⇒ Hebrew
Returns a new instance of Hebrew.
21 22 23 |
# File 'lib/kotoshu/languages/he/language.rb', line 21 def initialize(code: "he", name: "Hebrew", variant: nil) super end |
Instance Method Details
#default_dictionary_paths ⇒ Object
41 42 43 |
# File 'lib/kotoshu/languages/he/language.rb', line 41 def default_dictionary_paths ["/usr/share/dict/hebrew"] end |
#description ⇒ Object
25 26 27 |
# File 'lib/kotoshu/languages/he/language.rb', line 25 def description name end |
#dictionary_class ⇒ Object
37 38 39 |
# File 'lib/kotoshu/languages/he/language.rb', line 37 def dictionary_class Dictionary::Custom end |
#normalizer ⇒ Object
33 34 35 |
# File 'lib/kotoshu/languages/he/language.rb', line 33 def normalizer @normalizer ||= Language::Normalizer::Hebrew.new end |
#rtl? ⇒ Boolean
49 50 51 |
# File 'lib/kotoshu/languages/he/language.rb', line 49 def rtl? true end |
#script_type ⇒ Object
45 46 47 |
# File 'lib/kotoshu/languages/he/language.rb', line 45 def script_type :hebrew end |