Running a java program by looking at import dependencies

I have a java file in location.

/root/Desktop/software/UIMA/yagogit/yodaqa/src/main/java/cz/brmlab/yodaqa/analysis/question/FocusGenerator.java

      

This file is part of the whole project - FocusGenerator.java

it imports a couple of classes from UIMA and several other packages. (I am already setting up UIMA on my system)

import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.fit.component.JCasAnnotator_ImplBase;
import org.apache.uima.UimaContext;
import org.apache.uima.resource.ResourceInitializationException;
import cz.brmlab.yodaqa.model.TyCor.LAT;
import cz.brmlab.yodaqa.provider.OpenNlpNamedEntities;
import de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos.POS;
import de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity;

      

When doing whole projects following the readme file, it works well. But I wanted to test every single program like the one mentioned above. When I try to compile with javac

it gives an error cannot find symbol

like below

ATByFocus.java:77: cannot find symbol
symbol  : class ImplicitQLAT
location: class cz.brmlab.yodaqa.analysis.question.LATByFocus
            addFocusLAT(jcas, focus, "amount", null, 33914, 0.0, new ImplicitQLAT(jcas));
                                                                     ^
LATByFocus.java:83: cannot find symbol
symbol  : class LAT
location: class cz.brmlab.yodaqa.analysis.question.LATByFocus
            addFocusLAT(jcas, focus, text, pos, 0, 0.0, new LAT(jcas));

      

etc.

What is the correct way to execute this file. I tried importing it in eclipse, but in eclipse it couldn't be imported as a project either.

+3


source to share


1 answer


It is difficult to build pieces of YodaQA in isolation. I think it is much easier to just work in YodaQA, but create your own main class that will call FocusGenerator directly or whatever class you want.



To add another main class and execute it, you will need to add another gradle object. See Build.gradle for a few examples: tsvgs, biocrftrain, etc.

0


source







All Articles