Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Setup configuration parameters
Dandelionapi.configure do |c|
c.token = "your-token-for-dandelionapi-account"
c.endpoint = "https://api.dandelion.eu/"
c.path = "datatxt/"
c.path = "datatxt"
end
```

Expand All @@ -43,7 +43,7 @@ response = element.analyze(text: "This is a test")

```
element = Dandelionapi::TextSimilarity::Request.new
response = element.analyze(text1: "This is a test", text2: "This is another test")
response = element.compare(text1: "This is a test", text2: "This is another test")
```

**[Language Detection API](https://dandelion.eu/docs/api/datatxt/li/v1/)**:
Expand Down
4 changes: 2 additions & 2 deletions dandelionapi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 1.9.3'

spec.add_dependency "faraday", '~> 0.9', '>= 0.9.0'
spec.add_dependency "faraday_middleware", '~> 0.9', '>= 0.9.1'
spec.add_dependency "faraday", '~> 1.0', '>= 1.0.0'
spec.add_dependency "faraday_middleware", '~> 1.0', '>= 1.0.0'

spec.add_development_dependency "bundler", "~> 1.10"
spec.add_development_dependency "rake", "~> 10.1"
Expand Down
4 changes: 2 additions & 2 deletions spec/entity_extraction_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# account: Mario Rossi <datatxt@mailinator.com>
c.token = "YOUR-TEST-TOKEN"
c.endpoint = "https://api.dandelion.eu/"
c.path = "datatxt/"
c.path = "datatxt"
end
end

Expand Down Expand Up @@ -43,7 +43,7 @@

it "make a request to nex using a blog url" do
element = Dandelionapi::EntityExtraction::Request.new
response = element.analyze(url: "http://blog.andreamostosi.name")
response = element.analyze(url: "https://www.cambridgeenglish.org/blog")
expect(response).not_to be_empty
expect(response["lang"]).to eq("en")
expect(response["annotations"]).to be_an_instance_of(Array)
Expand Down
4 changes: 2 additions & 2 deletions spec/language_detection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# account: Mario Rossi <Dandelionapi@mailinator.com>
c.token = "YOUR-TEST-TOKEN"
c.endpoint = "https://api.dandelion.eu/"
c.path = "datatxt/"
c.path = "datatxt"
end
end

Expand All @@ -41,7 +41,7 @@

it "make a request to li using a blog url" do
element = Dandelionapi::LanguageDetection::Request.new
response = element.analyze(url: "http://blog.andreamostosi.name")
response = element.analyze(url: "https://www.cambridgeenglish.org/blog")
expect(response).not_to be_empty
expect(response["detectedLangs"]).to be_an_instance_of(Array)
response["detectedLangs"].each do |a|
Expand Down
4 changes: 2 additions & 2 deletions spec/sentiment_analysis_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# account: Mario Rossi <datatxt@mailinator.com>
c.token = "YOUR-TEST-TOKEN"
c.endpoint = "https://api.dandelion.eu/"
c.path = "datatxt/"
c.path = "datatxt"
end
end

Expand All @@ -40,7 +40,7 @@

it "make a request to sent using a blog url" do
element = Dandelionapi::SentimentAnalysis::Request.new
response = element.analyze(url: "http://blog.andreamostosi.name")
response = element.analyze(url: "https://www.cambridgeenglish.org/blog")
expect(response).not_to be_empty
expect(response["sentiment"]).not_to be_empty
expect(response["sentiment"]["score"]).to be >= -1.0
Expand Down
2 changes: 1 addition & 1 deletion spec/text_similarity_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# account: Mario Rossi <datatxt@mailinator.com>
c.token = "YOUR-TEST-TOKEN"
c.endpoint = "https://api.dandelion.eu/"
c.path = "datatxt/"
c.path = "datatxt"
end
end

Expand Down