diff options
-rw-r--r-- | nbproject/genfiles.properties | 4 | ||||
-rw-r--r-- | src/main/Analyzor.java | 20 |
2 files changed, 19 insertions, 5 deletions
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index cc698f1..a2b5530 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -4,5 +4,5 @@ build.xml.stylesheet.CRC32=8064a381@1.68.1.46 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=e2d66212 -nbproject/build-impl.xml.script.CRC32=5a37ea3f -nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.2.48 +nbproject/build-impl.xml.script.CRC32=ae9729a9 +nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46 diff --git a/src/main/Analyzor.java b/src/main/Analyzor.java index 8f11186..050d5c3 100644 --- a/src/main/Analyzor.java +++ b/src/main/Analyzor.java @@ -76,12 +76,24 @@ public class Analyzor { }
}
+ //sets the pointer before the first element of the dataset
+ void goToFirstRow(){
+ try{
+ data.beforeFirst();
+ }
+ catch(SQLException ex){
+ System.err.print("something went wrong with the dataset: SQLException");
+ return;
+ }
+ catch(NullPointerException ex){
+ System.err.print("dataset is null, try querying first");
+ return;
+ }
+ }
//analyzes the tweet on their positivity
//this is just a base version
void sentimentAnalysis() {
-
-
-
+ //read the lexicons
try{
readLexicon();
}
@@ -89,6 +101,8 @@ public class Analyzor { System.out.println("could not find the lexicons, please try again");
return;
}
+ //go to the start of te dataset
+ goToFirstRow();
Double value;
String text;
|