Want to use wikibrain

82 views
Skip to first unread message

Partha Pakray

unread,
Dec 15, 2014, 2:21:56 AM12/15/14
to wiki...@googlegroups.com
Hi,

I want to use wiki brain.

I have got one error?
Exception in thread "main" java.lang.IllegalArgumentException: Environment home ./db/phrases/anchortext/describe doesn't exist

So how can I solve this problem? how to do data importer?

Best,
Partha

Partha Pakray

unread,
Dec 15, 2014, 2:55:23 AM12/15/14
to wiki...@googlegroups.com
Hi,

I have  "db/phrases/anchortext/describe" still showing some error
Exception in thread "main" java.lang.IllegalArgumentException: Environment home ./db/phrases/anchortext/describe doesn't exist

Best,
Partha

Shilad Sen

unread,
Dec 15, 2014, 12:48:07 PM12/15/14
to Partha Pakray, wiki...@googlegroups.com
Hi Partha,

Can you tell me a little more about how you're integrating WikiBrain? A jar file, maven, etc?

Also, did you follow the import process described on the main webpage: http://shilad.github.io/wikibrain/?

Thanks!

-Shilad


--
You received this message because you are subscribed to the Google Groups "wikibrain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wikibrain+...@googlegroups.com.
To post to this group, send email to wiki...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wikibrain/8aa48266-9f54-48fe-a62e-0ae8f3790fcc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Shilad W. Sen
Associate Professor
Mathematics, Statistics, and Computer Science Dept.
Macalester College
ss...@macalester.edu

Partha Pakray

unread,
Dec 15, 2014, 1:55:16 PM12/15/14
to Shilad Sen, wiki...@googlegroups.com
Dear Shilad,

Thanks for your reply. Yes, I want to use for it phrase matching for a search engine. So, how can I do this thing?

Best Regards,
Partha


--
Partha Pakray
=============================================
Research Engineer
Research & Development Specialist
Masaryk University

=============================================

Partha Pakray

unread,
Dec 15, 2014, 2:16:35 PM12/15/14
to wiki...@googlegroups.com, ss...@macalester.edu
Dear Shilad,

I have got error like:

WARNING: concept path ./dat/sr/concepts/simple.txt not a file; defaulting to all concepts
Exception in thread "main" java.lang.IllegalArgumentException: Environment home ./db/phrases/anchortext/describe doesn't exist
at com.sleepycat.je.log.FileManager.<init>(FileManager.java:367)
at com.sleepycat.je.dbi.EnvironmentImpl.<init>(EnvironmentImpl.java:453)
at com.sleepycat.je.dbi.EnvironmentImpl.<init>(EnvironmentImpl.java:382)
at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:178)
at com.sleepycat.je.Environment.makeEnvironmentImpl(Environment.java:246)
at com.sleepycat.je.Environment.<init>(Environment.java:227)
at com.sleepycat.je.Environment.<init>(Environment.java:170)
at org.wikibrain.utils.ObjectDb.<init>(ObjectDb.java:47)
at org.wikibrain.phrases.PhraseAnalyzerObjectDbDao.<init>(PhraseAnalyzerObjectDbDao.java:50)
at org.wikibrain.phrases.PhraseAnalyzerObjectDbDao$Provider.get(PhraseAnalyzerObjectDbDao.java:225)
at org.wikibrain.phrases.PhraseAnalyzerObjectDbDao$Provider.get(PhraseAnalyzerObjectDbDao.java:199)
at org.wikibrain.conf.Configurator.constructInternal(Configurator.java:377)
at org.wikibrain.conf.Configurator.construct(Configurator.java:368)
at org.wikibrain.phrases.AnchorTextPhraseAnalyzer$Provider.get(AnchorTextPhraseAnalyzer.java:125)
at org.wikibrain.phrases.AnchorTextPhraseAnalyzer$Provider.get(AnchorTextPhraseAnalyzer.java:105)
at org.wikibrain.conf.Configurator.constructInternal(Configurator.java:377)
at org.wikibrain.conf.Configurator.get(Configurator.java:259)
at org.wikibrain.conf.Configurator.get(Configurator.java:214)
at org.wikibrain.phrases.CascadingAnalyzer$Provider.get(CascadingAnalyzer.java:101)
at org.wikibrain.phrases.CascadingAnalyzer$Provider.get(CascadingAnalyzer.java:80)
at org.wikibrain.conf.Configurator.constructInternal(Configurator.java:377)
at org.wikibrain.conf.Configurator.get(Configurator.java:259)
at org.wikibrain.conf.Configurator.get(Configurator.java:214)
at org.wikibrain.sr.disambig.SimilarityDisambiguator$Provider.get(SimilarityDisambiguator.java:210)
at org.wikibrain.sr.disambig.SimilarityDisambiguator$Provider.get(SimilarityDisambiguator.java:184)
at org.wikibrain.conf.Configurator.constructInternal(Configurator.java:377)
at org.wikibrain.conf.Configurator.get(Configurator.java:259)
at org.wikibrain.conf.Configurator.get(Configurator.java:231)
at org.wikibrain.sr.vector.VectorBasedSRMetric$Provider.get(VectorBasedSRMetric.java:513)
at org.wikibrain.sr.vector.VectorBasedSRMetric$Provider.get(VectorBasedSRMetric.java:482)
at org.wikibrain.conf.Configurator.constructInternal(Configurator.java:377)
at org.wikibrain.conf.Configurator.get(Configurator.java:259)
at org.wikibrain.conf.Configurator.get(Configurator.java:231)
at org.wikibrain.sr.ensemble.EnsembleMetric$Provider.get(EnsembleMetric.java:238)
at org.wikibrain.sr.ensemble.EnsembleMetric$Provider.get(EnsembleMetric.java:209)
at org.wikibrain.conf.Configurator.constructInternal(Configurator.java:377)
at org.wikibrain.conf.Configurator.get(Configurator.java:259)
at org.wikibrain.conf.Configurator.get(Configurator.java:231)
at org.wikibrain.cookbook.QuickStart.main(QuickStart.java:37)


Please tell me how to solve this one?

Best Regards,
Partha
To unsubscribe from this group and stop receiving emails from it, send an email to wikibrain+unsubscribe@googlegroups.com.

Shilad Sen

unread,
Dec 15, 2014, 2:24:21 PM12/15/14
to Partha Pakray, wiki...@googlegroups.com
Sure. Could you tell me exactly what you did to try to install / import WikiBrain? 

Partha Pakray

unread,
Dec 15, 2014, 2:25:18 PM12/15/14
to wiki...@googlegroups.com
PFA.

Best,
Partha

On Monday, December 15, 2014 12:51:56 PM UTC+5:30, Partha Pakray wrote:
Screenshot from 2014-12-16 00:48:59.png

Shilad Sen

unread,
Dec 15, 2014, 2:32:16 PM12/15/14
to Partha Pakray, wiki...@googlegroups.com
Ok thanks. And when you run the Java program you wrote, how do you create the envionment? Do you specify your custom configuration file?

--
You received this message because you are subscribed to the Google Groups "wikibrain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wikibrain+...@googlegroups.com.

To post to this group, send email to wiki...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Partha Pakray

unread,
Dec 15, 2014, 2:32:27 PM12/15/14
to Shilad Sen, wiki...@googlegroups.com
Dear Shilad,

It already installed successfully. And I am using java program to use similarity. When I run java code from eclipse I got that error.

Best Regards,
Partha

Partha Pakray

unread,
Dec 15, 2014, 2:34:57 PM12/15/14
to Shilad Sen, wiki...@googlegroups.com
Dear Shilad,

It's just for testing, here is the code:

========================

package org.wikibrain.cookbook;
import org.wikibrain.conf.ConfigurationException;
import org.wikibrain.conf.Configurator;
import org.wikibrain.core.cmd.Env;
import org.wikibrain.core.cmd.EnvBuilder;
import org.wikibrain.core.dao.DaoException;
import org.wikibrain.core.dao.LocalPageDao;
import org.wikibrain.core.jooq.tables.LocalPage;
import org.wikibrain.core.lang.Language;
import org.wikibrain.core.lang.LocalId;
import org.wikibrain.core.model.Title;
import org.wikibrain.phrases.PhraseAnalyzer;
import org.wikibrain.sr.SRMetric;
import org.wikibrain.sr.SRResult;
import org.wikibrain.sr.SRResultList;

import antlr.StringUtils;
import antlr.collections.List;
import edu.emory.mathcs.backport.java.util.Arrays;

import java.io.IOException;
//import java.util.ArrayList;
import java.util.LinkedHashMap;

/**
 * @author Shilad Sen
 */
public class QuickStart {
    public static void main(String args[]) throws Exception {
   
    Env env = new EnvBuilder().build();
    Configurator conf = env.getConfigurator();
    LocalPageDao lpDao = conf.get(LocalPageDao.class);
    Language simple = Language.getByLangCode("simple");

    // Retrieve the "ensemble" sr metric for simple english 
    SRMetric sr = conf.get(
           SRMetric.class, "ensemble",
           "language", simple.getLangCode());

   
    String pairs[][] = new String[][] {
           { "cat", "kitty" },
           { "obama", "president" },
           { "tires", "car" },
           { "java", "computer" },
           { "dog", "computer" },
    };      

    for (String pair[] : pairs) {
       SRResult s = sr.similarity(pair[0], pair[1], false); 
       System.out.println(s.getScore() + ": '" + pair[0] + "', '" + pair[1] + "'"); 
    }    
    }
}

=======================================================================




Shilad Sen

unread,
Dec 15, 2014, 2:38:37 PM12/15/14
to Partha Pakray, wiki...@googlegroups.com
Aha! You need to specify your custom configuration file that is created when you run the Loader GUI:

Env env = new EnvBuilder().setConfigFile("customized.conf").build();

Partha Pakray

unread,
Dec 15, 2014, 2:42:26 PM12/15/14
to Shilad Sen, wiki...@googlegroups.com
Dear Shilad,

I am sorry :( still some error,

Exception in thread "main" java.lang.IllegalArgumentException: Environment home ./db/phrases/anchortext/describe doesn't exist

Best Regards,
Partha


Shilad Sen

unread,
Dec 15, 2014, 2:47:38 PM12/15/14
to Partha Pakray, wiki...@googlegroups.com
Strange! Can you check to see if "db/phrases" exists in your WikiBrain directory?

Partha Pakray

unread,
Dec 15, 2014, 2:50:00 PM12/15/14
to Shilad Sen, wiki...@googlegroups.com
Yes, every thing is ok, but what is this "./db/phrases/anchortext/describe" in anchortext folder no describe there, how is it possible because I downloaded every thing?

Best Regards,
Partha

Partha Pakray

unread,
Dec 15, 2014, 2:51:00 PM12/15/14
to Shilad Sen, wiki...@googlegroups.com
PFA. Yes, every thing is ok, but what is this "./db/phrases/anchortext/describe" in anchortext folder no describe there, how is it possible because I downloaded every thing?

Best Regards,
Partha
Screenshot from 2014-12-16 01:18:04.png
Screenshot from 2014-12-16 01:20:28.png

Shilad Sen

unread,
Dec 15, 2014, 2:59:52 PM12/15/14
to Partha Pakray, wiki...@googlegroups.com
It looks like db/phrases/anchortext/describe DOES exist, right?

Perhaps your program is being run from the incorrect directory? Could you check that eclipse's working directory is set correctly when running the program? It looks like this should be "Home" on your computer from your screenshot.
Reply all
Reply to author
Forward
0 new messages