From f0b1a3e520384b1200f565b9c353d5c3b3da00e3 Mon Sep 17 00:00:00 2001 From: Shounak Date: Thu, 16 Jan 2020 00:21:55 +0530 Subject: [PATCH 1/3] Update sentiment.jl --- src/sentiment.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sentiment.jl b/src/sentiment.jl index 925e8e0c..2caf8be9 100644 --- a/src/sentiment.jl +++ b/src/sentiment.jl @@ -8,7 +8,10 @@ function pad_sequences(l, maxlen=500) push!(res, ele) end return res - end + + else + print("Not Possible to have string length greater than maximum length") + end end function read_weights(filename=sentiment_weights) From a190c9c9475255b595b737df37d275166d879cae Mon Sep 17 00:00:00 2001 From: Shounak Date: Sat, 18 Jan 2020 12:01:16 +0530 Subject: [PATCH 2/3] Update sentiment.jl --- src/sentiment.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sentiment.jl b/src/sentiment.jl index 2caf8be9..94fc96ff 100644 --- a/src/sentiment.jl +++ b/src/sentiment.jl @@ -8,10 +8,12 @@ function pad_sequences(l, maxlen=500) push!(res, ele) end return res - else - print("Not Possible to have string length greater than maximum length") - end + throw(1) + print("String exceeds maximum length") + end + + end end function read_weights(filename=sentiment_weights) From 63ddb7c210fa418270ad2ed019765436f9c56e95 Mon Sep 17 00:00:00 2001 From: Shounak Date: Sun, 23 Feb 2020 00:08:04 +0530 Subject: [PATCH 3/3] Update sentiment.jl --- src/sentiment.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sentiment.jl b/src/sentiment.jl index 94fc96ff..e50ac41f 100644 --- a/src/sentiment.jl +++ b/src/sentiment.jl @@ -9,11 +9,8 @@ function pad_sequences(l, maxlen=500) end return res else - throw(1) - print("String exceeds maximum length") + length(1) > maxlen || throw("String length exceeds maximum length") end - - end end function read_weights(filename=sentiment_weights)