Giter Club home page Giter Club logo

cleversearch's People

Contributors

kpitolin avatar sonia-ghabi avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cleversearch's Issues

Build path

Configure your own buil path

It's not efficient but do this to build the project
capture d ecran 2014-11-09 a 10 43 56
capture d ecran 2014-11-09 a 10 44 08

Synchro to be sure

org.json.simple.JSONObject jsonObj1 = explorer.exploreSimiliratyFromCSV("extendedGraph"
                + separator + "matriceSimilarite.csv", 0, 0.02,searchDatas);

Cette méthode là pour le moment retourne un objet JSON qui m'est utile que pour faire le graphe dessin avec les boules et les traits.
Nous avons dit que nous ferons appel 3 fois à cette méthode avec des plages de seuils différents donc 3 objet JSON pour 3 graphes dessin différents.

Maintenant pour la liste pages similaires à une autre on a pensé à une structure de données style MAP où la clé serait une page et l'objet associé serait une liste de page qui sont similaire à la clé.

Du coup je ne sais pas si c'est toujours dans la méthode exploreSimilarityFromCSV que tu fais tous ça en même temps mais à la fin du service: launchSearch() j'imagine qu'en envoie en retour une liste d' AnalyseResults ayant chacun un attribut objJSON et l'autre attribut c'est la map.

Cela change le code actuel de la classe AnalyseResults :

public class AnalyseResults {
    public ArrayList<SearchData> pagesResults;
    public JSONObject objJSON ;

    public AnalyseResults(){
        pagesResults= new ArrayList<SearchData>();
    }

    public AnalyseResults(ArrayList<SearchData> pR, JSONObject obj){
        pagesResults= pR;
        objJSON = obj;
    }
}

par un truc un peu comme ça

public class AnalyseResults {
    public Map<searchData,List<SearchData> pagesResults;
    public JSONObject objJSON ;
}

Ok ? Parce que moi après du coté de la servlet je code comme si ce qui est récupéré du service c'est ça.

Invalid matrice

I think now the matrice created is invalid. I didn't check it out in detail.

capture d ecran 2014-11-06 a 01 07 59

Configure this project (MAVEN)

Read this to configure your project

I put the screenshots to help you come throught the steps.

capture d ecran 2014-11-06 a 22 57 12
capture d ecran 2014-11-06 a 22 57 20
capture d ecran 2014-11-06 a 22 57 26
capture d ecran 2014-11-06 a 22 57 39
capture d ecran 2014-11-06 a 22 57 50

Right-Click on the project folder

capture d ecran 2014-11-06 a 22 58 06

Right-Click on the src folder

capture d ecran 2014-11-06 a 22 58 25

Regex for uri

I think with this I loose lots of URIs :

if (isGoodUrl( uri) && !uri.contains(" ") && !uri.equals("") && !uri.contains("%")){
                    keywordAndValues.add(uri);
                }

Exploration problems

Now week-end have another problem :

<http://en.wikipedia.org/wiki/Barack_Obama>
        <http://dbpedia.org/resource/Attention>
                <http://dbpedia.org/resource/Attention> ;
        <http://dbpedia.org/resource/Barack_Obama>
                <http://dbpedia.org/resource/Barack_Obama> ;
        <http://dbpedia.org/resource/California_Democratic_Party>
                <http://dbpedia.org/resource/California_Democratic_Party> ;
        <http://dbpedia.org/resource/Illinois>
                <http://dbpedia.org/resource/Illinois> ;
        <http://dbpedia.org/resource/Illmatic>
                <http://dbpedia.org/resource/Illmatic> ;
        <http://dbpedia.org/resource/Marching_band>
                <http://dbpedia.org/resource/Marching_band> ;
        <http://dbpedia.org/resource/Military_campaign>
                <http://dbpedia.org/resource/Military_campaign> ;
        <http://dbpedia.org/resource/National_security>
                <http://dbpedia.org/resource/National_security> ;
        <http://dbpedia.org/resource/United_States_Senate>
                <http://dbpedia.org/resource/United_States_Senate> .
<http://fr.wikipedia.org/wiki/Barack_Obama>
        <http://dbpedia.org/resource/Barack_Obama>
                <http://dbpedia.org/resource/Barack_Obama> ;
        <http://dbpedia.org/resource/Honolulu>
                <http://dbpedia.org/resource/Honolulu> .
<http://www.barackobama.com/>
        <http://dbpedia.org/resource/Americans>
                <http://dbpedia.org/resource/Americans> ;
        <http://dbpedia.org/resource/Grassroots>
                <http://dbpedia.org/resource/Grassroots> ;
        <http://dbpedia.org/resource/Heard_Island_and_McDonald_Islands>
                <http://dbpedia.org/resource/Heard_Island_and_McDonald_Islands> ;
        <http://dbpedia.org/resource/Ordinary>
                <http://dbpedia.org/resource/Ordinary> ;
        <http://dbpedia.org/resource/Star_Trek:_The_Next_Generation>
                <http://dbpedia.org/resource/Star_Trek:_The_Next_Generation> ;
        <http://dbpedia.org/resource/Training>
                <http://dbpedia.org/resource/Training> ;
        <http://dbpedia.org/resource/University_of_Washington>
                <http://dbpedia.org/resource/University_of_Washington> ;
        <http://dbpedia.org/resource/Voice_acting>
                <http://dbpedia.org/resource/Voice_acting> ;
        <http://dbpedia.org/resource/Work_of_art>
                <http://dbpedia.org/resource/Work_of_art> .
<http://www.whitehouse.gov/administration/president-obama>
        <http://dbpedia.org/resource/August_4>
                <http://dbpedia.org/resource/August_4> ;
        <http://dbpedia.org/resource/Father>
                <http://dbpedia.org/resource/Father> ;
        <http://dbpedia.org/resource/Grandparent>
                <http://dbpedia.org/resource/Grandparent> ;
        <http://dbpedia.org/resource/Kansas>
                <http://dbpedia.org/resource/Kansas> ;
        <http://dbpedia.org/resource/Kenya>
                <http://dbpedia.org/resource/Kenya> ;
        <http://dbpedia.org/resource/Max_Born>
                <http://dbpedia.org/resource/Max_Born> ;
        <http://dbpedia.org/resource/Mother_Teresa>
                <http://dbpedia.org/resource/Mother_Teresa> ;
        <http://dbpedia.org/resource/Presidency_of_Barack_Obama>
                <http://dbpedia.org/resource/Presidency_of_Barack_Obama> .
<http://https://twitter.com/BarackObama>
        <http://dbpedia.org/resource/Action_game>
                <http://dbpedia.org/resource/Action_game> ;
        <http://dbpedia.org/resource/Barack_Obama>
                <http://dbpedia.org/resource/Barack_Obama> ;
        <http://dbpedia.org/resource/President_of_Iraq>
                <http://dbpedia.org/resource/President_of_Iraq> .
<http://https://www.facebook.com/barackobama>
        <http://dbpedia.org/resource/Action_game>
                <http://dbpedia.org/resource/Action_game> ;
        <http://dbpedia.org/resource/Barack_Obama>
                <http://dbpedia.org/resource/Barack_Obama> ;
        <http://dbpedia.org/resource/Facebook>
                <http://dbpedia.org/resource/Facebook> ;
        <http://dbpedia.org/resource/The_Visit>
                <http://dbpedia.org/resource/The_Visit> ;
        <http://dbpedia.org/resource/Washington,_D.C.>
                <http://dbpedia.org/resource/Washington,_D.C.> ;
        <http://dbpedia.org/resource/White_House>
                <http://dbpedia.org/resource/White_House> .
probleme d'annotation ou de creation des graphes rdf
./extendedGraph/foo0.xml/./extendedGraph/foo1.xml : 1.0, 10.0, 0.1
./extendedGraph/foo0.xml/./extendedGraph/foo2.xml : 0.0, 18.0, 0.0
./extendedGraph/foo0.xml/./extendedGraph/foo3.xml : 0.0, 17.0, 0.0
./extendedGraph/foo0.xml/./extendedGraph/foo4.xml : 1.0, 11.0, 0.09090909090909091
./extendedGraph/foo0.xml/./extendedGraph/foo5.xml : 1.0, 14.0, 0.07142857142857142
./extendedGraph/foo1.xml/./extendedGraph/foo0.xml : 1.0, 10.0, 0.1
./extendedGraph/foo1.xml/./extendedGraph/foo2.xml : 0.0, 11.0, 0.0
./extendedGraph/foo1.xml/./extendedGraph/foo3.xml : 0.0, 10.0, 0.0
./extendedGraph/foo1.xml/./extendedGraph/foo4.xml : 1.0, 4.0, 0.25
./extendedGraph/foo1.xml/./extendedGraph/foo5.xml : 1.0, 7.0, 0.14285714285714285
./extendedGraph/foo2.xml/./extendedGraph/foo0.xml : 0.0, 18.0, 0.0
./extendedGraph/foo2.xml/./extendedGraph/foo1.xml : 0.0, 11.0, 0.0
./extendedGraph/foo2.xml/./extendedGraph/foo3.xml : 0.0, 17.0, 0.0
./extendedGraph/foo2.xml/./extendedGraph/foo4.xml : 0.0, 12.0, 0.0
./extendedGraph/foo2.xml/./extendedGraph/foo5.xml : 0.0, 15.0, 0.0
./extendedGraph/foo3.xml/./extendedGraph/foo0.xml : 0.0, 17.0, 0.0
./extendedGraph/foo3.xml/./extendedGraph/foo1.xml : 0.0, 10.0, 0.0
./extendedGraph/foo3.xml/./extendedGraph/foo2.xml : 0.0, 17.0, 0.0
./extendedGraph/foo3.xml/./extendedGraph/foo4.xml : 0.0, 11.0, 0.0
./extendedGraph/foo3.xml/./extendedGraph/foo5.xml : 0.0, 14.0, 0.0
./extendedGraph/foo4.xml/./extendedGraph/foo0.xml : 1.0, 11.0, 0.09090909090909091
./extendedGraph/foo4.xml/./extendedGraph/foo1.xml : 1.0, 4.0, 0.25
./extendedGraph/foo4.xml/./extendedGraph/foo2.xml : 0.0, 12.0, 0.0
./extendedGraph/foo4.xml/./extendedGraph/foo3.xml : 0.0, 11.0, 0.0
./extendedGraph/foo4.xml/./extendedGraph/foo5.xml : 2.0, 7.0, 0.2857142857142857
./extendedGraph/foo5.xml/./extendedGraph/foo0.xml : 1.0, 14.0, 0.07142857142857142
./extendedGraph/foo5.xml/./extendedGraph/foo1.xml : 1.0, 7.0, 0.14285714285714285
./extendedGraph/foo5.xml/./extendedGraph/foo2.xml : 0.0, 15.0, 0.0
./extendedGraph/foo5.xml/./extendedGraph/foo3.xml : 0.0, 14.0, 0.0
./extendedGraph/foo5.xml/./extendedGraph/foo4.xml : 2.0, 7.0, 0.2857142857142857
foo0.xml
foo0.xml   SUPPR
foo1.xml
foo1.xml   SUPPR
foo2.xml
foo2.xml   SUPPR
foo3.xml
foo3.xml   SUPPR
foo4.xml
foo4.xml   SUPPR
foo5.xml
foo5.xml   SUPPR
matriceSimilarite.csv
Exception in thread "main" java.lang.NumberFormatException: For input string: "0,1"
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
    at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
    at java.lang.Double.parseDouble(Double.java:538)
    at analysis.ExplorationMatrice.exploreSimiliratyFromCSV(ExplorationMatrice.java:62)
    at service.Service.launchSearch(Service.java:58)
    at service.Service.main(Service.java:189)

Bad Uri Exception

When I try to create the graph, I got an bad Uri exception. So it aborts the graph creation. I didn't find out for what resource it does that.

I got this error :

com.hp.hpl.jena.shared.BadURIException: Only well-formed absolute URIrefs can be included in RDF/XML output: <http://> Code: 57/REQUIRED_COMPONENT_MISSING in HOST: A component that is required by the scheme is missing.

Alternative for dbpedia

You can switch of annotration database. the only thing to do is comment in the file DbpediaSpotlight.java one line as indicated below

//Comment one of the two line, the first uses dbpedia, the second uses factforge
            //GetMethod getMethod = new GetMethod("http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=select+distinct+*+where+%7B%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F"+ URLEncoder.encode(query, "utf-8") + "%3E+%3Fp+%3FConcept%7DLIMIT+10%0D%0A%0D%0A&format=json&timeout=30000&debug=on");
            GetMethod getMethod = new GetMethod("http://factforge.net/sparql.json?query=select+distinct+*+where+%7B+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F" + URLEncoder.encode(query, "utf-8") + "%3E+%3Fp+%3FConcept%7D+LIMIT+100%0D%0A&_implicit=false&implicit=true&_equivalent=false&_form=%2Fsparql");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.