README.md in ltp-cloud-sdk-0.1.0 vs README.md in ltp-cloud-sdk-0.1.1
- old
+ new
@@ -1,11 +1,9 @@
-# Ltp::Cloud::Sdk
+# Ltp::Cloud::Sdk 语言云非官方ruby SDK
-Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ltp/cloud/sdk`. To experiment with that code, run `bin/console` for an interactive prompt.
+[语言云](https://www.ltp-cloud.com)
-TODO: Delete this and the text above, and describe your gem
-
## Installation
Add this line to your application's Gemfile:
```ruby
@@ -20,10 +18,23 @@
$ gem install ltp-cloud-sdk
## Usage
-TODO: Write usage instructions here
+`rails`:
+
+create `ltp_cloud_sdk` file in the `initializers` directory:
+
+```ruby
+Ltp::Cloud::Sdk.configure do |config|
+ config.api_key = 'Your Key Here'
+end
+```
+
+```ruby
+Ltp::Cloud::Sdk.client.analysis('南京市长江大桥能不能长一点')
+// ["南京市", "长江", "大桥", "能", "不", "能", "长", "一点"]
+```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.