Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 
 package eu.clarin.weblicht.wlfxb.tc.test;
 

Author(s):
Yana Panchenko
    @Rule
    public TemporaryFolder testFolder = new TemporaryFolder();
    private static final String INPUT_TEXT = "/data/tc-text/layer-input.xml";
    private static final String INPUT_TOKENS = "/data/tc-tokens/layer-input.xml";
    private static final String INPUT_PARSING = "/data/tc-parsing/layer-input.xml";
    private static final String INPUT_SENTENCES = "/data/tc-sents/layer-input.xml";
    private static final String INPUT_LEMMAS = "/data/tc-lemmas/layer-input.xml";
    private static final String INPUT_TEXTSRC = "/data/tc-textsource/layer-input.xml";
    private static final String OUTPUT_FILE = "output.xml";
    public ComposeFromLayersTest() {
    }
    @Test
    public void test() throws Exception {
        InputStream is;
        is = this.getClass().getResourceAsStream();
        TextLayerStored textLayer = TestUtils.read(TextLayerStored.classis);
        is.close();
        is = this.getClass().getResourceAsStream();
        TokensLayerStored tokensLayer = TestUtils.read(TokensLayerStored.classis);
        is.close();
        is = this.getClass().getResourceAsStream();
        ConstituentParsingLayerStored parsingLayer = TestUtils.read(ConstituentParsingLayerStored.classis);
        is.close();
        is = this.getClass().getResourceAsStream();
        SentencesLayerStored sentsLayer = TestUtils.read(SentencesLayerStored.classis);
        is.close();
        is = this.getClass().getResourceAsStream();
        LemmasLayerStored lemmasLayer = TestUtils.read(LemmasLayerStored.classis);
        is.close();
        is = this.getClass().getResourceAsStream();
        TextSourceLayerStored textSourceLayer = TestUtils.read(TextSourceLayerStored.classis);
        is.close();
        TextCorpusStored textCorpus = TextCorpusStored.compose("de"textLayertokensLayerparsingLayersentsLayerlemmasLayertextSourceLayer);
//        List<TextCorpusLayerStoredAbstract> layers = new ArrayList<TextCorpusLayerStoredAbstract>();
//        layers.add(textLayer); layers.add(tokensLayer); layers.add(parsingLayer); layers.add(sentsLayer); layers.add(lemmasLayer);
//        TextCorpusLayerStoredAbstract[] layersAsArray = new TextCorpusLayerStoredAbstract[layers.size()];
//        TextCorpusStored textCorpus = TextCorpusStored.compose("de",  layers.toArray(layersAsArray));
        WLDObjector.write(new MetaData(), textCorpus.newFile(), false);
    }
New to GrepCode? Check out our FAQ X