Skip to content

Commit

Permalink
Merge branch 'dev10.4' into package-reference-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaStere42 authored Sep 4, 2024
2 parents 6f5dc64 + f8e1b48 commit bbfe005
Show file tree
Hide file tree
Showing 28 changed files with 22 additions and 9,599 deletions.
35 changes: 4 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>5.1.2</version>
<version>5.21.0</version>
</dependency>

<!-- Dependencies related to prometheus. -->
Expand Down Expand Up @@ -146,7 +146,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
<version>1.5.7</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -269,7 +269,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20131018</version>
<version>20240303</version>
</dependency>

<!--Start
Expand Down Expand Up @@ -515,33 +515,6 @@
<version>0.6.1</version>
</dependency>

<!-- dependencies for Stanford NLP -->
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-corenlp</artifactId>
<version>3.9.1</version>
<exclusions>
<exclusion>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- streamlined and smaller SUTime only Stanford CoreNLP model JAR in the local repo-->
<dependency>
<groupId>sutime-stanford-corenlp-models</groupId>
<artifactId>sutime-stanford-corenlp-models</artifactId>
<version>3.6.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/edu.stanford.nlp/stanford-parser -->
<dependency>
<groupId>edu.stanford.nlp</groupId>
<artifactId>stanford-parser</artifactId>
<version>3.9.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/nz.ac.waikato.cms.weka/weka-stable -->
<dependency>
<groupId>nz.ac.waikato.cms.weka</groupId>
Expand Down Expand Up @@ -695,4 +668,4 @@
<url>https://maven.pkg.github.com/WildbookOrg/Wildbook</url>
</repository>
</distributionManagement>
</project>
</project>
7 changes: 4 additions & 3 deletions src/main/java/org/ecocean/TwitterBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.ArrayList;
import java.util.List;
import org.ecocean.ai.nmt.azure.DetectTranslate;
import org.ecocean.ai.utilities.ParseDateLocation;
import org.ecocean.ia.IA;
import org.ecocean.ia.Task;
import org.ecocean.media.MediaAsset;
Expand Down Expand Up @@ -562,9 +561,11 @@ private static void updateEncounter(MediaAsset tweetMA, ArrayList<Annotation> an
if ((originTweet == null) || (anns == null)) return;
String tx = taxonomyStringFromTweet(originTweet, myShepherd.getContext());

// ParseDateLocation has been deprecated
// use NLP to get Date/Location if available in Tweet
String newDetectedDate = ParseDateLocation.parseDate(rootDir, myShepherd.getContext(),
originTweet);
// String newDetectedDate = ParseDateLocation.parseDate(rootDir, myShepherd.getContext(), originTweet);
String newDetectedDate = null;

for (Annotation ann : anns) {
Encounter enc = ann.findEncounter(myShepherd);
if (enc == null) continue;
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/ecocean/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,9 @@ public static boolean stringExists(String str) {
return (str != null && !str.trim().equals("") && !str.toLowerCase().equals("none") &&
!str.toLowerCase().equals("unknown"));
}
public static boolean stringIsEmptyOrNull(String str) {
return ((str == null) || str.equals(""));
}

public static boolean stringsEqualish(String s1, String s2) {
if (!stringExists(s1)) {
Expand Down
Loading

0 comments on commit bbfe005

Please sign in to comment.