cloudmersive-nlp-api-client 1.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +131 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-nlp-api-client.gemspec +45 -0
  6. data/docs/CheckJsonResponse.md +8 -0
  7. data/docs/CheckSentenceJsonResponse.md +9 -0
  8. data/docs/CorrectJsonResponse.md +9 -0
  9. data/docs/CorrectWordInSentenceJsonResponse.md +10 -0
  10. data/docs/ExtractEntitiesStringApi.md +63 -0
  11. data/docs/GetWordsJsonResponse.md +8 -0
  12. data/docs/LanguageDetectionApi.md +63 -0
  13. data/docs/LanguageDetectionResponse.md +10 -0
  14. data/docs/ParseStringApi.md +63 -0
  15. data/docs/PosRequest.md +8 -0
  16. data/docs/PosResponse.md +8 -0
  17. data/docs/PosSentence.md +8 -0
  18. data/docs/PosTaggedWord.md +9 -0
  19. data/docs/PosTaggerJsonApi.md +63 -0
  20. data/docs/PosTaggerStringApi.md +63 -0
  21. data/docs/SentencesApi.md +63 -0
  22. data/docs/SpellCheckApi.md +338 -0
  23. data/docs/WordPosition.md +11 -0
  24. data/docs/WordsApi.md +448 -0
  25. data/git_push.sh +55 -0
  26. data/lib/cloudmersive-nlp-api-client.rb +58 -0
  27. data/lib/cloudmersive-nlp-api-client/api/extract_entities_string_api.rb +78 -0
  28. data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +78 -0
  29. data/lib/cloudmersive-nlp-api-client/api/parse_string_api.rb +78 -0
  30. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_json_api.rb +78 -0
  31. data/lib/cloudmersive-nlp-api-client/api/pos_tagger_string_api.rb +78 -0
  32. data/lib/cloudmersive-nlp-api-client/api/sentences_api.rb +78 -0
  33. data/lib/cloudmersive-nlp-api-client/api/spell_check_api.rb +353 -0
  34. data/lib/cloudmersive-nlp-api-client/api/words_api.rb +463 -0
  35. data/lib/cloudmersive-nlp-api-client/api_client.rb +389 -0
  36. data/lib/cloudmersive-nlp-api-client/api_error.rb +38 -0
  37. data/lib/cloudmersive-nlp-api-client/configuration.rb +209 -0
  38. data/lib/cloudmersive-nlp-api-client/models/check_json_response.rb +189 -0
  39. data/lib/cloudmersive-nlp-api-client/models/check_sentence_json_response.rb +201 -0
  40. data/lib/cloudmersive-nlp-api-client/models/correct_json_response.rb +201 -0
  41. data/lib/cloudmersive-nlp-api-client/models/correct_word_in_sentence_json_response.rb +211 -0
  42. data/lib/cloudmersive-nlp-api-client/models/get_words_json_response.rb +191 -0
  43. data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +209 -0
  44. data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +189 -0
  45. data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +191 -0
  46. data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +191 -0
  47. data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +199 -0
  48. data/lib/cloudmersive-nlp-api-client/models/word_position.rb +219 -0
  49. data/lib/cloudmersive-nlp-api-client/version.rb +15 -0
  50. data/spec/api/extract_entities_string_api_spec.rb +47 -0
  51. data/spec/api/language_detection_api_spec.rb +47 -0
  52. data/spec/api/parse_string_api_spec.rb +47 -0
  53. data/spec/api/pos_tagger_json_api_spec.rb +47 -0
  54. data/spec/api/pos_tagger_string_api_spec.rb +47 -0
  55. data/spec/api/sentences_api_spec.rb +47 -0
  56. data/spec/api/spell_check_api_spec.rb +107 -0
  57. data/spec/api/words_api_spec.rb +131 -0
  58. data/spec/api_client_spec.rb +226 -0
  59. data/spec/configuration_spec.rb +42 -0
  60. data/spec/models/check_json_response_spec.rb +42 -0
  61. data/spec/models/check_sentence_json_response_spec.rb +48 -0
  62. data/spec/models/correct_json_response_spec.rb +48 -0
  63. data/spec/models/correct_word_in_sentence_json_response_spec.rb +54 -0
  64. data/spec/models/get_words_json_response_spec.rb +42 -0
  65. data/spec/models/language_detection_response_spec.rb +54 -0
  66. data/spec/models/pos_request_spec.rb +42 -0
  67. data/spec/models/pos_response_spec.rb +42 -0
  68. data/spec/models/pos_sentence_spec.rb +42 -0
  69. data/spec/models/pos_tagged_word_spec.rb +48 -0
  70. data/spec/models/word_position_spec.rb +60 -0
  71. data/spec/spec_helper.rb +111 -0
  72. metadata +296 -0
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,58 @@
1
+ =begin
2
+ #nlpapi
3
+
4
+ #The powerful Natural Language Processing APIs let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'cloudmersive-nlp-api-client/api_client'
15
+ require 'cloudmersive-nlp-api-client/api_error'
16
+ require 'cloudmersive-nlp-api-client/version'
17
+ require 'cloudmersive-nlp-api-client/configuration'
18
+
19
+ # Models
20
+ require 'cloudmersive-nlp-api-client/models/check_json_response'
21
+ require 'cloudmersive-nlp-api-client/models/check_sentence_json_response'
22
+ require 'cloudmersive-nlp-api-client/models/correct_json_response'
23
+ require 'cloudmersive-nlp-api-client/models/correct_word_in_sentence_json_response'
24
+ require 'cloudmersive-nlp-api-client/models/get_words_json_response'
25
+ require 'cloudmersive-nlp-api-client/models/language_detection_response'
26
+ require 'cloudmersive-nlp-api-client/models/pos_request'
27
+ require 'cloudmersive-nlp-api-client/models/pos_response'
28
+ require 'cloudmersive-nlp-api-client/models/pos_sentence'
29
+ require 'cloudmersive-nlp-api-client/models/pos_tagged_word'
30
+ require 'cloudmersive-nlp-api-client/models/word_position'
31
+
32
+ # APIs
33
+ require 'cloudmersive-nlp-api-client/api/extract_entities_string_api'
34
+ require 'cloudmersive-nlp-api-client/api/language_detection_api'
35
+ require 'cloudmersive-nlp-api-client/api/parse_string_api'
36
+ require 'cloudmersive-nlp-api-client/api/pos_tagger_json_api'
37
+ require 'cloudmersive-nlp-api-client/api/pos_tagger_string_api'
38
+ require 'cloudmersive-nlp-api-client/api/sentences_api'
39
+ require 'cloudmersive-nlp-api-client/api/spell_check_api'
40
+ require 'cloudmersive-nlp-api-client/api/words_api'
41
+
42
+ module CloudmersiveNlpApiClient
43
+ class << self
44
+ # Customize default settings for the SDK using block.
45
+ # CloudmersiveNlpApiClient.configure do |config|
46
+ # config.username = "xxx"
47
+ # config.password = "xxx"
48
+ # end
49
+ # If no block given, return the default Configuration object.
50
+ def configure
51
+ if block_given?
52
+ yield(Configuration.default)
53
+ else
54
+ Configuration.default
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,78 @@
1
+ =begin
2
+ #nlpapi
3
+
4
+ #The powerful Natural Language Processing APIs let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class ExtractEntitiesStringApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Extract entities from string
24
+ # Extract the named entitites from an input string.
25
+ # @param value Input string
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [String]
28
+ def extract_entities_string_post(value, opts = {})
29
+ data, _status_code, _headers = extract_entities_string_post_with_http_info(value, opts)
30
+ return data
31
+ end
32
+
33
+ # Extract entities from string
34
+ # Extract the named entitites from an input string.
35
+ # @param value Input string
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
+ def extract_entities_string_post_with_http_info(value, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: ExtractEntitiesStringApi.extract_entities_string_post ..."
41
+ end
42
+ # verify the required parameter 'value' is set
43
+ if @api_client.config.client_side_validation && value.nil?
44
+ fail ArgumentError, "Missing the required parameter 'value' when calling ExtractEntitiesStringApi.extract_entities_string_post"
45
+ end
46
+ # resource path
47
+ local_var_path = "/nlp/ExtractEntitiesString"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(value)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'String')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: ExtractEntitiesStringApi#extract_entities_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,78 @@
1
+ =begin
2
+ #nlpapi
3
+
4
+ #The powerful Natural Language Processing APIs let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class LanguageDetectionApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Detect language of text
24
+ # Automatically determine which language a text string is written in. Supports Danish (DAN), German (DEU), English (ENG), French (FRA), Italian (ITA), Japanese (JPN), Korean (KOR), Dutch (NLD), Norwegian (NOR), Portuguese (POR), Russian (RUS), Spanish (SPA), Swedish (SWE), Chinese (ZHO).
25
+ # @param text_to_detect Text to detect language of
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [LanguageDetectionResponse]
28
+ def language_detection_post(text_to_detect, opts = {})
29
+ data, _status_code, _headers = language_detection_post_with_http_info(text_to_detect, opts)
30
+ return data
31
+ end
32
+
33
+ # Detect language of text
34
+ # Automatically determine which language a text string is written in. Supports Danish (DAN), German (DEU), English (ENG), French (FRA), Italian (ITA), Japanese (JPN), Korean (KOR), Dutch (NLD), Norwegian (NOR), Portuguese (POR), Russian (RUS), Spanish (SPA), Swedish (SWE), Chinese (ZHO).
35
+ # @param text_to_detect Text to detect language of
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(LanguageDetectionResponse, Fixnum, Hash)>] LanguageDetectionResponse data, response status code and response headers
38
+ def language_detection_post_with_http_info(text_to_detect, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: LanguageDetectionApi.language_detection_post ..."
41
+ end
42
+ # verify the required parameter 'text_to_detect' is set
43
+ if @api_client.config.client_side_validation && text_to_detect.nil?
44
+ fail ArgumentError, "Missing the required parameter 'text_to_detect' when calling LanguageDetectionApi.language_detection_post"
45
+ end
46
+ # resource path
47
+ local_var_path = "/nlp/language/detect"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(text_to_detect)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'LanguageDetectionResponse')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: LanguageDetectionApi#language_detection_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,78 @@
1
+ =begin
2
+ #nlpapi
3
+
4
+ #The powerful Natural Language Processing APIs let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class ParseStringApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Parse string to syntax tree
24
+ # Parses the input string into a Penn Treebank syntax tree
25
+ # @param input Input string
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [String]
28
+ def parse_string_post(input, opts = {})
29
+ data, _status_code, _headers = parse_string_post_with_http_info(input, opts)
30
+ return data
31
+ end
32
+
33
+ # Parse string to syntax tree
34
+ # Parses the input string into a Penn Treebank syntax tree
35
+ # @param input Input string
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
+ def parse_string_post_with_http_info(input, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: ParseStringApi.parse_string_post ..."
41
+ end
42
+ # verify the required parameter 'input' is set
43
+ if @api_client.config.client_side_validation && input.nil?
44
+ fail ArgumentError, "Missing the required parameter 'input' when calling ParseStringApi.parse_string_post"
45
+ end
46
+ # resource path
47
+ local_var_path = "/nlp/ParseString"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(input)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'String')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: ParseStringApi#parse_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,78 @@
1
+ =begin
2
+ #nlpapi
3
+
4
+ #The powerful Natural Language Processing APIs let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class PosTaggerJsonApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Part-of-speech tag a string
24
+ # Part-of-speech (POS) tag a string and return result as JSON
25
+ # @param request Input string
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [PosResponse]
28
+ def pos_tagger_json_post(request, opts = {})
29
+ data, _status_code, _headers = pos_tagger_json_post_with_http_info(request, opts)
30
+ return data
31
+ end
32
+
33
+ # Part-of-speech tag a string
34
+ # Part-of-speech (POS) tag a string and return result as JSON
35
+ # @param request Input string
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(PosResponse, Fixnum, Hash)>] PosResponse data, response status code and response headers
38
+ def pos_tagger_json_post_with_http_info(request, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: PosTaggerJsonApi.pos_tagger_json_post ..."
41
+ end
42
+ # verify the required parameter 'request' is set
43
+ if @api_client.config.client_side_validation && request.nil?
44
+ fail ArgumentError, "Missing the required parameter 'request' when calling PosTaggerJsonApi.pos_tagger_json_post"
45
+ end
46
+ # resource path
47
+ local_var_path = "/nlp/PosTaggerJson"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(request)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'PosResponse')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: PosTaggerJsonApi#pos_tagger_json_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,78 @@
1
+ =begin
2
+ #nlpapi
3
+
4
+ #The powerful Natural Language Processing APIs let you perform part of speech tagging, entity identification, sentence parsing, and much more to help you understand the meaning of unstructured text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module CloudmersiveNlpApiClient
16
+ class PosTaggerStringApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Part-of-speech tag a string
24
+ # Perform a part-of-speech (POS) tagging on the input string.
25
+ # @param input Input string
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [String]
28
+ def pos_tagger_string_post(input, opts = {})
29
+ data, _status_code, _headers = pos_tagger_string_post_with_http_info(input, opts)
30
+ return data
31
+ end
32
+
33
+ # Part-of-speech tag a string
34
+ # Perform a part-of-speech (POS) tagging on the input string.
35
+ # @param input Input string
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
+ def pos_tagger_string_post_with_http_info(input, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug "Calling API: PosTaggerStringApi.pos_tagger_string_post ..."
41
+ end
42
+ # verify the required parameter 'input' is set
43
+ if @api_client.config.client_side_validation && input.nil?
44
+ fail ArgumentError, "Missing the required parameter 'input' when calling PosTaggerStringApi.pos_tagger_string_post"
45
+ end
46
+ # resource path
47
+ local_var_path = "/nlp/PosTaggerString"
48
+
49
+ # query parameters
50
+ query_params = {}
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = @api_client.object_to_http_body(input)
64
+ auth_names = ['Apikey']
65
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'String')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: PosTaggerStringApi#pos_tagger_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+ end
78
+ end