Skip to content

Commit

Permalink
update arc summary to linux
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroCristovao-Movai committed Apr 4, 2021
1 parent a5c2b4c commit 2bd90bb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/java/nlp/seriesSummary/ArcSummaryServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/nlp/seriesSummary/BaseArcSummarizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,9 @@ public Map<Integer, List<Integer>> 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];
}

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/utils/FFMpegVideoApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ public static void concat(List<String> 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 {
Expand Down

0 comments on commit 2bd90bb

Please sign in to comment.