Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaskContextNotFoundException when specifying a single-valued array in a discriminator #48

Open
GoogleCodeExporter opened this issue May 14, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

This works: 

Map<String, Object> dimReaders = new HashMap<String, Object>();
dimReaders.put(DIM_READER_TRAIN, TwentyNewsgroupsCorpusReader.class);
dimReaders.put(DIM_READER_TRAIN_PARAMS,
   Arrays.asList(new Object[] {...,
   TwentyNewsgroupsCorpusReader.PARAM_PATTERNS, new String[] { INCLUDE_PREFIX + "*.xml", INCLUDE_PREFIX + "*.xml.gz" } }));
Dimension.createBundle("readers", dimReaders);

This doesn't work:

Map<String, Object> dimReaders = new HashMap<String, Object>();
dimReaders.put(DIM_READER_TRAIN, TwentyNewsgroupsCorpusReader.class);
dimReaders.put(DIM_READER_TRAIN_PARAMS,
   Arrays.asList(new Object[] {...,
   TwentyNewsgroupsCorpusReader.PARAM_PATTERNS, new String[] { INCLUDE_PREFIX + "*/*.txt" } }));
Dimension.createBundle("readers", dimReaders);

To reproduce: go to 
de.tudarmstadt.ukp.dkpro.tc.examples.single.document.TwentyNewsgroupsDemo.java 
in the de.tudarmstadt.ukp.dkpro.tc.examples-gpl module of DKPro-TC, and add 
"new String[]" to the TwentyNewsgroupsCorpusReader.PARAM_PATTERNS parameter of 
the readers. Given the misuse of the PATTERNS parameter, this issue not be a 
big deal, but I'm keeping it here for the record.

Original issue reported on code.google.com by [email protected] on 20 May 2014 at 7:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants