Skip to content

Commit e0c419f

Browse files
author
Frank Natividad
committed
Changed negative text for sentiment analysis
1 parent ec0dcce commit e0c419f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

language/spec/language_samples_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ def capture &block
4545

4646
example "sentiment from text" do
4747
positive_text = "Matz is nice so we are nice"
48-
negative_text = "I am angry. I hate things."
48+
negative_text = "I don't like you. I hate things."
4949

5050
expect {
5151
sentiment_from_text project_id: @project_id, text_content: positive_text
5252
}.to output(/^1.0 /).to_stdout
5353

5454
expect {
5555
sentiment_from_text project_id: @project_id, text_content: negative_text
56-
}.to output(/^0.1/).to_stdout
56+
}.to output(/^-1.0 /).to_stdout
5757
end
5858

5959
example "sentiment from a file stored in Google Cloud Storage" do
6060
upload "positive_text.txt", "Matz is nice so we are nice"
61-
upload "negative_text.txt", "I am angry. I hate things."
61+
upload "negative_text.txt", "I don't like you. I hate things."
6262

6363
expect {
6464
sentiment_from_cloud_storage_file(
@@ -72,7 +72,7 @@ def capture &block
7272
project_id: @project_id,
7373
storage_path: "gs://#{@bucket_name}/negative_text.txt"
7474
)
75-
}.to output(/^0.1/).to_stdout
75+
}.to output(/^-1.0 /).to_stdout
7676
end
7777

7878
example "entries from text" do

0 commit comments

Comments
 (0)