sgextreme / ws4j

Automatically exported from code.google.com/p/ws4j
0 stars 0 forks source link

Problem in executing the SimilarityCalculationDemo.java #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is the error received. Please help..

Extracting wordnet database from jar file ... done in 11.015 sec.
Building index on DB ... done in 0.015 sec.
edu.cmu.lti.ws4j.impl.HirstStOnge   0.0
edu.cmu.lti.ws4j.impl.LeacockChodorow   1.3862943611198906
java.lang.NullPointerException
    at java.io.Reader.<init>(Unknown Source)
    at java.io.InputStreamReader.<init>(Unknown Source)
    at edu.cmu.lti.ws4j.util.StopWordRemover.loadStopList(StopWordRemover.java:41)
    at edu.cmu.lti.ws4j.util.StopWordRemover.<init>(StopWordRemover.java:22)
    at edu.cmu.lti.ws4j.util.StopWordRemover.<clinit>(StopWordRemover.java:14)
    at edu.cmu.lti.ws4j.util.OverlapFinder.getOverlaps(OverlapFinder.java:25)
    at edu.cmu.lti.ws4j.impl.Lesk.calcFromSuperGloss(Lesk.java:97)
    at edu.cmu.lti.ws4j.impl.Lesk.calcFromSuperGloss(Lesk.java:85)
    at edu.cmu.lti.ws4j.impl.Lesk.calcRelatedness(Lesk.java:66)
    at edu.cmu.lti.ws4j.RelatednessCalculator.calcRelatednessOfSynset(RelatednessCalculator.java:54)
    at edu.cmu.lti.ws4j.util.WordSimilarityCalculator.calcRelatednessOfWords(WordSimilarityCalculator.java:85)
    at edu.cmu.lti.ws4j.RelatednessCalculator.calcRelatednessOfWords(RelatednessCalculator.java:61)
    at edu.cmu.lti.ws4j.demo.SimilarityCalculationDemo.run(SimilarityCalculationDemo.java:27)
    at edu.cmu.lti.ws4j.demo.SimilarityCalculationDemo.main(SimilarityCalculationDemo.java:33)
edu.cmu.lti.ws4j.impl.Lesk  0.0
edu.cmu.lti.ws4j.impl.WuPalmer  0.4
java.lang.NullPointerException
    at java.io.Reader.<init>(Unknown Source)
    at java.io.InputStreamReader.<init>(Unknown Source)
    at edu.cmu.lti.ws4j.util.ICFinder.loadIC(ICFinder.java:60)
    at edu.cmu.lti.ws4j.util.ICFinder.<init>(ICFinder.java:41)
    at edu.cmu.lti.ws4j.util.ICFinder.<clinit>(ICFinder.java:27)
    at edu.cmu.lti.ws4j.impl.Resnik.calcRelatedness(Resnik.java:38)
    at edu.cmu.lti.ws4j.RelatednessCalculator.calcRelatednessOfSynset(RelatednessCalculator.java:54)
    at edu.cmu.lti.ws4j.util.WordSimilarityCalculator.calcRelatednessOfWords(WordSimilarityCalculator.java:85)
    at edu.cmu.lti.ws4j.RelatednessCalculator.calcRelatednessOfWords(RelatednessCalculator.java:61)
    at edu.cmu.lti.ws4j.demo.SimilarityCalculationDemo.run(SimilarityCalculationDemo.java:27)
    at edu.cmu.lti.ws4j.demo.SimilarityCalculationDemo.main(SimilarityCalculationDemo.java:33)
edu.cmu.lti.ws4j.impl.Resnik    0.0
edu.cmu.lti.ws4j.impl.JiangConrath  0.0
edu.cmu.lti.ws4j.impl.Lin   0.0
edu.cmu.lti.ws4j.impl.Path  0.14285714285714285
Done in 13188 msec.

Original issue reported on code.google.com by axel...@gmail.com on 24 Jul 2012 at 2:45

GoogleCodeExporter commented 9 years ago

C:\Program Files\Java\jdk1.6.0_43\bin>java SimilarityCalculationDemo
java.lang.NullPointerException
        at java.util.Properties$LineReader.readLine(Properties.java:418)
        at java.util.Properties.load0(Properties.java:337)
        at java.util.Properties.load(Properties.java:325)
        at edu.cmu.lti.ws4j.util.WS4JConfiguration.<init>(WS4JConfiguration.java
:30)
        at edu.cmu.lti.ws4j.util.WS4JConfiguration.<clinit>(WS4JConfiguration.ja
va:10)
        at edu.cmu.lti.lexical_db.NictWordNet.<clinit>(NictWordNet.java:28)
        at SimilarityCalculationDemo.<clinit>(SimilarityCalculationDemo.java:18)

java.lang.NullPointerException
        at java.util.Properties$LineReader.readLine(Properties.java:418)
        at java.util.Properties.load0(Properties.java:337)
        at java.util.Properties.load(Properties.java:325)
        at edu.cmu.lti.jawjaw.util.Configuration.<init>(Configuration.java:40)
        at edu.cmu.lti.jawjaw.util.Configuration.<clinit>(Configuration.java:23)

        at edu.cmu.lti.jawjaw.db.WordDAO.<clinit>(WordDAO.java:42)
        at edu.cmu.lti.jawjaw.util.WordNetUtil.wordToSynsets(WordNetUtil.java:38
)
        at edu.cmu.lti.lexical_db.NictWordNet.getAllConcepts(NictWordNet.java:38
)
        at edu.cmu.lti.ws4j.util.WordSimilarityCalculator.calcRelatednessOfWords
(WordSimilarityCalculator.java:79)
        at edu.cmu.lti.ws4j.RelatednessCalculator.calcRelatednessOfWords(Related
nessCalculator.java:61)
        at SimilarityCalculationDemo.run(SimilarityCalculationDemo.java:27)
        at SimilarityCalculationDemo.main(SimilarityCalculationDemo.java:33)
java.lang.ClassNotFoundException: org.sqlite.JDBC
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:171)
        at edu.cmu.lti.jawjaw.db.SQL.createSQLConnection(SQL.java:77)
        at edu.cmu.lti.jawjaw.db.SQL.<init>(SQL.java:55)
        at edu.cmu.lti.jawjaw.db.SQL.<clinit>(SQL.java:45)
        at edu.cmu.lti.jawjaw.db.WordDAO.findWordsByLemmaAndPos(WordDAO.java:124
)
        at edu.cmu.lti.jawjaw.util.WordNetUtil.wordToSynsets(WordNetUtil.java:38
)
        at edu.cmu.lti.lexical_db.NictWordNet.getAllConcepts(NictWordNet.java:38
)
        at edu.cmu.lti.ws4j.util.WordSimilarityCalculator.calcRelatednessOfWords
(WordSimilarityCalculator.java:79)
        at edu.cmu.lti.ws4j.RelatednessCalculator.calcRelatednessOfWords(Related
nessCalculator.java:61)
        at SimilarityCalculationDemo.run(SimilarityCalculationDemo.java:27)
        at SimilarityCalculationDemo.main(SimilarityCalculationDemo.java:33)
Exception in thread "main" java.lang.NullPointerException
        at edu.cmu.lti.jawjaw.db.SQL.getPreparedStatement(SQL.java:217)
        at edu.cmu.lti.jawjaw.db.WordDAO.findWordsByLemmaAndPos(WordDAO.java:124
)
        at edu.cmu.lti.jawjaw.util.WordNetUtil.wordToSynsets(WordNetUtil.java:38
)
        at edu.cmu.lti.lexical_db.NictWordNet.getAllConcepts(NictWordNet.java:38
)
        at edu.cmu.lti.ws4j.util.WordSimilarityCalculator.calcRelatednessOfWords
(WordSimilarityCalculator.java:79)
        at edu.cmu.lti.ws4j.RelatednessCalculator.calcRelatednessOfWords(Related
nessCalculator.java:61)
        at SimilarityCalculationDemo.run(SimilarityCalculationDemo.java:27)
        at SimilarityCalculationDemo.main(SimilarityCalculationDemo.java:33)

C:\Program Files\Java\jdk1.6.0_43\bin>

Original comment by emiglobe...@gmail.com on 22 Apr 2013 at 1:58