-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPipeline.java
35 lines (26 loc) · 1.47 KB
/
Pipeline.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package finalProject.fp;
import static org.apache.uima.fit.factory.AnalysisEngineFactory.createEngine;
import static org.apache.uima.fit.factory.CollectionReaderFactory.createReader;
import java.io.IOException;
import org.apache.uima.UIMAException;
import org.apache.uima.analysis_engine.AnalysisEngine;
import org.apache.uima.collection.CollectionReader;
import org.apache.uima.fit.pipeline.SimplePipeline;
import de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordLemmatizer;
import de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordPosTagger;
import de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordSegmenter;
public class Pipeline {
public static void main(String[] args) throws UIMAException, IOException {
CollectionReader reader = createReader(Comments_reader.class,Comments_reader.FILE_ADDRESS,"src/main/resources/data/");
AnalysisEngine seg = createEngine(StanfordSegmenter.class);
AnalysisEngine c = createEngine(Comments_split.class);
AnalysisEngine pos = createEngine(StanfordPosTagger.class);
AnalysisEngine lemma = createEngine(StanfordLemmatizer.class);
// AnalysisEngine writer = createEngine(VectorWritter.class);
// AnalysisEngine writer = createEngine(VectorWritter2.class);
// AnalysisEngine writer = createEngine(VectorWritter3.class);
// AnalysisEngine writer = createEngine(VectorWritter4.class);
AnalysisEngine writer = createEngine(VectorWritter5.class);
SimplePipeline.runPipeline(reader,seg,pos,c,lemma, writer);
}
}