class TxNlp::Keyword
Public Class Methods
new(text, action_type = 'KeywordsExtraction')
click to toggle source
# File lib/tx_nlp/keyword.rb, line 3 def initialize(text, action_type = 'KeywordsExtraction') @action_type = action_type @encode_text = text.tr("\n", ' ') @escape_text = CGI.escape(@encode_text) end
Public Instance Methods
indent_result()
click to toggle source
# File lib/tx_nlp/keyword.rb, line 17 def indent_result if json['Response']['Error'] json else new_content = raw_result.join(',') new_content end end
raw_result()
click to toggle source
# File lib/tx_nlp/keyword.rb, line 9 def raw_result if json['Response']['Error'] json else original_data = json['Response']["Keywords"] end end