source: trunk/dports/java/dualist/files/patch-mecab.diff @ 81543

Last change on this file since 81543 was 81543, checked in by hum@…, 9 years ago

added a new port for dualist version 0.1; #29984

File size: 928 bytes
  • app/guts/pipes/DocumentPipe.java

    old new  
    1616import cc.mallet.types.Instance;
    1717import cc.mallet.util.CharSequenceLexer;
    1818
     19import dualist.ja.SimpleMecabPipe;
     20
    1921public class DocumentPipe extends Pipe {
    2022
    2123    private Pipe myPipe = new SerialPipes(new Pipe[] {
     
    2729            new CharSequenceReplace(Pattern.compile("&(.*?);"), ""),
    2830            new CharSequenceReplace(Pattern.compile("[0-9]+"), "00"),
    2931            new CharSequenceLowercase(),
     32            (System.getProperty("dualist.lang") != null &&
     33             System.getProperty("dualist.lang").equals("ja")) ?
     34            new SimpleMecabPipe() :
    3035            new CharSequence2TokenSequence(CharSequenceLexer.LEX_WORD_CLASSES),
    3136            new TokenSequenceRemoveStopwords(),
    3237            new TokenSequence2FeatureSequence(),
Note: See TracBrowser for help on using the repository browser.