Package de.tudarmstadt.ukp.dkpro.core.api.metadata.type

Examples of de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData


    }
    catch (CASException e) {
      throw new AnalysisEngineProcessException(e);
    }
   
    DocumentMetaData md1 = DocumentMetaData.get(view1);
    DocumentMetaData md2 = DocumentMetaData.get(view2);   

    try {
      writer.write(md1.getDocumentId() + "\t" + md2.getDocumentId() + LF);
    }
    catch (IOException e) {
      throw new AnalysisEngineProcessException(e);
    }
  }
View Full Code Here


    }
    catch (CASException e) {
      throw new AnalysisEngineProcessException(e);
    }
   
    DocumentMetaData md1 = JCasUtil.selectSingle(view1, DocumentMetaData.class);
    DocumentMetaData md2 = JCasUtil.selectSingle(view2, DocumentMetaData.class);
   
    TextSimilarityScore score = JCasUtil.selectSingle(jcas, ExperimentalTextSimilarityScore.class);
   
    TextSimilarityScore goldScore = null;
    if (outputGoldScores) {
            goldScore = JCasUtil.selectSingle(jcas, GoldTextSimilarityScore.class);
        }
   
    try {
      if (outputScoresOnly)
      {
        if (outputGoldScores) {
                    writer.write(score.getScore() + "\t" + goldScore.getScore() + LF);
                }
                else {
                    writer.write(score.getScore() + LF);
                }
      } else {
        if (outputGoldScores) {
          writer.write(md1.getDocumentId() + "\t" +
               md2.getDocumentId() + "\t" +
               score.getScore() + "\t" +
               goldScore.getScore() + LF);
        } else {
          writer.write(md1.getDocumentId() + "\t" +
               md2.getDocumentId() + "\t" +
               score.getScore() + LF);
        }
      }
    }
    catch (IOException e) {
View Full Code Here

  {
      try
      {       
        JCas view1 = jcas.getView(CombinationReader.VIEW_1);
         
          DocumentMetaData md = DocumentMetaData.get(view1);
         
          String docID = md.getDocumentId().substring(md.getDocumentId().indexOf("-") + 1);
         
          EntailmentClassificationOutcome outcome = JCasUtil.selectSingle(jcas, EntailmentClassificationOutcome.class);
//          System.out.println(docID + "::" + outcome.getOutcome());         
          gold.put(docID, outcome.getOutcome());
      }
View Full Code Here

    }
   
   
    for (JCas view : views)
    {
      DocumentMetaData md = DocumentMetaData.get(view);
     
      File outputFile = new File(outputDir.getAbsolutePath() + "/" + md.getDocumentId() + ".txt");
     
      BufferedWriter writer;
      try {
        writer = new BufferedWriter(new FileWriter(outputFile));
       
View Full Code Here

            Annotation coveringAnnotation2)
    throws SimilarityException
  {
    // The feature generation needs to have happened before!
   
    DocumentMetaData md = DocumentMetaData.get(jcas1);
    int id = Integer.parseInt(md.getDocumentId().substring(md.getDocumentId().indexOf("-") + 1));
   
    System.out.println(id);
   
    Instance testInst = test.get(id - 1);
   
View Full Code Here

            Annotation coveringAnnotation2)
    throws SimilarityException
  {
    // The feature generation needs to have happened before!
   
    DocumentMetaData md = DocumentMetaData.get(jcas1);
    int id = Integer.parseInt(md.getDocumentId());
   
    System.out.println(id);
   
    Instance testInst = test.get(id - 1);
   
View Full Code Here

TOP

Related Classes of de.tudarmstadt.ukp.dkpro.core.api.metadata.type.DocumentMetaData

Copyright © 2018 www.massapicom. 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.