From: <seb...@us...> - 2012-03-14 17:27:24
|
Revision: 3610 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3610&view=rev Author: sebastianwtr Date: 2012-03-14 17:27:16 +0000 (Wed, 14 Mar 2012) Log Message: ----------- [tbsl exploration] added some functions Modified Paths: -------------- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Index/Index_utils.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Index/SQLiteIndex.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/Hypothesis.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/SparqlObject.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/TemplateBuilder.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/GetRessourcePropertys.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/Levenshtein.java trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/exploration_main/testClass_new.java Removed Paths: ------------- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/SparqlFilter.java Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Index/Index_utils.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Index/Index_utils.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Index/Index_utils.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -50,7 +50,113 @@ return result_List; } + + +public static ArrayList<String> searchIndexForResource(String string, SQLiteIndex myindex) throws SQLException{ + + string=string.replace("_", " "); + string=string.replace("-", " "); + string=string.replace(".", " "); + String result=null; + ArrayList<String> result_List = new ArrayList<String>(); + result=myindex.getResourceURI(string.toLowerCase()); + if(result!=null){ + result_List.add(result); + } + else{ + ArrayList<String> tmp_List = new ArrayList<String>(); + String[] array_tmp= string.split(" "); + for(String s : array_tmp){ + if(s.length()>4) tmp_List=myindex.getResourceURILike(s.toLowerCase(), string.toLowerCase()); + for(String st : tmp_List){ + result_List.add(st); + } + } + + } + + + return result_List; + } + +public static ArrayList<String> searchIndexForProperty(String string, SQLiteIndex myindex) throws SQLException{ + string=string.replace("_", " "); + string=string.replace("-", " "); + string=string.replace(".", " "); + String result=null; + ArrayList<String> result_List = new ArrayList<String>(); + result=myindex.getPropertyURI(string.toLowerCase()); + if(result!=null){ + result_List.add(result); + } + else{ + result_List.add("http://dbpedia.org/ontology/"+string.toLowerCase().replace(" ", "_")); + } + + + + return result_List; } + + + +public static ArrayList<String> searchIndexForClass(String string, SQLiteIndex myindex) throws SQLException{ + + /* + * TODO: also return a rank, if you find a direct match, give back 1, if you find a part match, give back for example 0.3 if you have a string you can split in 3 + */ + string=string.replace("_", " "); + string=string.replace("-", " "); + string=string.replace(".", " "); + String tmp1=null; + String tmp2 = null; + ArrayList<String> result_List = new ArrayList<String>(); + + tmp1=myindex.getontologyClassURI(string.toLowerCase()); + tmp2=myindex.getYagoURI(string.toLowerCase()); + if(tmp1!=null){ + result_List.add(tmp1); + } + else{ + ArrayList<String> tmp_List = new ArrayList<String>(); + String[] array_tmp= string.split(" "); + for(String s : array_tmp){ + if(s.length()>4) tmp_List=myindex.getontologyClassURILike(s.toLowerCase(),string.toLowerCase()); + for(String st : tmp_List){ + result_List.add(st); + } + } + + } + + + if(tmp2!=null) { + result_List.add(tmp2); + } + /* + * if nothing is found, also try the like operator for each part of the string + */ + else{ + ArrayList<String> tmp_List = new ArrayList<String>(); + String[] array_tmp= string.split(" "); + for(String s : array_tmp){ + if(s.length()>4) tmp_List=myindex.getYagoURILike(s.toLowerCase(),string.toLowerCase()); + for(String st : tmp_List){ + result_List.add(st); + } + } + + } + + + + return result_List; + } + + + + +} Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Index/SQLiteIndex.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Index/SQLiteIndex.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Index/SQLiteIndex.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -13,11 +13,13 @@ import java.sql.Statement; import java.util.ArrayList; +import org.dllearner.algorithm.tbsl.exploration.Utils.Levenshtein; import org.dllearner.algorithm.tbsl.nlp.StanfordLemmatizer; public class SQLiteIndex { private Connection conn; StanfordLemmatizer lemma; + double lim_levensthein=0.84; public SQLiteIndex() throws ClassNotFoundException, SQLException { // TODO Auto-generated constructor stub @@ -63,17 +65,20 @@ } - public ArrayList<String> getResourceURILike(String string) throws SQLException{ + public ArrayList<String> getResourceURILike(String string, String original_string) throws SQLException{ /* while(rs.next()) {*/ Statement stat = conn.createStatement(); ResultSet rs; ArrayList<String> result= new ArrayList<String>(); try { - rs = stat.executeQuery("select uri from resource where name like'"+string.toLowerCase()+"%';"); + rs = stat.executeQuery("select * from resource where name like'"+string.toLowerCase()+"%';"); while(rs.next()){ - System.out.println("Next: "+rs.getString("uri")); - result.add(rs.getString("uri")); + if(Levenshtein.nld(rs.getString("name"), original_string)>lim_levensthein){ + result.add(rs.getString("uri")); + System.out.print(rs.getString("name")); + System.out.print(" "+rs.getString("uri")+"\n"); + } } return result; } catch (Exception e) { @@ -84,17 +89,21 @@ } - public ArrayList<String> getYagoURILike(String string) throws SQLException{ + public ArrayList<String> getYagoURILike(String string, String original_string) throws SQLException{ /* while(rs.next()) {*/ Statement stat = conn.createStatement(); ResultSet rs; ArrayList<String> result= new ArrayList<String>(); try { - rs = stat.executeQuery("select uri from yago where name like'"+string.toLowerCase()+"%';"); + rs = stat.executeQuery("select * from yago where name like'"+string.toLowerCase()+"%';"); while(rs.next()){ - System.out.println("Next: "+rs.getString("uri")); - result.add(rs.getString("uri")); + //System.out.println("Next: "+rs.getString("uri")); + if(Levenshtein.nld(rs.getString("name"), original_string)>lim_levensthein){ + result.add(rs.getString("uri")); + System.out.print(rs.getString("name")); + System.out.print(" "+rs.getString("uri")+"\n"); + } } return result; } catch (Exception e) { @@ -167,15 +176,18 @@ } - public ArrayList<String> getontologyClassURILike(String string) throws SQLException{ + public ArrayList<String> getontologyClassURILike(String string, String original_string) throws SQLException{ Statement stat = conn.createStatement(); ResultSet rs; ArrayList<String> result= new ArrayList<String>(); try { - rs = stat.executeQuery("select uri from ontologyClass where name like'"+string.toLowerCase()+"%';"); + rs = stat.executeQuery("select * from ontologyClass where name like'"+string.toLowerCase()+"%';"); while(rs.next()){ - System.out.println("Next: "+rs.getString("uri")); - result.add(rs.getString("uri")); + if(Levenshtein.nld(rs.getString("name"), original_string)>lim_levensthein){ + result.add(rs.getString("uri")); + System.out.print(rs.getString("name")); + System.out.print(" "+rs.getString("uri")+"\n"); + } } return result; } catch (Exception e) { Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/Hypothesis.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/Hypothesis.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/Hypothesis.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -1,6 +1,5 @@ package org.dllearner.algorithm.tbsl.exploration.Sparql; -import edu.stanford.nlp.io.EncodingPrintWriter.out; public class Hypothesis { private String variable; Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/SparqlObject.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/SparqlObject.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/SparqlObject.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -1780,7 +1780,7 @@ /* * Third try lemmatised with like */ - ArrayList<String> tmp=myindex.getResourceURILike(lemmatiser.stem(string.toLowerCase())); + ArrayList<String> tmp=myindex.getResourceURILike(lemmatiser.stem(string.toLowerCase()),string); double highestNLD=0; String bestWord=""; try{ @@ -1830,7 +1830,7 @@ /* * Third try lemmatised with like */ - ArrayList<String> tmp=myindex.getontologyClassURILike(lemmatiser.stem(string.toLowerCase())); + ArrayList<String> tmp=myindex.getontologyClassURILike(lemmatiser.stem(string.toLowerCase()),string); double highestNLD=0; String bestWord=""; try{ @@ -1866,7 +1866,7 @@ /* * Third try lemmatised with like */ - ArrayList<String> tmp=myindex.getYagoURILike(lemmatiser.stem(string.toLowerCase())); + ArrayList<String> tmp=myindex.getYagoURILike(lemmatiser.stem(string.toLowerCase()),string); double highestNLD=0; String bestWord=""; try{ Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/TemplateBuilder.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/TemplateBuilder.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Sparql/TemplateBuilder.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -161,7 +161,10 @@ */ //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Template template = new Template(condition, having, filter, selectTerm,OrderBy, limit,question); - //TODO: Iterate over slots + + boolean add_reverse_template = true; + + ArrayList<Hypothesis> list_of_hypothesis = new ArrayList<Hypothesis>(); for(Slot slot : bqt.getSlots()){ //System.out.println("Slot: "+slot.toString()); @@ -169,9 +172,26 @@ String tmp= slot.toString().replace(" UNSPEC {", ""); tmp=tmp.replace("}",""); String[] tmp_array = tmp.split(":"); - Hypothesis tmp_hypothesis = new Hypothesis("?"+tmp_array[0],tmp_array[1], tmp_array[1], "UNSPEC", 0); - //tmp_hypothesis.printAll(); - list_of_hypothesis.add(tmp_hypothesis); + for(ArrayList<String> x : condition){ + if(x.get(1).equals("isA") && x.get(2).equals("?"+tmp_array[0])){ + Hypothesis tmp_hypothesis = new Hypothesis("?"+tmp_array[0],tmp_array[1], tmp_array[1], "ISA", 0); + //tmp_hypothesis.printAll(); + list_of_hypothesis.add(tmp_hypothesis); + + /* + * if you have already found an isA -Class-Pair, you dont have to creat the up-side-down, because it will be false + */ + add_reverse_template = false; + } + /* + * Make sure you dont have the case that a class is left of an isA + */ + else if (!x.get(1).equals("isA") && x.get(0).equals("?"+tmp_array[0])){ + Hypothesis tmp_hypothesis = new Hypothesis("?"+tmp_array[0],tmp_array[1], tmp_array[1], "UNSPEC", 0); + //tmp_hypothesis.printAll(); + list_of_hypothesis.add(tmp_hypothesis); + } + } } if(slot.toString().contains("PROPERTY")){ String tmp= slot.toString().replace(" PROPERTY {", ""); @@ -193,13 +213,18 @@ //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for(Hypothesis x : list_of_hypothesis){ - if(x.getType().contains("RESOURCE")|| x.getType().contains("UNSPEC") ){ + /* + * TODO: Change if ISA only ask classes, else resource + */ + if(x.getType().contains("RESOURCE")|| x.getType().contains("UNSPEC")|| x.getType().contains("ISA") ){ ArrayList<String> result= new ArrayList<String>(); try { - /* here I have to check the hypothesis if I have an isA in my Condition, - * if so, only look up Yago and OntologyClass. - */ - result = Index_utils.searchIndex(x.getUri(), 3, myindex); + if(x.getType().contains("ISA")){ + result = Index_utils.searchIndexForClass(x.getUri(), myindex); + } + else{ + result = Index_utils.searchIndexForResource(x.getUri(), myindex); + } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -252,7 +277,7 @@ result.add(hm.get(h.getUri().toLowerCase())); } else{ - result = Index_utils.searchIndex(h.getUri(), 1, myindex); + result = Index_utils.searchIndexForProperty(h.getUri(), myindex); if(!result.isEmpty())hm.put(h.getUri().toLowerCase(),result.get(0)); } if(!result.isEmpty()){ @@ -260,12 +285,12 @@ h.setRank(1); } - else{ + /* else{ String tmp = "http://dbpedia.org/ontology/"+h.getUri().toLowerCase().replace(" ", "_"); h.setUri(tmp); h.setRank(0); - } + }*/ } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -278,18 +303,18 @@ - //TODO: Take Template like it is and change Condition Template template_reverse_conditions = new Template(template.getCondition(), template.getHaving(), template.getFilter(), template.getSelectTerm(), template.getOrderBy(), template.getLimit(), template.getQuestion()); - //= template; ArrayList<ArrayList<String>> condition_template_reverse_conditions = template_reverse_conditions.getCondition(); ArrayList<ArrayList<String>> condition_reverse_new= new ArrayList<ArrayList<String>>(); - for (ArrayList<String> x : condition_template_reverse_conditions){ - ArrayList<String> new_list = new ArrayList<String>(); - new_list.add(x.get(2)); - new_list.add(x.get(1)); - new_list.add(x.get(0)); - condition_reverse_new.add(new_list); + if(add_reverse_template){ + for (ArrayList<String> x : condition_template_reverse_conditions){ + ArrayList<String> new_list = new ArrayList<String>(); + new_list.add(x.get(2)); + new_list.add(x.get(1)); + new_list.add(x.get(0)); + condition_reverse_new.add(new_list); + } } long stop = System.currentTimeMillis(); @@ -303,7 +328,7 @@ template_reverse_conditions.setHypothesen(template.getHypothesen()); resultArrayList.add(template); - resultArrayList.add(template_reverse_conditions); + if(add_reverse_template) resultArrayList.add(template_reverse_conditions); } } /*for(Template temp : resultArrayList){ Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/GetRessourcePropertys.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/GetRessourcePropertys.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/GetRessourcePropertys.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -1,18 +1,12 @@ package org.dllearner.algorithm.tbsl.exploration.Utils; import java.io.BufferedReader; -import java.io.File; -import java.io.FileWriter; import java.io.IOException; -import java.io.InputStream; import java.io.InputStreamReader; -import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; public class GetRessourcePropertys { Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/Levenshtein.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/Levenshtein.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/Levenshtein.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -2,7 +2,6 @@ import java.lang.Math; -import java.math.BigDecimal; public class Levenshtein { @@ -12,10 +11,8 @@ //System.out double length=Math.max(orig.length(),eing.length()); - //if distance between both is zero, then the NLD must be one - //but because they are equal, return a very high value, so that that query will be taken. if(result==0.0 ){ - return 10.0; + return 1.0; } else{ Deleted: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/SparqlFilter.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/SparqlFilter.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/Utils/SparqlFilter.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -1,54 +0,0 @@ -package org.dllearner.algorithm.tbsl.exploration.Utils; - -import java.util.HashMap; - -public class SparqlFilter { - public void create_Sparql_who(String string,HashMap<String, String> hm){ - // string=string.replaceAll("?", ""); - String[] array= string.split(" "); - //schauen ob erstes Wort ein who ist! - if(array[0].contains("who")){ - int position=0; - for(int i=0;i<array.length;i++){ - if (array[i].contains("of")){ - position=i; - break; - } - } - String vor_of=array[position-1]; - String nach_of=""; - //wenn nur ein element hinter of kommt - if(array.length-position-1==1){ - nach_of=array[position+1]; - } - else{ - for(int i=position+1; i<array.length;i++){ - //nach_of=nach_of+array[i]+" "; - nach_of=(nach_of.concat(array[i])).concat(" "); - } - - //letztes leerzeichen loeschen - nach_of = nach_of.substring(0, nach_of.length()-1); - } - String uri_vor_of=" "; - String uri_nach_of=" "; - - uri_vor_of=hm.get(vor_of); - uri_nach_of=hm.get(nach_of); - if(uri_vor_of!=null && uri_nach_of!=null){ - uri_nach_of=uri_nach_of.replace("Category:", ""); - uri_nach_of=uri_nach_of.replace("category:", ""); - - - String anfrage=null; - anfrage="PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>select ?x where { <"+uri_nach_of+"> <"+uri_vor_of+"> ?x.}"; - - } - else{ - //System.out.println("Nothing to do"); - } - - } - - } -} Modified: trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/exploration_main/testClass_new.java =================================================================== --- trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/exploration_main/testClass_new.java 2012-03-13 10:19:10 UTC (rev 3609) +++ trunk/components-ext/src/main/java/org/dllearner/algorithm/tbsl/exploration/exploration_main/testClass_new.java 2012-03-14 17:27:16 UTC (rev 3610) @@ -32,38 +32,60 @@ TemplateBuilder testobject = new TemplateBuilder(); - String dateiname = "/home/swalter/Dokumente/Auswertung/"; + String filepath = "/home/swalter/Dokumente/Auswertung/"; + //String file="very_small.xml"; + String file="dbpedia-train.xml"; long start = System.currentTimeMillis(); //String question = "Is the wife of president Obama called Michelle?"; - /*String question = "Which bridges are of the same type as the Manhattan Bridge?"; - temp_list_result=testobject.createTemplates(question);*/ + String question = "Who is the mayor of Berlin?"; + temp_list_result=testobject.createTemplates(question); + for(Template t : temp_list_result){ + t.printAll(); + } ArrayList<queryInformation> list_of_structs = new ArrayList<queryInformation>(); - //if you dont want to use the hints in the questions, use false - list_of_structs=generateStruct(dateiname+"XMLDateien/dbpedia-train_small.xml"); - System.out.println("Start Templating"); + + /* + * Generate Templates + */ + /*list_of_structs=generateStruct(filepath+"XMLDateien/"+file); for(queryInformation s : list_of_structs){ - System.out.println("In For Schleife"); ArrayList<Template> temp_list = new ArrayList<Template>(); temp_list=testobject.createTemplates(s.getQuery().replace("<[CDATA[", "").replace("]]>", "")); for(Template t : temp_list){ temp_list_result.add(t); } - } + }*/ + /* + * Get Elements for Each Resource and Class + */ + long stop = System.currentTimeMillis(); System.out.println("Duration in ms: " + (stop - start)); - - String result =""; + + /* + * Write Results in File + */ + writeTemplatesInFile(temp_list_result,filepath,file,start,stop ); + + } + + + private static void writeTemplatesInFile(ArrayList<Template> temp_list_result, String filepath,String given_file, float start, float stop ) throws IOException{ + File file = new File(filepath+"Ausgabe"+stop+given_file.replace(".xml", "")+".txt"); + BufferedWriter bw = new BufferedWriter(new FileWriter(file)); + int anzahl1 =1; for(Template t: temp_list_result){ //t.printAll(); + String result =""; result+="###### Template ######\n"; result+="question: "+t.getQuestion()+"\n"; result+="condition: "+t.getCondition()+"\n"; @@ -91,24 +113,24 @@ result+="Overalltime: "+t.getOverallTime()+"ms\n"; result+="Time for Templator: "+t.getTime_Templator()+"ms\n"; result+="////////////////////////////////////////////////////////////////////\n\n\n"; + bw.write(result+"\n"); + //bw.flush(); + System.out.println("Done "+anzahl1); + anzahl1 +=1; + } - + String result=""; result+="Time over generating All Templates: "+(stop-start)+"ms\n"; result+="Average Time for one Template: "+((stop-start)/temp_list_result.size())+"ms\n"; result+="Overall created Templates: "+temp_list_result.size(); //System.out.println(result); - File file = new File(dateiname+"Ausgabe"+stop+".txt"); - BufferedWriter bw = new BufferedWriter(new FileWriter(file)); bw.write(result); bw.flush(); bw.close(); - } - - private static ArrayList<queryInformation> generateStruct(String filename) { System.out.println("In generate Struct"); String XMLType=null; @@ -158,13 +180,13 @@ } ArrayList<queryInformation> querylist = new ArrayList<queryInformation>(); if(string.contains("</question><question")){ - System.out.println("true"); + //System.out.println("true"); } else System.out.println("false"); String [] bla = string.split("</question><question"); - System.out.println(bla.length); + //System.out.println(bla.length); for(String s : bla){ - System.out.println("in bla"); + //System.out.println("in bla"); String query=""; String type=""; boolean fusion=false; @@ -181,7 +203,7 @@ Pattern p2= Pattern.compile(".*><string>(.*)"); Matcher m2 = p2.matcher(m1.group(1)); while(m2.find()){ - System.out.println("Query: "+ m2.group(1)); + //System.out.println("Query: "+ m2.group(1)); query=m2.group(1).replace("<![CDATA[", ""); query=query.replace("CDATA", ""); query=query.replace("CDATA", ""); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |