Class: Mushikago::Hanamgri::Client
- Inherits:
-
Mushikago::Http::Client
- Object
- Mushikago::Http::Client
- Mushikago::Hanamgri::Client
- Defined in:
- lib/mushikago/hanamgri/client.rb
Overview
Hanamgriサービスを利用する
Instance Attribute Summary
Attributes inherited from Mushikago::Http::Client
Instance Method Summary collapse
-
#create_domain(domain_name, seeds, schema, options = {}) ⇒ Object
ドメインを新規作成する.
-
#delete_dictionary(dictionary_name, options = {}) ⇒ Object
辞書の情報を削除する.
-
#delete_domain(domain_name, options = {}) ⇒ Object
ドメインを削除する.
-
#delete_knowledge(knowledge_name, options = {}) ⇒ Object
学習データの情報を削除する.
-
#get_analysis(domain_name, request_id, options = {}) ⇒ Mushikago::Http::Response
解析結果を取得する.
-
#get_information(domain_name, options = {}) ⇒ Mushikago::Http::Response
ドメインの情報を取得する.
-
#get_queue_size(domain_name, options = {}) ⇒ Mushikago::Http::Response
ドメイン内の残タスク数を取得する.
-
#list_analyses(domain_name, options = {}) ⇒ Mushikago::Http::Response
解析結果の一覧を取得する.
-
#list_dictionaries(options = {}) ⇒ Mushikago::Http::Response
辞書の一覧を取得する.
-
#list_domains(options = {}) ⇒ Mushikago::Http::Response
ドメインの一覧を取得する.
-
#list_knowledges(options = {}) ⇒ Mushikago::Http::Response
学習データの一覧を取得する.
-
#request_analysis(domain_name, url, options = {}) ⇒ Object
解析リクエストを送信する.
-
#save_dictionary(domain_name, options = {}) ⇒ Object
辞書を保存する.
-
#save_knowledge(domain_name, field_name, options = {}) ⇒ Object
学習データを保存する.
-
#search_schema(domain_name, query_key, query_value, options = {}) ⇒ Mushikagp::Http::Response
解析結果を検索する.
-
#train(domain_name, url_or_html, training_data, options = {}) ⇒ Mushikagp::Http::Response
解析結果を検索する.
-
#update_domain(domain_name, description, options = {}) ⇒ Mushikago::Http::Response
ドメインの情報を更新する.
Methods inherited from Mushikago::Http::Client
Constructor Details
This class inherits a constructor from Mushikago::Http::Client
Instance Method Details
#create_domain(domain_name, seeds, schema, options = {}) ⇒ Object
ドメインを新規作成する
29 30 31 32 |
# File 'lib/mushikago/hanamgri/client.rb', line 29 def create_domain domain_name, seeds, schema, ={} request = Hanamgri::CreateDomainRequest.new(domain_name, seeds, schema, ) send_request(request) end |
#delete_dictionary(dictionary_name, options = {}) ⇒ Object
辞書の情報を削除する
219 220 221 222 |
# File 'lib/mushikago/hanamgri/client.rb', line 219 def delete_dictionary dictionary_name, ={} request = Hanamgri::DeleteDictionaryRequest.new(dictionary_name,) send_request(request) end |
#delete_domain(domain_name, options = {}) ⇒ Object
ドメインを削除する
42 43 44 45 |
# File 'lib/mushikago/hanamgri/client.rb', line 42 def delete_domain domain_name, ={} request = Hanamgri::DeleteDomainRequest.new(domain_name, ) send_request(request) end |
#delete_knowledge(knowledge_name, options = {}) ⇒ Object
学習データの情報を削除する
259 260 261 262 |
# File 'lib/mushikago/hanamgri/client.rb', line 259 def delete_knowledge knowledge_name, ={} request = Hanamgri::DeleteKnowledgeRequest.new(knowledge_name,) send_request(request) end |
#get_analysis(domain_name, request_id, options = {}) ⇒ Mushikago::Http::Response
解析結果を取得する
72 73 74 75 |
# File 'lib/mushikago/hanamgri/client.rb', line 72 def get_analysis domain_name, request_id, ={} request = Hanamgri::GetAnalysisRequest.new(domain_name, request_id, ) send_request(request) end |
#get_information(domain_name, options = {}) ⇒ Mushikago::Http::Response
ドメインの情報を取得する
99 100 101 102 |
# File 'lib/mushikago/hanamgri/client.rb', line 99 def get_information domain_name, ={} request = Hanamgri::GetInformationRequest.new(domain_name, ) send_request(request) end |
#get_queue_size(domain_name, options = {}) ⇒ Mushikago::Http::Response
ドメイン内の残タスク数を取得する
86 87 88 89 |
# File 'lib/mushikago/hanamgri/client.rb', line 86 def get_queue_size domain_name, ={} request = Hanamgri::GetQueueSizeRequest.new(domain_name, ) send_request(request) end |
#list_analyses(domain_name, options = {}) ⇒ Mushikago::Http::Response
解析結果の一覧を取得する
145 146 147 148 |
# File 'lib/mushikago/hanamgri/client.rb', line 145 def list_analyses domain_name, ={} request = Hanamgri::GetListAnalysesRequest.new(domain_name, ) send_request(request) end |
#list_dictionaries(options = {}) ⇒ Mushikago::Http::Response
辞書の一覧を取得する
208 209 210 211 |
# File 'lib/mushikago/hanamgri/client.rb', line 208 def list_dictionaries ={} request = Hanamgri::ListDictionariesRequest.new() send_request(request) end |
#list_domains(options = {}) ⇒ Mushikago::Http::Response
ドメインの一覧を取得する
114 115 116 117 |
# File 'lib/mushikago/hanamgri/client.rb', line 114 def list_domains ={} request = Hanamgri::GetListDomainsRequest.new() send_request(request) end |
#list_knowledges(options = {}) ⇒ Mushikago::Http::Response
学習データの一覧を取得する
248 249 250 251 |
# File 'lib/mushikago/hanamgri/client.rb', line 248 def list_knowledges ={} request = Hanamgri::ListKnowledgesRequest.new() send_request(request) end |
#request_analysis(domain_name, url, options = {}) ⇒ Object
解析リクエストを送信する
58 59 60 61 |
# File 'lib/mushikago/hanamgri/client.rb', line 58 def request_analysis domain_name, url, ={} request = Hanamgri::RequestAnalysisRequest.new(domain_name, url, ) send_request(request) end |
#save_dictionary(domain_name, options = {}) ⇒ Object
辞書を保存する
194 195 196 197 |
# File 'lib/mushikago/hanamgri/client.rb', line 194 def save_dictionary domain_name, ={} request = Hanamgri::SaveDictionaryRequest.new(domain_name, ) send_request(request) end |
#save_knowledge(domain_name, field_name, options = {}) ⇒ Object
学習データを保存する
233 234 235 236 |
# File 'lib/mushikago/hanamgri/client.rb', line 233 def save_knowledge domain_name, field_name, ={} request = Hanamgri::SaveKnowledgeRequest.new(domain_name, field_name, ) send_request(request) end |
#search_schema(domain_name, query_key, query_value, options = {}) ⇒ Mushikagp::Http::Response
解析結果を検索する
161 162 163 164 |
# File 'lib/mushikago/hanamgri/client.rb', line 161 def search_schema domain_name, query_key, query_value, ={} request = Hanamgri::SearchSchemaRequest.new(domain_name, query_key, query_value, ) send_request(request) end |
#train(domain_name, url_or_html, training_data, options = {}) ⇒ Mushikagp::Http::Response
解析結果を検索する
181 182 183 184 |
# File 'lib/mushikago/hanamgri/client.rb', line 181 def train domain_name, url_or_html, training_data, ={} request = Hanamgri::TrainRequest.new(domain_name, url_or_html, training_data, ) send_request(request) end |
#update_domain(domain_name, description, options = {}) ⇒ Mushikago::Http::Response
ドメインの情報を更新する
128 129 130 131 |
# File 'lib/mushikago/hanamgri/client.rb', line 128 def update_domain domain_name, description, ={} request = Hanamgri::UpdateDomainRequest.new(domain_name, description, ) send_request(request) end |