Search in sources :

Example 26 with ExternalResourceDescription

use of org.apache.uima.resource.ExternalResourceDescription in project dkpro-tc by dkpro.

the class CosineSimilarityTest method getFeatureExtractorCollector.

@Override
protected void getFeatureExtractorCollector(List<Object> parameterList) throws ResourceInitializationException {
    ExternalResourceDescription featureExtractor = ExternalResourceFactory.createExternalResourceDescription(CosineFeatureExtractor.class, parameters);
    List<ExternalResourceDescription> fes = new ArrayList<>();
    fes.add(featureExtractor);
    featExtractorConnector = TaskUtils.getFeatureExtractorConnector(outputPath.getAbsolutePath(), JsonDataWriter.class.getName(), Constants.LM_REGRESSION, Constants.FM_PAIR, false, false, false, false, Collections.emptyList(), fes, new String[0]);
}
Also used : ArrayList(java.util.ArrayList) ExternalResourceDescription(org.apache.uima.resource.ExternalResourceDescription)

Example 27 with ExternalResourceDescription

use of org.apache.uima.resource.ExternalResourceDescription in project dkpro-tc by dkpro.

the class SharedNounChunksTest method getFeatureExtractorCollector.

@Override
protected void getFeatureExtractorCollector(List<Object> parameterList) throws ResourceInitializationException {
    ExternalResourceDescription featureExtractor = ExternalResourceFactory.createExternalResourceDescription(SharedNounChunks.class, toString(parameterList.toArray()));
    List<ExternalResourceDescription> fes = new ArrayList<>();
    fes.add(featureExtractor);
    featExtractorConnector = TaskUtils.getFeatureExtractorConnector(outputPath.getAbsolutePath(), JsonDataWriter.class.getName(), Constants.LM_SINGLE_LABEL, Constants.FM_PAIR, false, false, false, false, Collections.emptyList(), fes, new String[] {});
}
Also used : ArrayList(java.util.ArrayList) ExternalResourceDescription(org.apache.uima.resource.ExternalResourceDescription)

Aggregations

ExternalResourceDescription (org.apache.uima.resource.ExternalResourceDescription)27 ArrayList (java.util.ArrayList)17 File (java.io.File)10 AnalysisEngineDescription (org.apache.uima.analysis_engine.AnalysisEngineDescription)10 JsonDataWriter (org.dkpro.tc.core.io.JsonDataWriter)8 CollectionReaderDescription (org.apache.uima.collection.CollectionReaderDescription)7 Instance (org.dkpro.tc.api.features.Instance)5 Test (org.junit.Test)5 Gson (com.google.gson.Gson)4 MetaDependent (org.dkpro.tc.api.features.meta.MetaDependent)4 CustomResourceSpecifier (org.apache.uima.resource.CustomResourceSpecifier)3 TcFeature (org.dkpro.tc.api.features.TcFeature)3 MetaCollectorConfiguration (org.dkpro.tc.api.features.meta.MetaCollectorConfiguration)3 HashMap (java.util.HashMap)2 UimaContextAdmin (org.apache.uima.UimaContextAdmin)2 RootUimaContext_impl (org.apache.uima.impl.RootUimaContext_impl)2 ResourceInitializationException (org.apache.uima.resource.ResourceInitializationException)2 ResourceManager (org.apache.uima.resource.ResourceManager)2 ResourceManager_impl (org.apache.uima.resource.impl.ResourceManager_impl)2 ResourceManagerConfiguration (org.apache.uima.resource.metadata.ResourceManagerConfiguration)2