Class: JiebaRb::Tagging
- Inherits:
-
Object
- Object
- JiebaRb::Tagging
- Defined in:
- lib/jieba-rb.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Tagging
constructor
A new instance of Tagging.
Constructor Details
#initialize(opts = {}) ⇒ Tagging
Returns a new instance of Tagging.
57 58 59 60 61 62 63 64 |
# File 'lib/jieba-rb.rb', line 57 def initialize opts = {} jieba_dict = opts[:jieba_dict] || DEFAULT_JIEBA_DICT hmm_dict = opts[:hmm_dict] || DEFAULT_HMM_DICT user_dict = opts[:user_dict] || "" user_dict = DEFAULT_USER_DICT if user_dict == :default _init jieba_dict, hmm_dict, user_dict end |