You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to use the CooccurrenceGraphExtractor. To set up my system, I have installed the TreeTagger. Furthermore, I have build the dkpro core treetagger-asl project using the build.xml.
For my test project I have added the jars for english - created during the treetagger build - as libraries in eclipse.
My Maven POM looks like this (Sry, it is not supported as attachment by GitHub):
import static de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.KeyphraseExtractorUtils.getTopRankedUniqueKeyphrases;
import java.io.IOException;
import java.util.List;
import de.tudarmstadt.ukp.dkpro.keyphrases.core.type.Keyphrase;
import de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.Candidate;
import de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.Candidate.CandidateType;
import de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.Candidate.PosType;
import de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.CooccurrenceGraphExtractor;
public class Test {
public static void main(String[] args) throws IOException {
String text = "This is a sample text and I dont know what else to write in here.";
CooccurrenceGraphExtractor extractor = new CooccurrenceGraphExtractor();
extractor.setMinKeyphraseLength(2);
extractor.setCandidate(new Candidate(CandidateType.Token, PosType.N));
List<Keyphrase> keyphrases = extractor.extract(text);
keyphrases = getTopRankedUniqueKeyphrases(keyphrases, keyphrases.size());
text = "";
for (Keyphrase keyphrase : keyphrases) {
text += keyphrase.getKeyphrase() + " ";
}
System.out.println(text);
}
}
When I try to run it I get the following error message:
Exception in thread "main" java.lang.NoClassDefFoundError: de/tudarmstadt/ukp/dkpro/core/treetagger/TreeTaggerPosLemmaTT4J
at de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.KeyphraseExtractor_ImplBase.createTagger(KeyphraseExtractor_ImplBase.java:195)
at de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.KeyphraseExtractor_ImplBase.createPreprocessingComponents(KeyphraseExtractor_ImplBase.java:114)
at de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.CooccurrenceGraphExtractor.createKeyphraseExtractorAggregate(CooccurrenceGraphExtractor.java:48)
at de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.KeyphraseExtractor_ImplBase.getKeyphraseEngine(KeyphraseExtractor_ImplBase.java:232)
at de.tudarmstadt.ukp.dkpro.keyphrases.core.wrapper.KeyphraseExtractor_ImplBase.extract(KeyphraseExtractor_ImplBase.java:83)
at Test.main(Test.java:25)
Caused by: java.lang.ClassNotFoundException: de.tudarmstadt.ukp.dkpro.core.treetagger.TreeTaggerPosLemmaTT4J
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more
Does anyone know how I can fix this?
I am using Java 1.8 and my OS is Windows 10, 64-bit.
Yours,
Laura
The text was updated successfully, but these errors were encountered:
Looks like DKPro Keyphrases is incompatible with DKPro Core 1.9.0-SNAPSHOT. I think the last version where the TreeTagger component was still called TreeTaggerPosTaggerTT4J was 1.6.1 (or even before that). DKPro Keyphrases should be upgraded to a more recent DKPro Core release.
Hi,
I am currently trying to use the CooccurrenceGraphExtractor. To set up my system, I have installed the TreeTagger. Furthermore, I have build the dkpro core treetagger-asl project using the build.xml.
For my test project I have added the jars for english - created during the treetagger build - as libraries in eclipse.
My Maven POM looks like this (Sry, it is not supported as attachment by GitHub):
My Java program looks like this:
When I try to run it I get the following error message:
Does anyone know how I can fix this?
I am using Java 1.8 and my OS is Windows 10, 64-bit.
Yours,
Laura
The text was updated successfully, but these errors were encountered: