diff --git a/src/main/java/nlp/seriesSummary/ArcSummaryServer.java b/src/main/java/nlp/seriesSummary/ArcSummaryServer.java index fdabfbf..4559ede 100644 --- a/src/main/java/nlp/seriesSummary/ArcSummaryServer.java +++ b/src/main/java/nlp/seriesSummary/ArcSummaryServer.java @@ -37,6 +37,7 @@ public class ArcSummaryServer { public ArcSummaryServer(int serverPort) throws IOException { this.serverPort = serverPort; + System.out.println(String.format("Arc Summary started at port %d", serverPort)); try { necessaryWordPredicate = new RemoveStopWordsPredicate("stopWords.txt"); } catch (IOException e) { diff --git a/src/main/java/nlp/seriesSummary/BaseArcSummarizer.java b/src/main/java/nlp/seriesSummary/BaseArcSummarizer.java index f1ae0cc..2565bfd 100644 --- a/src/main/java/nlp/seriesSummary/BaseArcSummarizer.java +++ b/src/main/java/nlp/seriesSummary/BaseArcSummarizer.java @@ -617,7 +617,9 @@ public Map> getSegmentIndexByClusterId() { private String parseVideoAddress(String videoAddress) { String[] split = videoAddress.split("\\\\"); - String[] secondSplit = split[split.length - 1].split("\\."); + String[] split2 = videoAddress.split("/"); + String[] maxSplit = split.length >= split2.length ? split : split2; + String[] secondSplit = maxSplit[maxSplit.length - 1].split("\\."); return secondSplit[0]; } diff --git a/src/main/java/utils/FFMpegVideoApi.java b/src/main/java/utils/FFMpegVideoApi.java index 3e13699..5715579 100644 --- a/src/main/java/utils/FFMpegVideoApi.java +++ b/src/main/java/utils/FFMpegVideoApi.java @@ -110,7 +110,10 @@ public static void concat(List videosAddress, String outputAddress) thro } private static String addQuotingToString(String s) { - return '"' + s + '"'; + if (System.getProperty("os.name").toLowerCase().contains("windows")) { + return '"' + s + '"'; + } + return s; } public static void main(String[] args) throws IOException {