cloudmersive-nlp-api-client 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +131 -0
- data/Rakefile +8 -0
- data/cloudmersive-nlp-api-client.gemspec +45 -0
- data/docs/CheckJsonResponse.md +8 -0
- data/docs/CheckSentenceJsonResponse.md +9 -0
- data/docs/CorrectJsonResponse.md +9 -0
- data/docs/CorrectWordInSentenceJsonResponse.md +10 -0
- data/docs/ExtractEntitiesStringApi.md +63 -0
- data/docs/GetWordsJsonResponse.md +8 -0
- data/docs/LanguageDetectionApi.md +63 -0
- data/docs/LanguageDetectionResponse.md +10 -0
- data/docs/ParseStringApi.md +63 -0
- data/docs/PosRequest.md +8 -0
- data/docs/PosResponse.md +8 -0
- data/docs/PosSentence.md +8 -0
- data/docs/PosTaggedWord.md +9 -0
- data/docs/PosTaggerJsonApi.md +63 -0
- data/docs/PosTaggerStringApi.md +63 -0
- data/docs/SentencesApi.md +63 -0
- data/docs/SpellCheckApi.md +338 -0
- data/docs/WordPosition.md +11 -0
- data/docs/WordsApi.md +448 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-nlp-api-client.rb +58 -0
- data/lib/cloudmersive-nlp-api-client/api/extract_entities_string_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/language_detection_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/parse_string_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_json_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/pos_tagger_string_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/sentences_api.rb +78 -0
- data/lib/cloudmersive-nlp-api-client/api/spell_check_api.rb +353 -0
- data/lib/cloudmersive-nlp-api-client/api/words_api.rb +463 -0
- data/lib/cloudmersive-nlp-api-client/api_client.rb +389 -0
- data/lib/cloudmersive-nlp-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-nlp-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-nlp-api-client/models/check_json_response.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/check_sentence_json_response.rb +201 -0
- data/lib/cloudmersive-nlp-api-client/models/correct_json_response.rb +201 -0
- data/lib/cloudmersive-nlp-api-client/models/correct_word_in_sentence_json_response.rb +211 -0
- data/lib/cloudmersive-nlp-api-client/models/get_words_json_response.rb +191 -0
- data/lib/cloudmersive-nlp-api-client/models/language_detection_response.rb +209 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_request.rb +189 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_response.rb +191 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_sentence.rb +191 -0
- data/lib/cloudmersive-nlp-api-client/models/pos_tagged_word.rb +199 -0
- data/lib/cloudmersive-nlp-api-client/models/word_position.rb +219 -0
- data/lib/cloudmersive-nlp-api-client/version.rb +15 -0
- data/spec/api/extract_entities_string_api_spec.rb +47 -0
- data/spec/api/language_detection_api_spec.rb +47 -0
- data/spec/api/parse_string_api_spec.rb +47 -0
- data/spec/api/pos_tagger_json_api_spec.rb +47 -0
- data/spec/api/pos_tagger_string_api_spec.rb +47 -0
- data/spec/api/sentences_api_spec.rb +47 -0
- data/spec/api/spell_check_api_spec.rb +107 -0
- data/spec/api/words_api_spec.rb +131 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/check_json_response_spec.rb +42 -0
- data/spec/models/check_sentence_json_response_spec.rb +48 -0
- data/spec/models/correct_json_response_spec.rb +48 -0
- data/spec/models/correct_word_in_sentence_json_response_spec.rb +54 -0
- data/spec/models/get_words_json_response_spec.rb +42 -0
- data/spec/models/language_detection_response_spec.rb +54 -0
- data/spec/models/pos_request_spec.rb +42 -0
- data/spec/models/pos_response_spec.rb +42 -0
- data/spec/models/pos_sentence_spec.rb +42 -0
- data/spec/models/pos_tagged_word_spec.rb +48 -0
- data/spec/models/word_position_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +296 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2f6ebc52a41b9d3bcfe79a000a265347b93ececbd5c83104c49ead837215bb39
|
4
|
+
data.tar.gz: 945e33b59e45792703388182c70a53b4ebbd24480ab47bb81dfc667054ac360f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5870e53fb640715ecfb710cdc53365b8dd796514da7589f809fb82618d4c95e46812f21b228b74f0884ed6c4c00531197c95259d0ab9ab2ab1522c1500c6a5f7
|
7
|
+
data.tar.gz: 77f70ea3b78f5896f9affa8b97c755e1139bab09f365ca57e936d1786c86e124d46a4a2809414b78135794bfcb270dfe92c12de8b1ed1264d8061aaaf66b07ab
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
# cloudmersive-nlp-api-client
|
2
|
+
|
3
|
+
CloudmersiveNlpApiClient - the Ruby gem for the nlpapi
|
4
|
+
|
5
|
+
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.
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: v1
|
10
|
+
- Package version: 1.2.9
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build cloudmersive-nlp-api-client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./cloudmersive-nlp-api-client-1.2.9.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-nlp-api-client-1.2.9.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'cloudmersive-nlp-api-client', '~> 1.2.9'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
39
|
+
|
40
|
+
gem 'cloudmersive-nlp-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'cloudmersive-nlp-api-client'
|
56
|
+
|
57
|
+
# Setup authorization
|
58
|
+
CloudmersiveNlpApiClient.configure do |config|
|
59
|
+
# Configure API key authorization: Apikey
|
60
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
61
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
62
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
63
|
+
end
|
64
|
+
|
65
|
+
api_instance = CloudmersiveNlpApiClient::ExtractEntitiesStringApi.new
|
66
|
+
|
67
|
+
value = "value_example" # String | Input string
|
68
|
+
|
69
|
+
|
70
|
+
begin
|
71
|
+
#Extract entities from string
|
72
|
+
result = api_instance.extract_entities_string_post(value)
|
73
|
+
p result
|
74
|
+
rescue CloudmersiveNlpApiClient::ApiError => e
|
75
|
+
puts "Exception when calling ExtractEntitiesStringApi->extract_entities_string_post: #{e}"
|
76
|
+
end
|
77
|
+
|
78
|
+
```
|
79
|
+
|
80
|
+
## Documentation for API Endpoints
|
81
|
+
|
82
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
83
|
+
|
84
|
+
Class | Method | HTTP request | Description
|
85
|
+
------------ | ------------- | ------------- | -------------
|
86
|
+
*CloudmersiveNlpApiClient::ExtractEntitiesStringApi* | [**extract_entities_string_post**](docs/ExtractEntitiesStringApi.md#extract_entities_string_post) | **POST** /nlp/ExtractEntitiesString | Extract entities from string
|
87
|
+
*CloudmersiveNlpApiClient::LanguageDetectionApi* | [**language_detection_post**](docs/LanguageDetectionApi.md#language_detection_post) | **POST** /nlp/language/detect | Detect language of text
|
88
|
+
*CloudmersiveNlpApiClient::ParseStringApi* | [**parse_string_post**](docs/ParseStringApi.md#parse_string_post) | **POST** /nlp/ParseString | Parse string to syntax tree
|
89
|
+
*CloudmersiveNlpApiClient::PosTaggerJsonApi* | [**pos_tagger_json_post**](docs/PosTaggerJsonApi.md#pos_tagger_json_post) | **POST** /nlp/PosTaggerJson | Part-of-speech tag a string
|
90
|
+
*CloudmersiveNlpApiClient::PosTaggerStringApi* | [**pos_tagger_string_post**](docs/PosTaggerStringApi.md#pos_tagger_string_post) | **POST** /nlp/PosTaggerString | Part-of-speech tag a string
|
91
|
+
*CloudmersiveNlpApiClient::SentencesApi* | [**sentences_post**](docs/SentencesApi.md#sentences_post) | **POST** /nlp/get/sentences/string | Extract sentences from string
|
92
|
+
*CloudmersiveNlpApiClient::SpellCheckApi* | [**spell_check_check_json**](docs/SpellCheckApi.md#spell_check_check_json) | **POST** /nlp/spellcheck/check/word/json | Spell check word
|
93
|
+
*CloudmersiveNlpApiClient::SpellCheckApi* | [**spell_check_check_sentence_json**](docs/SpellCheckApi.md#spell_check_check_sentence_json) | **POST** /nlp/spellcheck/check/sentence/json | Check if sentence is spelled correctly
|
94
|
+
*CloudmersiveNlpApiClient::SpellCheckApi* | [**spell_check_check_sentence_string**](docs/SpellCheckApi.md#spell_check_check_sentence_string) | **POST** /nlp/spellcheck/check/sentence/string | Spell check a sentence
|
95
|
+
*CloudmersiveNlpApiClient::SpellCheckApi* | [**spell_check_correct**](docs/SpellCheckApi.md#spell_check_correct) | **POST** /nlp/spellcheck/correct/word/string | Find spelling corrections
|
96
|
+
*CloudmersiveNlpApiClient::SpellCheckApi* | [**spell_check_correct_json**](docs/SpellCheckApi.md#spell_check_correct_json) | **POST** /nlp/spellcheck/correct/word/json | Find spelling corrections
|
97
|
+
*CloudmersiveNlpApiClient::SpellCheckApi* | [**spell_check_post**](docs/SpellCheckApi.md#spell_check_post) | **POST** /nlp/spellcheck/check/word/string | Spell check a word
|
98
|
+
*CloudmersiveNlpApiClient::WordsApi* | [**words_adjectives**](docs/WordsApi.md#words_adjectives) | **POST** /nlp/get/words/adjectives/string | Get adjectives in string
|
99
|
+
*CloudmersiveNlpApiClient::WordsApi* | [**words_adverbs**](docs/WordsApi.md#words_adverbs) | **POST** /nlp/get/words/adverbs/string | Get adverbs in input string
|
100
|
+
*CloudmersiveNlpApiClient::WordsApi* | [**words_get_words_json**](docs/WordsApi.md#words_get_words_json) | **POST** /nlp/get/words/json | Get words in input string (JSON)
|
101
|
+
*CloudmersiveNlpApiClient::WordsApi* | [**words_get_words_string**](docs/WordsApi.md#words_get_words_string) | **POST** /nlp/get/words/string | Get words from string
|
102
|
+
*CloudmersiveNlpApiClient::WordsApi* | [**words_nouns**](docs/WordsApi.md#words_nouns) | **POST** /nlp/get/words/nouns/string | Get nouns in string
|
103
|
+
*CloudmersiveNlpApiClient::WordsApi* | [**words_post**](docs/WordsApi.md#words_post) | **POST** /nlp/get/words/verbs/string | Get the verbs in a string
|
104
|
+
*CloudmersiveNlpApiClient::WordsApi* | [**words_pronouns**](docs/WordsApi.md#words_pronouns) | **POST** /nlp/get/words/pronouns/string | Returns all pronounts in string
|
105
|
+
*CloudmersiveNlpApiClient::WordsApi* | [**words_proper_nouns**](docs/WordsApi.md#words_proper_nouns) | **POST** /nlp/get/words/properNouns/string | Get proper nouns in a string
|
106
|
+
|
107
|
+
|
108
|
+
## Documentation for Models
|
109
|
+
|
110
|
+
- [CloudmersiveNlpApiClient::CheckJsonResponse](docs/CheckJsonResponse.md)
|
111
|
+
- [CloudmersiveNlpApiClient::CheckSentenceJsonResponse](docs/CheckSentenceJsonResponse.md)
|
112
|
+
- [CloudmersiveNlpApiClient::CorrectJsonResponse](docs/CorrectJsonResponse.md)
|
113
|
+
- [CloudmersiveNlpApiClient::CorrectWordInSentenceJsonResponse](docs/CorrectWordInSentenceJsonResponse.md)
|
114
|
+
- [CloudmersiveNlpApiClient::GetWordsJsonResponse](docs/GetWordsJsonResponse.md)
|
115
|
+
- [CloudmersiveNlpApiClient::LanguageDetectionResponse](docs/LanguageDetectionResponse.md)
|
116
|
+
- [CloudmersiveNlpApiClient::PosRequest](docs/PosRequest.md)
|
117
|
+
- [CloudmersiveNlpApiClient::PosResponse](docs/PosResponse.md)
|
118
|
+
- [CloudmersiveNlpApiClient::PosSentence](docs/PosSentence.md)
|
119
|
+
- [CloudmersiveNlpApiClient::PosTaggedWord](docs/PosTaggedWord.md)
|
120
|
+
- [CloudmersiveNlpApiClient::WordPosition](docs/WordPosition.md)
|
121
|
+
|
122
|
+
|
123
|
+
## Documentation for Authorization
|
124
|
+
|
125
|
+
|
126
|
+
### Apikey
|
127
|
+
|
128
|
+
- **Type**: API key
|
129
|
+
- **API key parameter name**: Apikey
|
130
|
+
- **Location**: HTTP header
|
131
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
=begin
|
4
|
+
#nlpapi
|
5
|
+
|
6
|
+
#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.
|
7
|
+
|
8
|
+
OpenAPI spec version: v1
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: unset
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "cloudmersive-nlp-api-client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "cloudmersive-nlp-api-client"
|
20
|
+
s.version = CloudmersiveNlpApiClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Cloudmersive"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://www.cloudmersive.com/nlp-api"
|
25
|
+
s.summary = "The most powerful and cost-effective NLP AI APIs, continuously updated."
|
26
|
+
s.description = "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."
|
27
|
+
s.license = "Apache 2.0"
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = Dir['./**/*']
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveNlpApiClient::CheckSentenceJsonResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**incorrect_count** | **Integer** | Number of incorrect words | [optional]
|
7
|
+
**words** | [**Array<CorrectWordInSentenceJsonResponse>**](CorrectWordInSentenceJsonResponse.md) | Words in the sentence, both correct and incorrect | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveNlpApiClient::CorrectJsonResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**correct** | **BOOLEAN** | True if the word is spelled correctly, false otherwise | [optional]
|
7
|
+
**suggestions** | **Array<String>** | Suggested spelling corrections | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveNlpApiClient::CorrectWordInSentenceJsonResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**word** | [**WordPosition**](WordPosition.md) | Position of the word | [optional]
|
7
|
+
**correct** | **BOOLEAN** | True if the word is spelled correctly, false otherwise | [optional]
|
8
|
+
**suggestions** | **Array<String>** | Suggested spelling improvements | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# CloudmersiveNlpApiClient::ExtractEntitiesStringApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**extract_entities_string_post**](ExtractEntitiesStringApi.md#extract_entities_string_post) | **POST** /nlp/ExtractEntitiesString | Extract entities from string
|
8
|
+
|
9
|
+
|
10
|
+
# **extract_entities_string_post**
|
11
|
+
> String extract_entities_string_post(value)
|
12
|
+
|
13
|
+
Extract entities from string
|
14
|
+
|
15
|
+
Extract the named entitites from an input string.
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'cloudmersive-nlp-api-client'
|
21
|
+
# setup authorization
|
22
|
+
CloudmersiveNlpApiClient.configure do |config|
|
23
|
+
# Configure API key authorization: Apikey
|
24
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = CloudmersiveNlpApiClient::ExtractEntitiesStringApi.new
|
30
|
+
|
31
|
+
value = "value_example" # String | Input string
|
32
|
+
|
33
|
+
|
34
|
+
begin
|
35
|
+
#Extract entities from string
|
36
|
+
result = api_instance.extract_entities_string_post(value)
|
37
|
+
p result
|
38
|
+
rescue CloudmersiveNlpApiClient::ApiError => e
|
39
|
+
puts "Exception when calling ExtractEntitiesStringApi->extract_entities_string_post: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
Name | Type | Description | Notes
|
46
|
+
------------- | ------------- | ------------- | -------------
|
47
|
+
**value** | **String**| Input string |
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
**String**
|
52
|
+
|
53
|
+
### Authorization
|
54
|
+
|
55
|
+
[Apikey](../README.md#Apikey)
|
56
|
+
|
57
|
+
### HTTP request headers
|
58
|
+
|
59
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
60
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
61
|
+
|
62
|
+
|
63
|
+
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# CloudmersiveNlpApiClient::LanguageDetectionApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**language_detection_post**](LanguageDetectionApi.md#language_detection_post) | **POST** /nlp/language/detect | Detect language of text
|
8
|
+
|
9
|
+
|
10
|
+
# **language_detection_post**
|
11
|
+
> LanguageDetectionResponse language_detection_post(text_to_detect)
|
12
|
+
|
13
|
+
Detect language of text
|
14
|
+
|
15
|
+
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).
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'cloudmersive-nlp-api-client'
|
21
|
+
# setup authorization
|
22
|
+
CloudmersiveNlpApiClient.configure do |config|
|
23
|
+
# Configure API key authorization: Apikey
|
24
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = CloudmersiveNlpApiClient::LanguageDetectionApi.new
|
30
|
+
|
31
|
+
text_to_detect = "text_to_detect_example" # String | Text to detect language of
|
32
|
+
|
33
|
+
|
34
|
+
begin
|
35
|
+
#Detect language of text
|
36
|
+
result = api_instance.language_detection_post(text_to_detect)
|
37
|
+
p result
|
38
|
+
rescue CloudmersiveNlpApiClient::ApiError => e
|
39
|
+
puts "Exception when calling LanguageDetectionApi->language_detection_post: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
Name | Type | Description | Notes
|
46
|
+
------------- | ------------- | ------------- | -------------
|
47
|
+
**text_to_detect** | **String**| Text to detect language of |
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
[**LanguageDetectionResponse**](LanguageDetectionResponse.md)
|
52
|
+
|
53
|
+
### Authorization
|
54
|
+
|
55
|
+
[Apikey](../README.md#Apikey)
|
56
|
+
|
57
|
+
### HTTP request headers
|
58
|
+
|
59
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
60
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
61
|
+
|
62
|
+
|
63
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveNlpApiClient::LanguageDetectionResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the language detection operation was successful, false otherwise | [optional]
|
7
|
+
**detected_language_three_letter_code** | **String** | ISO 639 three letter language code | [optional]
|
8
|
+
**detected_language_full_name** | **String** | The full name (in English) of the detected language | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# CloudmersiveNlpApiClient::ParseStringApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**parse_string_post**](ParseStringApi.md#parse_string_post) | **POST** /nlp/ParseString | Parse string to syntax tree
|
8
|
+
|
9
|
+
|
10
|
+
# **parse_string_post**
|
11
|
+
> String parse_string_post(input)
|
12
|
+
|
13
|
+
Parse string to syntax tree
|
14
|
+
|
15
|
+
Parses the input string into a Penn Treebank syntax tree
|
16
|
+
|
17
|
+
### Example
|
18
|
+
```ruby
|
19
|
+
# load the gem
|
20
|
+
require 'cloudmersive-nlp-api-client'
|
21
|
+
# setup authorization
|
22
|
+
CloudmersiveNlpApiClient.configure do |config|
|
23
|
+
# Configure API key authorization: Apikey
|
24
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
26
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
27
|
+
end
|
28
|
+
|
29
|
+
api_instance = CloudmersiveNlpApiClient::ParseStringApi.new
|
30
|
+
|
31
|
+
input = "input_example" # String | Input string
|
32
|
+
|
33
|
+
|
34
|
+
begin
|
35
|
+
#Parse string to syntax tree
|
36
|
+
result = api_instance.parse_string_post(input)
|
37
|
+
p result
|
38
|
+
rescue CloudmersiveNlpApiClient::ApiError => e
|
39
|
+
puts "Exception when calling ParseStringApi->parse_string_post: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
Name | Type | Description | Notes
|
46
|
+
------------- | ------------- | ------------- | -------------
|
47
|
+
**input** | **String**| Input string |
|
48
|
+
|
49
|
+
### Return type
|
50
|
+
|
51
|
+
**String**
|
52
|
+
|
53
|
+
### Authorization
|
54
|
+
|
55
|
+
[Apikey](../README.md#Apikey)
|
56
|
+
|
57
|
+
### HTTP request headers
|
58
|
+
|
59
|
+
- **Content-Type**: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
|
60
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
61
|
+
|
62
|
+
|
63
|
+
|