diff --git a/kb/src/main/java/amie/data/KB.java b/kb/src/main/java/amie/data/KB.java index d899938..99b6aaa 100644 --- a/kb/src/main/java/amie/data/KB.java +++ b/kb/src/main/java/amie/data/KB.java @@ -3741,9 +3741,13 @@ public static int[] triple(CharSequence... triple) { public static final Pattern triplePattern = Pattern .compile("(\\w+)\\((\\??\\w+)\\s*,\\s*(\\??\\w+)\\)"); + private static final String uriPattern = "?"; + /** We do not still support typed literals **/ + private static final String literalPattern = "\\\"?[-._\\p{L}\\s,'–:/]+\\\"?(@\\w+)?"; + /** Pattern of a triple */ public static final Pattern amieTriplePattern = Pattern - .compile("(\\??\\w+|<[-_\\w\\p{L}/:–'.\\(\\),]+>)\\s+(?)\\s+(\"?[-_\\w\\s,'.–:]+\"?(@\\w+)?|\\??\\w+|?)"); + .compile("(\\?\\w+|" + uriPattern + ")\\s+(\\\\??\\\\w+|" + uriPattern + ")\\s+(" + literalPattern + "|\\?\\w+|" + uriPattern + ")"); /** diff --git a/mining/src/main/java/amie/mining/AMIE.java b/mining/src/main/java/amie/mining/AMIE.java index bf52e6c..6399c63 100644 --- a/mining/src/main/java/amie/mining/AMIE.java +++ b/mining/src/main/java/amie/mining/AMIE.java @@ -1115,6 +1115,7 @@ public static AMIE getInstance(String[] args) default: metric = Metric.HeadCoverage; System.err.println("Using " + metric + " as pruning metric with threshold " + minHeadCover); + minMetricValue = minHeadCover; break; } } else {