Examples of writeOne()


Examples of org.fnlp.nlp.corpus.fnlp.FNLPCorpus.writeOne()

    corpus.read(datapath + "/FNLPDATA/ctb7.dat", null);
    corpus.read(datapath + "/FNLPDATA/WeiboFTB(v1.0)-train.dat", null);
    //读自有数据
    corpus.readOurCorpus(datapath + "/ourdata",".txt","UTF8");

    corpus.writeOne(trainfile);

    TreeSet<String> allRelSet = new TreeSet<String>();

    TreeSet<String> set1 = corpus.getAllRelations();
    allRelSet.addAll(set1);
View Full Code Here

Examples of org.fnlp.nlp.corpus.fnlp.FNLPCorpus.writeOne()

    //处理测试数据
    FNLPCorpus corpust = new FNLPCorpus();
    //读自有数据
    corpust.read(datapath + "/FNLPDATA/WeiboFTB(v1.0)-test.dat", null)
    corpust.writeOne(testfile);

    TreeSet<String> set2 = corpus.getAllRelations();
    allRelSet.addAll(set2);

    System.out.println(allRelSet);
View Full Code Here

Examples of org.fnlp.nlp.corpus.fnlp.FNLPCorpus.writeOne()

    List<FNLPSent> train = doc.sentences.subList(0, 3000);
    List<FNLPSent> test = doc.sentences.subList(3000,doc.sentences.size());
   
    doc.sentences =  new LinkedList<FNLPSent>();
    doc.sentences.addAll(train);
    corpus.writeOne(datapath + "/FNLPDATA/WeiboFTB(v1.0)-train.dat");
    System.out.println(corpus.getSentenceNum());
    System.out.println(corpus.getAllPOS().size());
   
   
    doc.sentences =  new LinkedList<FNLPSent>();
View Full Code Here

Examples of org.fnlp.nlp.corpus.fnlp.FNLPCorpus.writeOne()

    System.out.println(corpus.getAllPOS().size());
   
   
    doc.sentences =  new LinkedList<FNLPSent>();
    doc.sentences.addAll(test);
    corpus.writeOne(datapath + "/FNLPDATA/WeiboFTB(v1.0)-test.dat");
    System.out.println(corpus.getSentenceNum());
    System.out.println(corpus.getAllPOS().size());
  }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.