Module: AliyunNlpRuby
- Defined in:
- lib/aliyun_nlp_ruby.rb,
lib/aliyun_nlp_ruby/client.rb,
lib/aliyun_nlp_ruby/version.rb,
lib/aliyun_nlp_ruby/configuration.rb
Defined Under Namespace
Classes: Client, Configuration
Constant Summary
collapse
- VERSION =
"0.0.2"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
8
9
10
|
# File 'lib/aliyun_nlp_ruby.rb', line 8
def configuration
@configuration ||= Configuration.new
end
|
Class Method Details
12
13
14
|
# File 'lib/aliyun_nlp_ruby.rb', line 12
def configure
yield(configuration)
end
|
.get_pos_ch_general(text, out_type = 1) ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/aliyun_nlp_ruby.rb', line 25
def get_pos_ch_general text, out_type = 1
params = {
Action: 'GetPosChGeneral',
Text: text,
OutType: out_type
}
client.send_request(params)
end
|
.get_ws_ch_general(text, out_type = 1) ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/aliyun_nlp_ruby.rb', line 16
def get_ws_ch_general text, out_type = 1
params = {
Action: 'GetWsChGeneral',
Text: text,
OutType: out_type
}
client.send_request(params)
end
|
.query(action, custom_params) ⇒ Object
34
35
36
37
|
# File 'lib/aliyun_nlp_ruby.rb', line 34
def query action, custom_params
params = { Action: action }
client.send_request(params.merge(custom_params))
end
|